Skip to content

Commit

Permalink
Merge pull request pypa#4069 from Avasam/distutils.dep_util
Browse files Browse the repository at this point in the history
Re-export `distutils.dep_util` through `setuptools.modified`
  • Loading branch information
jaraco committed Nov 19, 2023
2 parents f2a45e8 + 546e5b8 commit a2d4a4e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions conftest.py
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
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
@@ -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
Expand Up @@ -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,
)
Expand Down
8 changes: 8 additions & 0 deletions 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']

0 comments on commit a2d4a4e

Please sign in to comment.