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

Replace distutils.version with packaging.version.path #428

Closed
pquentin opened this issue Nov 12, 2021 · 2 comments
Closed

Replace distutils.version with packaging.version.path #428

pquentin opened this issue Nov 12, 2021 · 2 comments

Comments

@pquentin
Copy link

pquentin commented Nov 12, 2021

Using the pytest plugin on 3.11 (but 3.10 too) gives the following warning:

/home/runner/work/urllib3/urllib3/.nox/test-3-11/lib/python3.11/site-packages/pytest_freezegun.py:5: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.version import LooseVersion

One option to fix this is to use packaging.version.path: https://github.com/python-pillow/Pillow/pull/4797/files

cc @hugovk @jdufresne

@hugovk
Copy link
Contributor

hugovk commented Nov 12, 2021

I was wondering why I couldn't reproduce this, and then couldn't find the pytest-freezegun==0.4.2 version that urllib3 uses, and then noticed it's another library entirely!

This is freezegun, and that warning is from pytest-freezegun => https://github.com/ktosiek/pytest-freezegun

@boxed boxed closed this as completed Nov 12, 2021
@pquentin pquentin changed the title Replace distutils.version with packaging.verison.path Replace distutils.version with packaging.version.path Nov 12, 2021
@pquentin
Copy link
Author

Sorry about that. Thanks @hugovk for the help here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants