diff --git a/conftest.py b/conftest.py index 94d5cdd8b5..8dcf7e6805 100644 --- a/conftest.py +++ b/conftest.py @@ -37,6 +37,7 @@ def pytest_configure(config): 'setuptools/_vendor', 'pkg_resources/_vendor', 'setuptools/config/_validate_pyproject', + 'setuptools/modified.py', ] diff --git a/docs/deprecated/distutils-legacy.rst b/docs/deprecated/distutils-legacy.rst index 8112f12eae..166fcd584a 100644 --- a/docs/deprecated/distutils-legacy.rst +++ b/docs/deprecated/distutils-legacy.rst @@ -28,6 +28,8 @@ As Distutils is deprecated, any usage of functions or objects from distutils is ``distutils.command.{build_clib,build_ext,build_py,sdist}`` → ``setuptools.command.*`` +``distutils.dep_util`` → ``setuptools.modified`` + ``distutils.log`` → :mod:`logging` (standard library) ``distutils.version.*`` → :doc:`packaging.version.* ` diff --git a/newsfragments/4069.feature.rst b/newsfragments/4069.feature.rst new file mode 100644 index 0000000000..64a0af5d41 --- /dev/null +++ b/newsfragments/4069.feature.rst @@ -0,0 +1 @@ +Exported ``distutils.dep_util`` and ``setuptools.dep_util`` through ``setuptools.modified`` -- by :user:`Avasam` diff --git a/setuptools/dep_util.py b/setuptools/dep_util.py index 2d8cc5217d..e30cd41b49 100644 --- a/setuptools/dep_util.py +++ b/setuptools/dep_util.py @@ -7,7 +7,7 @@ def __getattr__(name): if name not in ['newer_pairwise_group']: raise AttributeError(name) warnings.warn( - "dep_util is Deprecated. Use functions from setuptools instead.", + "dep_util is Deprecated. Use functions from setuptools.modified instead.", DeprecationWarning, stacklevel=2, ) diff --git a/setuptools/modified.py b/setuptools/modified.py new file mode 100644 index 0000000000..af6ceeac89 --- /dev/null +++ b/setuptools/modified.py @@ -0,0 +1,8 @@ +from ._distutils._modified import ( + newer, + newer_pairwise, + newer_group, + newer_pairwise_group, +) + +__all__ = ['newer', 'newer_pairwise', 'newer_group', 'newer_pairwise_group']