pytest-freezegun
pytest-freezegun copied to clipboard
Replace distutils.version with packaging.version.path
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
Please see PR https://github.com/ktosiek/pytest-freezegun/pull/36.
Following...
I would love to see this merged
Please see PR https://github.com/ktosiek/pytest-freezegun/pull/38 as an alternative.
+1
Please see #44 - this package is abandoned and should not be used. Use pytest-freezer
instead.
Placing a link to pytest-freezer
for easier navigation: https://github.com/pytest-dev/pytest-freezer