You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
strptime() fails to parse month names containing İ (U+0130) #136028
strptime() fails to parse month names containing "İ" (U+0130, LATIN CAPITAL LETTER I WITH DOT ABOVE) like "İyun" or "İyul". This affects locales 'az_AZ', 'ber_DZ', 'ber_MA' and 'crh_UA'.
This happens because 'İ'.lower() == 'i\u0307', but the re module only supports 1-to-1 character matching in case-insensitive mode.
There are several ways to fix this:
Do not convert month names (and any other names) to lower case in _strptime.LocaleTime. This is a large change and it would make converting names to indices more complex and/or slower. This is universal way which would work with any other letters which are converted to multiple characters in lower case (but currently 'İ' the only such case in Linux locales).
Just fix the regular expressions created from lower-cased month names. This only works for 'İ' in month names, but this is all that is needed for now.
The third way -- converting the input string to lower case before parsing -- does not work, because Z for timezone is case-sensitive.
Activity
pythongh-136028: Fix parsing month names containing "İ" (U+0130) in s…
pythongh-136028: Fix parsing month names containing "İ" (U+0130) in s…
pythongh-136028: Fix parsing month names containing "İ" (U+0130) in s…
gh-136028: Fix parsing month names containing "İ" (U+0130) in strptim…
pythongh-136028: Fix parsing month names containing "İ" (U+0130) in s…
pythongh-136028: Fix parsing month names containing "İ" (U+0130) in s…
[3.13] gh-136028: Fix parsing month names containing "İ" (U+0130) in …
[3.14] gh-136028: Fix parsing month names containing "İ" (U+0130) in …
pythongh-136028: Fix parsing month names containing "İ" (U+0130) in s…
pythongh-136028: Fix parsing month names containing "İ" (U+0130) in s…
pythongh-136028: Fix parsing month names containing "İ" (U+0130) in s…
pythongh-136028: Fix parsing month names containing "İ" (U+0130) in s…