Skip to content

Commit 307349e

Browse files
authored
Reduce scope of pip warnings as errors (#954)
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 66963be commit 307349e

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-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: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
if __name__ == "__main__":
1111
run_python(["setup.py", "build"])
12-
run_python(["-m", "pip", "install", "-U", "pip"])
13-
run_python(["-m", "pip", "install", "-Ur",
14-
"testkitbackend/requirements.txt"])
12+
run_python(["-m", "pip", "install", "-U", "pip"], warning_as_error=False)
13+
run_python(
14+
["-m", "pip", "install", "-Ur", "testkitbackend/requirements.txt"],
15+
warning_as_error=False
16+
)

0 commit comments

Comments
 (0)