Skip to content

Commit

Permalink
Fix python3.13 deprecation warning (#157)
Browse files Browse the repository at this point in the history
* Fix python3.13 deprecation warning

* Update changelog to include  fix
  • Loading branch information
sdb9696 authored Jul 29, 2024
1 parent 607f57d commit 4ce048e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ We are currently working on porting this changelog to the specifications in
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## Version 1.1.5 - Unreleased
## Version 1.1.6 - Unreleased

### Fixed
* Fixed passing of `flags` as keyword argument to `re.sub` for python 3.13 compliance.


## Version 1.1.5 - Released 2024-06-08

### Changed
* Minor modification to `xdoctest --version-info` and exposed it in CLI help.
Expand Down
2 changes: 1 addition & 1 deletion src/xdoctest/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ def remove_blankline_marker(text):
'\n{marker}', '{marker}']).format(
marker=BLANKLINE_MARKER, pos_lb=pos_lb)
# blankline_pattern = r'(?<=\n)[ ]*{}\n?'.format(re.escape(BLANKLINE_MARKER))
new_text = re.sub(blankline_pattern, '\n', text, re.MULTILINE)
new_text = re.sub(blankline_pattern, '\n', text, flags=re.MULTILINE)
return new_text


Expand Down

0 comments on commit 4ce048e

Please sign in to comment.