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
[Forward compatibility][BUG] pkg_resources.extern.VendorImporter lacks find_spec() method #2632
Comments
setuptools/pkg_resources/extern/__init__.py Lines 23 to 33 in ee6a5ff
setuptools/setuptools/extern/__init__.py Lines 23 to 33 in ee6a5ff
|
@hroncok pro tip: you can mark code blocks that have tracebacks with |
In that bug, @vstinner asks @brettcannon how to fix this issue — I think the answer would be more useful right here on GitHub rather than on bpo so I tag you both in case you want to comment here :) |
@hroncok @jaraco a more minimalist reproducer is $ python3.10 -W error -c 'import pkg_resources'
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 939, in _find_spec
AttributeError: 'VendorImporter' object has no attribute 'find_spec'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "~/.pyenv/versions/3.10-dev/lib/python3.10/site-packages/pkg_resources/__init__.py", line 74, in <module>
from pkg_resources.extern import appdirs
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1002, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 941, in _find_spec
File "<frozen importlib._bootstrap>", line 914, in _find_spec_legacy
ImportWarning: VendorImporter.find_spec() not found; falling back to find_module() $ python3.10 -m pip show setuptools
Name: setuptools
Version: 52.0.0
Summary: Easily download, build, install, upgrade, and uninstall Python packages
Home-page: https://github.com/pypa/setuptools
Author: Python Packaging Authority
Author-email: distutils-sig@python.org
License: UNKNOWN
Location: ~/.pyenv/versions/3.10-dev/lib/python3.10/site-packages
Requires:
Required-by: (I used |
This change makes the import warning emitted by Python 3.10 disappear but implementing the hook that is supposed to replace the old import mechanism. Refs: * https://bugs.python.org/issue42134 * https://bugs.python.org/issue43540 * pypa#2632 (comment) Fixes pypa#2632
This change makes the import warning emitted by Python 3.10 disappear but implementing the hook that is supposed to replace the old import mechanism. Refs: * https://bugs.python.org/issue42134 * https://bugs.python.org/issue43540 * pypa#2632 (comment) Fixes pypa#2632
This change makes the import warning emitted by Python 3.10 disappear but implementing the hook that is supposed to replace the old import mechanism. Refs: * https://bugs.python.org/issue42134 * https://bugs.python.org/issue43540 * pypa#2632 (comment) Fixes pypa#2632 Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
tox/pytest are running into this issue: pypa/setuptools#2632
tox/pytest are running into this issue: pypa/setuptools#2632
tox/pytest are running into this issue: pypa/setuptools#2632
tox/pytest are running into this issue: pypa/setuptools#2632
tox/pytest are running into this issue: pypa/setuptools#2632
tox/pytest are running into this issue: pypa/setuptools#2632
author Christian Theune <ct@flyingcircus.io> 1621585346 +0200 committer Eli Kogan-Wang <elikowa@gmail.com> 1694227372 +0200 Try enabling Python 3.10 support in github actions / tox Pin setuptools versions for development tox/pytest are running into this issue: pypa/setuptools#2632 We need a newer setuptools to fix a Python 3.10 issue. bump (transitive) six dependency to force Python 3.10 compatibility Grrr. Keep poking tox to pick up my Python 3.10 locally properly. Update tox.ini Co-authored-by: Jürgen Gmach <juergen.gmach@googlemail.com> update lock files enable python 3.11, too. fix test with changed output update dev dependency update dev dependencies, hopefully to fix 3.11 update appenv to include setuptools pinning
setuptools version
54.1.2 and main
Python version
3.10.0a7
OS
All
Additional environment information
When running tests for setuptools_scm.
Description
We get:
The traceback is not very helpful, but the VendorImporter is from pkg_resourecs.
Python added a warning: https://bugs.python.org/issue42134 but other packages treat it as error.
Expected behavior
No ImportWarning.
How to Reproduce
$ sudo dnf --enablerepo=updates-testing install python3.10 tox
)tox -e py310-test
Output
Code of Conduct
I agree to follow the PSF Code of Conduct
The text was updated successfully, but these errors were encountered: