-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
gh-103384: Generalize the regex pattern BaseConfigurator.INDEX_PATTERN
to allow spaces and non-alphanumeric characters in keys.
#103391
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
Conversation
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
I think a test with some special characters would also be useful :) |
Makes sense. Thanks for the suggestions. I will add some of those combinations. |
I'd also add tests for some edge cases like the empty string (if we want to allow that) and multiple nesting levels e.g. |
I have added a new nested dictionary to the existing template we use in the test. Added new assertions specifically for the nested cases.
Update: Added this anyways. |
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.
Thanks for the PR!
Misc/NEWS.d/next/Library/2023-04-09-05-30-41.gh-issue-103384.zAV7iB.rst
Outdated
Show resolved
Hide resolved
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
BaseConfigurator.INDEX_PATTERN
to allow spaces and non-alphanumeric characters in keys.BaseConfigurator.INDEX_PATTERN
to allow spaces and non-alphanumeric characters in keys.
…AV7iB.rst Co-authored-by: Vinay Sajip <[email protected]>
Misc/NEWS.d/next/Library/2023-04-09-05-30-41.gh-issue-103384.zAV7iB.rst
Outdated
Show resolved
Hide resolved
I have made the requested changes; please review again. |
Thanks for making the requested changes! @vsajip: please review the changes made to this pull request. |
BaseConfigurator.INDEX_PATTERN
to allow spaces and non-alphanumeric characters in keys.BaseConfigurator.INDEX_PATTERN
to allow spaces and non-alphanumeric characters in keys.
@vsajip |
Sorry I've not had time to look at this. Hope to get to it soon. |
Should this be backported? |
Perhaps - it's arguable whether it's an enhancement or could have been considered a documentation bug. |
Ok; if no backport is needed, we should close the linked issue. |
The issue described a broken regex pattern in the logging module.
Fixed the regex and added tests for the same.
logging.config
cfg
protocol rejects non-alphanumeric names, contrary to the documentation #103384