Skip to content

gh-56166: Deprecate passing confusing positional arguments in re functions #107778

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Aug 8, 2023

Deprecate passing optional arguments maxsplit, count and flags in module-level functions re.split(), re.sub() and re.subn() as positional. They should only be passed by keyword.


📚 Documentation preview 📚: https://cpython-previews--107778.org.readthedocs.build/

…e functions

Deprecate passing optional arguments maxsplit, count and flags in
module-level functions re.split(), re.sub() and re.subn() as positional.
They should only be passed by keyword.
@hauntsaninja
Copy link
Contributor

Thank you!

@hauntsaninja hauntsaninja merged commit 882cb79 into python:main Aug 16, 2023
@serhiy-storchaka serhiy-storchaka deleted the re-deprecate-positional-args branch August 16, 2023 20:45
miketheman added a commit to miketheman/pytest-postgresql that referenced this pull request Dec 26, 2024
In Python 3.13, usage of a positional argument for `maxsplit` has been
formally deprecated.
Refs: python/cpython#107778

Signed-off-by: Mike Fiedler <[email protected]>
aarongable pushed a commit to chromium/chromium that referenced this pull request Feb 25, 2025
…/third_party/crashpad/update.py:231: DeprecationWarning: 'count' is passed as positional argument
  readme_content_new = re.sub(

https://docs.python.org/3/library/re.html:
> Deprecated since version 3.13: Passing count and flags as positional
> arguments is deprecated. In future Python versions they will be
> keyword-only parameters.

python/cpython#56166,
python/cpython#107778,
https://docs.python.org/3/whatsnew/3.13.html#:~:text=gh%2D66543.)-,re%3A,-Deprecate%20passing%20the

Change-Id: Id7909960a107163753ccceb5ebe66c639fe02833
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6297851
Commit-Queue: Peter Boström <[email protected]>
Auto-Submit: Mark Mentovai <[email protected]>
Reviewed-by: Peter Boström <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1424251}
hubot pushed a commit to chromium/crashpad that referenced this pull request Feb 25, 2025
https://docs.python.org/3/library/re.html:
> Deprecated since version 3.13: Passing count and flags as positional
> arguments is deprecated. In future Python versions they will be
> keyword-only parameters.

python/cpython#56166,
python/cpython#107778,
https://docs.python.org/3/whatsnew/3.13.html#:~:text=gh%2D66543.)-,re%3A,-Deprecate%20passing%20the

Change-Id: Ibda1394927062dd9e0353e2b9d643b510070deb6
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6298792
Reviewed-by: Leonard Grey <[email protected]>
Commit-Queue: Mark Mentovai <[email protected]>
gm4sl pushed a commit to backtrace-labs/crashpad that referenced this pull request Apr 1, 2025
https://docs.python.org/3/library/re.html:
> Deprecated since version 3.13: Passing count and flags as positional
> arguments is deprecated. In future Python versions they will be
> keyword-only parameters.

python/cpython#56166,
python/cpython#107778,
https://docs.python.org/3/whatsnew/3.13.html#:~:text=gh%2D66543.)-,re%3A,-Deprecate%20passing%20the

Change-Id: Ibda1394927062dd9e0353e2b9d643b510070deb6
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6298792
Reviewed-by: Leonard Grey <[email protected]>
Commit-Queue: Mark Mentovai <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants