Closed fly50789 closed 1 year ago
Thank you for opening the issue. What is your local version of typing-extensions ? With astroid 2.13.2 it should be >= 4.0.0 (https://github.com/PyCQA/astroid/blob/f717084fea5ba9c030b7a8fe08336b7ee7b66b64/pyproject.toml#L39).
typing-extensions==3.10.0.0
ps. pass and fail has same typing-extensions version
only difference is astroid==2.13.2(Fail) and astroid==2.12.13(Pass)
all pkg version of fail pylint
linting: freeze> python -m pip freeze --all
linting: aniso8601==9.0.1,asgiref==3.4.1,astroid==2.12.13,atomicwrites==1.4.0,attrs==21.2.0,bcj-cffi==0.5.1,bcrypt==3.2.0,beautifulsoup4==4.9.3,bidict==0.21.2,Brotli==1.0.9,bs4==0.0.1,certifi==2021.5.30,cffi==1.14.5,charset-normalizer==2.0.3,click==7.1.2,color-it==2.1.3,colorama==0.4.4,coreapi==2.3.3,coreschema==0.0.4,coverage==6.3.2,cryptography==3.4.7,cycler==0.11.0,decorator==5.0.9,defusedxml==0.7.1,dill==0.3.6,Django==3.2.7,djangorestframework==3.12.4,dnspython==2.1.0,drf-yasg==1.20.0,eventlet==0.33.0,Flask==1.1.2,Flask-Cors==3.0.10,Flask-Login==0.5.0,Flask-RESTful==0.3.9,flask-restful-swagger-2==0.35,flask-restplus==0.13.0,Flask-SocketIO==4.3.1,Flask-SQLAlchemy==2.5.1,flask-swagger-ui==3.36.0,fonttools==4.28.5,future==0.18.2,greenlet==1.1.0,humanize==3.11.0,idna==3.2,importlib-metadata==4.3.1,inflection==0.5.1,iniconfig==1.1.1,iso8601==1.0.2,isort==5.11.4,itsdangerous==1.1.0,itypes==1.2.0,jeepney==0.8.0,Jinja2==2.11.3,jira==3.0.1,jsonschema==3.2.0,keyring==23.1.0,kiwisolver==1.3.2,lazy-object-proxy==1.9.0,ldap3==2.9,lxml==4.6.3,lz4==3.1.3,MarkupSafe==1.1.1,matplotlib==3.5.1,mccabe==0.7.0,multivolumefile==0.2.3,numpy==1.21.1,oauthlib==3.1.1,packaging==21.0,paramiko==2.7.2,Pillow==8.4.0,pip==22.3.1,platformdirs==2.6.2,pluggy==0.13.1,pretty-cron==1.2.0,psutil==5.8.0,py==1.10.0,py7zr==0.16.1,pyasn1==0.4.8,PyContracts==1.8.12,pycparser==2.20,pycryptodomex==3.10.1,pylint==2.15.9,PyMySQL==1.0.2,PyNaCl==1.4.0,pyOpenSSL==20.0.1,pyparsing==2.4.7,pyppmd==0.16.1,pyrsistent==0.18.0,pyserial==3.5,pytest==6.2.4,pytest-cov==3.0.0,python-dateutil==2.8.2,python-engineio==3.13.2,python-socketio==4.6.0,pytz==2021.1,pywin32-ctypes==0.2.0,PyYAML==5.4.1,pyzstd==0.14.4,reportlab==3.6.1,requests==2.26.0,requests-oauthlib==1.3.0,requests-toolbelt==0.9.1,robotbackgroundlogger==1.2,robotframework==4.1.1,ruamel.yaml==0.17.16,ruamel.yaml.clib==0.2.6,SecretStorage==3.3.3,setuptools==65.6.3,six==1.16.0,soupsieve==2.2.1,SQLAlchemy==1.4.17,sqlparse==0.4.2,Starter-Package @ file:///home/gitlab-runner/builds/yrhbVoRw/1/5g-o-ran/system-verification/tia/starter/.tox/.tmp/package/1/Starter-Package-2023.1.0b2.tar.gz,texttable==1.6.4,toml==0.10.2,tomli==2.0.1,tomlkit==0.11.6,typing-extensions==3.10.0.0,uritemplate==3.0.1,urllib3==1.26.6,Werkzeug==0.16.1,wheel==0.38.4,wrapt==1.14.1,WTForm==1.0,zipp==3.4.1
linting: commands[0]> pylint --rcfile=tox.ini src
I'm not sure why you're typing extensions was not upgraded to 4.0.0 or superior when installing astroid 2.13.2 but it should according to the metadata we provide when packaging astroid. Could you try to upgrade typing-extensions
manually ?
@Pierre-Sassoulas I use tox and manual to install pylint in venv and share same result.
(.venv) C:\Users\pega_user\Desktop\vs_project\other\ex3>pip freeze
astroid==2.13.2
colorama==0.4.6
dill==0.3.6
isort==5.11.4
lazy-object-proxy==1.9.0
mccabe==0.7.0
platformdirs==2.6.2
pylint==2.15.9
tomli==2.0.1
tomlkit==0.11.6
typing-extensions==4.4.0
wrapt==1.14.1
But after I set tox to install my pkg.
Sorry I dont know how pip to resolve Its dependence. Please tell me how to maintain its dependence if you know.
aniso8601==9.0.1
asgiref==3.4.1
astroid==2.13.2
atomicwrites==1.4.0
attrs==21.2.0
bcj-cffi==0.5.1
bcrypt==3.2.0
beautifulsoup4==4.9.3
bidict==0.21.2
Brotli==1.0.9
bs4==0.0.1
certifi==2021.5.30
cffi==1.14.5
charset-normalizer==2.0.3
click==7.1.2
color-it==2.1.3
colorama==0.4.4
coreapi==2.3.3
coreschema==0.0.4
coverage==6.3.2
cryptography==3.4.7
cycler==0.11.0
decorator==5.0.9
defusedxml==0.7.1
dill==0.3.6
Django==3.2.7
djangorestframework==3.12.4
dnspython==2.1.0
drf-yasg==1.20.0
eventlet==0.33.0
Flask==1.1.2
Flask-Cors==3.0.10
Flask-Login==0.5.0
Flask-RESTful==0.3.9
flask-restful-swagger-2==0.35
flask-restplus==0.13.0
Flask-SocketIO==4.3.1
Flask-SQLAlchemy==2.5.1
flask-swagger-ui==3.36.0
fonttools==4.28.5
future==0.18.2
greenlet==1.1.0
humanize==3.11.0
idna==3.2
importlib-metadata==4.3.1
inflection==0.5.1
iniconfig==1.1.1
iso8601==1.0.2
isort==5.11.4
itsdangerous==1.1.0
itypes==1.2.0
Jinja2==2.11.3
jira==3.0.1
jsonschema==3.2.0
keyring==23.1.0
kiwisolver==1.3.2
lazy-object-proxy==1.9.0
ldap3==2.9
lxml==4.6.3
lz4==3.1.3
MarkupSafe==1.1.1
matplotlib==3.5.1
mccabe==0.7.0
multivolumefile==0.2.3
numpy==1.21.1
oauthlib==3.1.1
packaging==21.0
paramiko==2.7.2
Pillow==8.4.0
platformdirs==2.6.2
pluggy==0.13.1
pretty-cron==1.2.0
psutil==5.8.0
py==1.10.0
py7zr==0.16.1
pyasn1==0.4.8
PyContracts==1.8.12
pycparser==2.20
pycryptodomex==3.10.1
pylint==2.15.9
PyMySQL==1.0.2
PyNaCl==1.4.0
pyOpenSSL==20.0.1
pyparsing==2.4.7
pyppmd==0.16.1
pyrsistent==0.18.0
pyserial==3.5
pytest==6.2.4
pytest-cov==3.0.0
python-dateutil==2.8.2
python-engineio==3.13.2
python-socketio==4.6.0
pytz==2021.1
pywin32-ctypes==0.2.0
PyYAML==5.4.1
pyzstd==0.14.4
reportlab==3.6.1
requests==2.26.0
requests-oauthlib==1.3.0
requests-toolbelt==0.9.1
robotbackgroundlogger==1.2
robotframework==4.1.1
ruamel.yaml==0.17.16
ruamel.yaml.clib==0.2.6
six==1.16.0
soupsieve==2.2.1
SQLAlchemy==1.4.17
sqlparse==0.4.2
-e git+ssh://git@oran-git.pegatroncorp.com/5g-o-ran/system-verification/tia/starter.git@7671ea4e9d6ecb9f55021c99d37555834fd4dcc2#egg=Starter_Package
texttable==1.6.4
toml==0.10.2
tomli==2.0.1
tomlkit==0.11.6
typing-extensions==3.10.0.0
uritemplate==3.0.1
urllib3==1.26.6
Werkzeug==0.16.1
wrapt==1.14.1
WTForm==1.0
zipp==3.4.1
There's probably a package requiring typing-extensions < 4 in your dependencies and there's a problem during dependencies resolution. Maybe this package is in fact following semver too restrictively and is cmpatible with 4 or more. Try that, then if that does not work you need to keep astroid in old version or wait for a compatible version of the other package.
@Pierre-Sassoulas Thanks your support!!
Bug description
error:
ImportError: cannot import name 'Self' from 'typing_extensions'
with astroid==2.13.2
I use tox to run pylint command.
And After I use astroid==2.12.13 can fix this bug.
tox setting
Configuration
No response
Command used
Pylint output
Expected behavior
normal run
Pylint version
OS / Environment
Linux
Additional dependencies
No response