Skip to content

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

@pquentin

Description

@pquentin

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 spulec/freezegun#428 by mistake

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions