-
-
Notifications
You must be signed in to change notification settings - Fork 281
astroid 2.13.0 uses typing_extensions on Python 3.10 but does not require it there #1942
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@Pierre-Sassoulas Shall we release a hot fix and |
Yeah definitely. I'm on mobile right now so I can't release. Also thé maintenance branche is not ready sorry. But we Can release directly from main in this case |
I'm on mobile as well. No rush as it is the weekend and we haven't release |
This doesn't seem to be fixed yet. typing-extensions isn't installed on Python 3.10 due to the Python version check here: https://github.com/PyCQA/astroid/blob/82b80d9c588e394afe9c61165b484a0944a4b352/pyproject.toml#L39 Sample job output: |
Thank you for the head up @mathiascode, it was due to |
Thanks for the fix, much appreciated! |
Steps to reproduce
In a virtual Python environment with Python 3.10 that does not have typing_extensions installed:
pip install pylint
pylint --version
This only happens on Python 3.10, not on <=3.9 or 3.11
Test runs with different OS and Python versions: https://github.com/pywbem/nocaselist/actions/runs/3864593150
Current behavior
Pylint fails with astroid trying to import from typing_extensions. However, typing_extensions is not installed because astroid 2.13.0 does not require it in its distribution on Python 3.10:
Expected behavior
should not fail
Looking at the requirement for typing_extensions in pyproject.toml and at the import in astroid/constraints.py, it seems that a mismatch of the Python version between those two for Python 3.10 is the reason for the issue.
python -c "from astroid import __pkginfo__; print(__pkginfo__.version)"
outputThis command does not work on Python 3.10 because of missing typing_extensions.
When installing typing_extensions manually, it shows:
pipdeptree -p pylint
outputThe text was updated successfully, but these errors were encountered: