-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
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
gh-91760: More strict rules for numerical group references and group names in RE #91792
Conversation
…group names in RE Only sequence of ASCII digits not starting with 0 (except group 0) is now accepted as a numerical reference. The group name in bytes patterns and replacement strings can now only contain ASCII letters and digits and underscore.
3f533f8
to
8909d14
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also not sure about forbidding the leading 0
, since it feels like a special case that only makes things more complicated and inconsistent with other implementations.
When you're done making the requested changes, leave the comment: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR adds restrictions without deprecation. See also #91794.
I have made the requested changes; please review again. |
Thanks for making the requested changes! @ezio-melotti: please review the changes made to this pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Are you still planning to add a deprecation warning?
See #91794. |
What's that DO-NOT-MERGE label for |
Oh, I forget to remove it. It meant that the PR should not be merged by accident in 3.11. |
Only sequence of ASCII digits
not starting with 0 (except group 0)isnow accepted as a numerical reference.
The group name in bytes patterns and replacement strings can now only
contain ASCII letters and digits and underscore.
Closes #91760.