-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into error-on-all-file-changes
- Loading branch information
Showing
8 changed files
with
32,064 additions
and
33,443 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import subprocess | ||
import sys | ||
|
||
# This code needs to support all versions of Python we test against | ||
proc = subprocess.Popen( | ||
[sys.executable] + sys.argv[1:], | ||
stdout=subprocess.PIPE, | ||
stderr=subprocess.PIPE, | ||
) | ||
proc.wait() | ||
|
||
out = proc.stdout.read() | ||
err = proc.stderr.read() | ||
|
||
if proc.returncode == 0: | ||
print(out) | ||
elif b"does not support python" in err: | ||
print(err) | ||
else: | ||
print(err) | ||
raise SystemExit("Failed") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env python | ||
import sys | ||
|
||
# /!\ This version compatibility check section must be Python 2 compatible. /!\ | ||
PYTHON_REQUIRES = ({major}, {minor}) | ||
|
||
if PYTHON_REQUIRES != (0, 0): | ||
def version_str(version): # type: ignore | ||
return ".".join(str(v) for v in version) | ||
|
||
if sys.version_info[:2] < PYTHON_REQUIRES: | ||
raise SystemExit( | ||
"This version of pip does not support python " + | ||
version_str(sys.version_info[:2]) + | ||
" (requires >= " + | ||
version_str(PYTHON_REQUIRES) + | ||
")." | ||
) | ||
# /!\ Version check done. We can use Python 3 syntax now. /!\ | ||
|
||
import os | ||
import runpy | ||
|
||
lib = os.path.dirname(__file__) | ||
sys.path.insert(0, lib) | ||
runpy.run_module("pip", run_name="__main__") |