Skip to content

Commit 4f1a9a3

Browse files
committed
Reduce scope of pip warnings as errors
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 warning as error.
1 parent 141d5a0 commit 4f1a9a3

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

testkit/_common.py

Lines changed: 6 additions & 2 deletions
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

Lines changed: 4 additions & 3 deletions
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)