Skip to content

Commit b8aa21b

Browse files
committed
Revert __pip-runner__.py changes
1 parent ebe491a commit b8aa21b

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

setup.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,5 @@ def get_version(rel_path: str) -> str:
8181
],
8282
},
8383
zip_safe=False,
84-
# NOTE: python_requires is duplicated in __pip-runner__.py.
85-
# When changing this value, please change the other copy as well.
8684
python_requires=">=3.7",
8785
)

src/pip/__pip-runner__.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
from typing import Optional, Sequence, Union
1313

1414
PIP_SOURCES_ROOT = dirname(dirname(__file__))
15-
# Copied from setup.py
16-
PYTHON_REQUIRES = ">=3.7"
1715

1816

1917
class PipImportRedirectingFinder:
@@ -32,21 +30,7 @@ def find_spec(
3230
return spec
3331

3432

35-
def check_python_version() -> None:
36-
# Import here to ensure the imports happen after the sys.meta_path change.
37-
from pip._vendor.packaging.specifiers import SpecifierSet
38-
from pip._vendor.packaging.version import Version
39-
40-
py_ver = Version("{0.major}.{0.minor}.{0.micro}".format(sys.version_info))
41-
if py_ver not in SpecifierSet(PYTHON_REQUIRES):
42-
raise SystemExit(
43-
f"This version of pip does not support python {py_ver} "
44-
f"(requires {PYTHON_REQUIRES})"
45-
)
46-
47-
4833
sys.meta_path.insert(0, PipImportRedirectingFinder())
4934

5035
assert __name__ == "__main__", "Cannot run __pip-runner__.py as a non-main module"
51-
check_python_version()
5236
runpy.run_module("pip", run_name="__main__", alter_sys=True)

0 commit comments

Comments
 (0)