pytest-freezegun icon indicating copy to clipboard operation
pytest-freezegun copied to clipboard

Replace distutils.version with packaging.version.path

Open pquentin opened this issue 3 years ago • 8 comments

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 as done by @hugovk here: https://github.com/python-pillow/Pillow/pull/4797/files

Initial reported in https://github.com/spulec/freezegun/issues/428 by mistake

pquentin avatar Nov 12 '21 14:11 pquentin

Please see PR https://github.com/ktosiek/pytest-freezegun/pull/36.

hugovk avatar Nov 12 '21 16:11 hugovk

Following...

psi29a avatar Feb 04 '22 09:02 psi29a

I would love to see this merged

julian-r avatar Mar 15 '22 14:03 julian-r

Please see PR https://github.com/ktosiek/pytest-freezegun/pull/38 as an alternative.

hugovk avatar Apr 08 '22 10:04 hugovk

+1

knaou avatar Oct 29 '23 17:10 knaou

Please see #44 - this package is abandoned and should not be used. Use pytest-freezer instead.

jaraco avatar Oct 29 '23 22:10 jaraco

Placing a link to pytest-freezer for easier navigation: https://github.com/pytest-dev/pytest-freezer

Alexander-Serov avatar Mar 04 '24 09:03 Alexander-Serov