Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34k
Description
Documentation
Since Python 3.14,fnmatch.translate appends a lowercasez, whilst 3.13 and below used an uppercaseZ.
https://docs.python.org/3/library/fnmatch.html#fnmatch.translate makes no mention of this. Searching forfnmatch inhttps://docs.python.org/3/whatsnew/3.14.html only findshttps://docs.python.org/3/whatsnew/3.14.html#fnmatch .
> uvx --python=3.13 python -c "import fnmatch; print(fnmatch.translate('foo*'))"(?s:foo.*)\Z> uvx --python=3.14 python -c "import fnmatch; print(fnmatch.translate('foo*'))"(?s:foo.*)\z(noticed inpypa/distutils#381)
Edit:
After further research, the only mention I could find in "What's new in Python 3.14" ishttps://docs.python.org/3/whatsnew/3.14.html#re, which only says
Support
\zas a synonym for\Z
not that\z is now also used in place of\Z.
https://docs.python.org/3/howto/regex.html#more-metacharacters does mention that
\Z
The same as\z. For compatibility with old Python versions.
Up to you to see if this is worth acting upon. It did confuse me and I had a bit of a hard time finding reference for this change. But I understand if it's considered "implementation detail" and that distutils (setuptools)'s test validating a regex is too niche of a use-case to be worth documenting.
Linked PRs
Metadata
Metadata
Assignees
Projects
Status
Status