summaryrefslogtreecommitdiffstats
path: root/Lib/logging
diff options
context:
space:
mode:
authorPeeyush Aggarwal <peeyushaggarwal94@gmail.com>2023-08-25 08:15:26 (GMT)
committerGitHub <noreply@github.com>2023-08-25 08:15:26 (GMT)
commit8d4052075ec43ac1ded7d2fa55c474295410bbdc (patch)
tree41bddcac68715c0e0174b62dd916e33bbf894d3a /Lib/logging
parent135098743a0fae0efbcd98e35458e5bc721702e9 (diff)
downloadcpython-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.py2
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 = {