Skip to content

Commit f028ded

Browse files
authoredJul 18, 2023
Reduce scope of pip warnings as errors (#947)
The CI has been failing too often recently because of changes in pip and dependencies. Those failures were mostly irrelevant warning that we turned into errors for better visibility. However, so far there was never any action we needed to take other than muting that warning on or the other way. Therefore, this commit changes it so that all pip installation calls are run without treating warnings as error.
1 parent 141d5a0 commit f028ded

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed
 

‎testkit/_common.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,9 @@ def run(args, env=None):
1313
)
1414

1515

16-
def run_python(args, env=None):
17-
run([TEST_BACKEND_VERSION, "-u", "-W", "error", *args], env=env)
16+
def run_python(args, env=None, warning_as_error=True):
17+
cmd = [TEST_BACKEND_VERSION, "-u"]
18+
if warning_as_error:
19+
cmd += ["-W", "error"]
20+
cmd += list(args)
21+
run(cmd, env=env)

‎testkit/build.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929

3030
if __name__ == "__main__":
31-
run_python(["-m", "pip", "install", "-U", "pip"])
32-
run_python(["-m", "pip", "install", "--use-pep517", "-Ur",
33-
"requirements-dev.txt"])
31+
run_python(["-m", "pip", "install", "-U", "pip"],
32+
warning_as_error=False)
33+
run_python(["-m", "pip", "install", "-Ur", "requirements-dev.txt"],
34+
warning_as_error=False)

0 commit comments

Comments
 (0)