GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-56166: Deprecate passing confusing positional arguments in re functions by serhiy-storchaka · Pull Request #107778 · python/cpython

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Aug 8, 2023 •
edited by github-actions Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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.

  • Issue: re.sub confusion between count and flags args #56166

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-bot bedevere-bot mentioned this pull request Aug 8, 2023
re.sub confusion between count and flags args #56166
Closed
@bedevere-bot bedevere-bot added the awaiting core review label Aug 8, 2023
@serhiy-storchaka
pythongh-56166: Deprecate passing confusing positional arguments in r…
862a379
…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.
@serhiy-storchaka
serhiy-storchaka force-pushed the re-deprecate-positional-args branch from d7238ab to 862a379 Compare August 8, 2023 13:25
@serhiy-storchaka serhiy-storchaka mentioned this pull request Aug 8, 2023
gh-56166: Deprecate passing counts and maxsplit via position in re #107767
Closed
@serhiy-storchaka
Add more strict tests.
178784b
hauntsaninja
hauntsaninja approved these changes Aug 8, 2023
View reviewed changes
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting core review labels Aug 8, 2023
@hauntsaninja

hauntsaninja commented Aug 16, 2023

Copy link
Copy Markdown
Contributor

Thank you!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hauntsaninja
hauntsaninja merged commit 882cb79 into python:main Aug 16, 2023
@bedevere-bot bedevere-bot removed the awaiting merge label Aug 16, 2023
@serhiy-storchaka
serhiy-storchaka deleted the re-deprecate-positional-args branch August 16, 2023 20:45
@drammock drammock mentioned this pull request Dec 17, 2024
don't pass maxsplit as positional arg numpy/numpydoc#596
Merged
miketheman added a commit to miketheman/pytest-postgresql that referenced this pull request Dec 26, 2024
@miketheman
misc: resolve deprecation warning for str.split()
513db52
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]>
@miketheman miketheman mentioned this pull request Dec 26, 2024
misc: resolve deprecation warning for str.split() dbfixtures/pytest-postgresql#1049
Merged
1 task done
aarongable pushed a commit to chromium/chromium that referenced this pull request Feb 25, 2025
@markmentovai Chromium LUCI CQ
crashpad: fix update.py DeprecationWarning under Python 3.13
df2f36f
…/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
@markmentovai Crashpad LUCI CQ
Fix Python 3.13 re DeprecationWarning: pass count and flags by keyword
51eba29
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
@markmentovai @gm4sl
Fix Python 3.13 re DeprecationWarning: pass count and flags by keyword
80a21e5
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

Reviewers

@hauntsaninja hauntsaninja hauntsaninja approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@serhiy-storchaka @hauntsaninja @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.