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
I'm too naïve, mypy isn't ready yet when bringing PEP696 into equation, even with newest mypy 1.12 and python 3.13:
lxml-stubs\etree\_element.pyi:229: error: Type parameter default types not supported when using Python 3.12 type parameter syntax [misc]
class _ElementTree[E: _Element = _Element]:
Apparently still being worked on (python/mypy#14851). pyright does fine since 1.1.351 (or before).
Turns out lack of PEP696 support is a lesser problem. mypyrequires python 3.12 to type check code with new Generic syntax, and --python-version argument is ignored if the python interpreter running mypy isn't at least 3.12. This means project maintainers using types-lxml are forced to use py3.12 as minimum dependency, otherwise they can't type check their code.
Throwing mypy out of window isn't an option here; it would be a great disservice to those using this annotation package. The only other option is to wait till Python 3.11 is EOLed and make an excuse that we don't support EOLed python versions.
abelcheung
changed the title
Full PEP 695+696 support
Full PEP 695+696 support (after Autumn 2027)
Oct 15, 2024
(Won't happen anytime soon, unless ditching
mypy
support right here and right now)Withmypy 1.11
requirement present, the time is probably ripe for support of full type parameter syntax (def func[T](...)
).The text was updated successfully, but these errors were encountered: