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

Re-export distutils.dep_util through setuptools.modified #4069

Merged
merged 9 commits into from
Nov 19, 2023
1 change: 1 addition & 0 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def pytest_configure(config):
'setuptools/_vendor',
'pkg_resources/_vendor',
'setuptools/config/_validate_pyproject',
'setuptools/modified.py',
]


Expand Down
2 changes: 2 additions & 0 deletions docs/deprecated/distutils-legacy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.* <packaging:version>`
Expand Down
1 change: 1 addition & 0 deletions newsfragments/4069.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Exported ``distutils.dep_util`` and ``setuptools.dep_util`` through ``setuptools.modified`` -- by :user:`Avasam`
2 changes: 1 addition & 1 deletion setuptools/dep_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def __getattr__(name):
if name not in ['newer_pairwise_group']:
jaraco marked this conversation as resolved.
Show resolved Hide resolved
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,
)
Expand Down
8 changes: 8 additions & 0 deletions setuptools/modified.py
Original file line number Diff line number Diff line change
@@ -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']