Skip to content

Commit 0e54060

Browse files
committed
Tell pip-compile not to include backports.asyncio.runner
The package backports.asyncio.runner is a transitive dependency that should only be installed for Python < 3.11. It doesn't need to be in the requirements files we produce, and conversely, letting `pip-compile` include it leads to installation failures with some Python versions. We can tell `pip-compile` to omit it and this solves the problem.
1 parent 8d22843 commit 0e54060

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

dev_tools/requirements/run-pip-compiles.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ def pip_compile(env_name: str, env_recipe: EnvRecipe, env_out_dir: str, constrai
100100
"pip-compile",
101101
f"--output-file={env_out_dir}/{env_name}.env.txt",
102102
"--resolver=backtracking",
103+
# The following is a transitive dependency that should only be
104+
# installed for Python < 3.11. It doesn't need to be in the
105+
# requirements files we produce, so tell pip-compile to omit it.
106+
"--unsafe-package", "backports.asyncio.runner",
103107
]
104108
+ dep_args
105109
)

0 commit comments

Comments
 (0)