Skip to content
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

pytest-virtualenv uses deprecated distutils #188

Open
jaraco opened this issue Nov 10, 2021 · 2 comments
Open

pytest-virtualenv uses deprecated distutils #188

jaraco opened this issue Nov 10, 2021 · 2 comments

Comments

@jaraco
Copy link
Contributor

jaraco commented Nov 10, 2021

In pypa/setuptools#2865 (comment), I learned that pytest-virtualenv is importing distutils, which raises Warnings (treated as errors) in the Setuptools test suite when Setuptools is attempting to supply the distutils module. Distutils is deprecated in Python 3.10 and slated for removal in Python 3.12, so should be removed from this package.

@jaraco
Copy link
Contributor Author

jaraco commented Nov 10, 2021

In pypa/setuptools#2865 (comment), I learned the issue is more complicated on PyPy, because pytest-virtualenv imports pkg_resources, which implicitly loads the working set which triggers behavior of invoking sysconfig.get_platform(), which on PyPy imports distutils.spawn.

So to fully get rid of distutils import behavior including PyPy, one will also need to avoid pkg_resources.

@eeaston eeaston reopened this Nov 19, 2021
@jaraco
Copy link
Contributor Author

jaraco commented Nov 19, 2021

So grateful to see this being incorporated!

aflag added a commit that referenced this issue Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants