diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2022-07-24 13:00:23 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2022-07-24 13:00:23 -0400 |
commit | ab10c2234c4cce6061f673341e24f2d3e45acf32 (patch) | |
tree | 6b0783854fca976b428b97c161f7312f2bf696f7 | |
parent | 417018d3299bb33e87d2fccec48790cf3e9dd797 (diff) | |
download | python-setuptools-git-feature/limit-distutils-hack-pip-workaround.tar.gz |
Limit the workaround to Python 3.9 and earlier and add a note to remove the hack altogether in ~6 mo.feature/limit-distutils-hack-pip-workaround
-rw-r--r-- | _distutils_hack/__init__.py | 6 | ||||
-rw-r--r-- | changelog.d/3460.change.rst | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/_distutils_hack/__init__.py b/_distutils_hack/__init__.py index f987a536..24310637 100644 --- a/_distutils_hack/__init__.py +++ b/_distutils_hack/__init__.py @@ -141,7 +141,13 @@ class DistutilsMetaFinder: """ Ensure stdlib distutils when running under pip. See pypa/pip#8761 for rationale. + + In pypa/pip#11298, pip added its own workaround, obviating + the need for this one. After 2023-02-01, remove this workaround. """ + # late versions of pip no longer have this issue on Python 3.10+ + if sys.version_info > (3, 10): + return if self.pip_imported_during_build(): return clear_distutils() diff --git a/changelog.d/3460.change.rst b/changelog.d/3460.change.rst new file mode 100644 index 00000000..129e909c --- /dev/null +++ b/changelog.d/3460.change.rst @@ -0,0 +1 @@ +Limit the scope of the _distutils_hack workaround for pip. |