File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,7 +4,9 @@ Changelog
44*unreleased *
55~~~~~~~~~~~~
66
7- No unreleased changes.
7+ Fixes:
8+
9+ * Support CPython 3.11.0-3.11.4 and older PyPy3.11 (:pull: `1055 `)
810
91126.0rc2 - 2026-01-12
1012~~~~~~~~~~~~~~~~~~~~
Original file line number Diff line number Diff line change @@ -176,8 +176,15 @@ def __ne__(self, other: object) -> bool:
176176
177177_VERSION_PATTERN_OLD = _VERSION_PATTERN .replace ("*+" , "*" ).replace ("?+" , "?" )
178178
179+ # Possessive qualifiers were added in Python 3.11.
180+ # CPython 3.11.0-3.11.4 had a bug: https://github.com/python/cpython/pull/107795
181+ # Older PyPy also had a bug.
179182VERSION_PATTERN = (
180- _VERSION_PATTERN_OLD if sys .version_info < (3 , 11 ) else _VERSION_PATTERN
183+ _VERSION_PATTERN_OLD
184+ if (sys .implementation .name == "cpython" and sys .version_info < (3 , 11 , 5 ))
185+ or (sys .implementation .name == "pypy" and sys .version_info < (3 , 11 , 13 ))
186+ or sys .version_info < (3 , 11 )
187+ else _VERSION_PATTERN
181188)
182189"""
183190A string containing the regular expression used to match a valid version.
You can’t perform that action at this time.
0 commit comments