diff options
author | Peeyush Aggarwal <peeyushaggarwal94@gmail.com> | 2023-08-25 08:15:26 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-25 08:15:26 (GMT) |
commit | 8d4052075ec43ac1ded7d2fa55c474295410bbdc (patch) | |
tree | 41bddcac68715c0e0174b62dd916e33bbf894d3a /Lib/logging | |
parent | 135098743a0fae0efbcd98e35458e5bc721702e9 (diff) | |
download | cpython-8d4052075ec43ac1ded7d2fa55c474295410bbdc.zip cpython-8d4052075ec43ac1ded7d2fa55c474295410bbdc.tar.gz cpython-8d4052075ec43ac1ded7d2fa55c474295410bbdc.tar.bz2 |
gh-103384: Generalize the regex pattern `BaseConfigurator.INDEX_PATTERN` to allow spaces and non-alphanumeric characters in keys. (GH-103391)
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Diffstat (limited to 'Lib/logging')
-rw-r--r-- | Lib/logging/config.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/logging/config.py b/Lib/logging/config.py index a68281d..41283f4 100644 --- a/Lib/logging/config.py +++ b/Lib/logging/config.py @@ -378,7 +378,7 @@ class BaseConfigurator(object): WORD_PATTERN = re.compile(r'^\s*(\w+)\s*') DOT_PATTERN = re.compile(r'^\.\s*(\w+)\s*') - INDEX_PATTERN = re.compile(r'^\[\s*(\w+)\s*\]\s*') + INDEX_PATTERN = re.compile(r'^\[([^\[\]]*)\]\s*') DIGIT_PATTERN = re.compile(r'^\d+$') value_converters = { |