From 2f5d876057c9bf1ef8eb0c3081f23d1f24bdad67 Mon Sep 17 00:00:00 2001 From: rco Date: Mon, 18 Jan 2021 11:41:57 +0100 Subject: [PATCH] Allow unsafe packages when compiling depdencies pip-compile considers several packages "unsafe" for pinning. However, we would like to be able to pin the pip version itself in requirements-dev ("pip" is one of these unsafe packages). Adding "--allow-unsafe" tells pip-compile to pin versions of "unsafe" packages. Despite the warning, there's no evidence of any unsafe effects from this, and pip-tools is considering deprecating this flag and making it the default behaviour anyway [1]. I've tested this locally and it seems to work without issue. [1]: https://github.com/jazzband/pip-tools/issues/806#issuecomment-493591664 --- Makefile | 4 ++-- requirements-dev.txt | 2 +- requirements.txt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 541d2cb..6fb81c1 100644 --- a/Makefile +++ b/Makefile @@ -4,5 +4,5 @@ sync: pip-sync requirements.txt update: - pip-compile --quiet requirements.in --output-file requirements.txt - pip-compile --quiet requirements-dev.in --output-file requirements-dev.txt + pip-compile --allow-unsafe --quiet requirements.in --output-file requirements.txt + pip-compile --allow-unsafe --quiet requirements-dev.in --output-file requirements-dev.txt diff --git a/requirements-dev.txt b/requirements-dev.txt index 7c3961a..4aa448f 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile # To update, run: # -# pip-compile --output-file=requirements-dev.txt requirements-dev.in +# pip-compile --allow-unsafe --output-file=requirements-dev.txt requirements-dev.in # appdirs==1.4.3 # via black astroid==2.4.0 # via pylint diff --git a/requirements.txt b/requirements.txt index f4f6cd2..0e0c846 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile # To update, run: # -# pip-compile --output-file=requirements.txt requirements.in +# pip-compile --allow-unsafe --output-file=requirements.txt requirements.in # certifi==2019.9.11 # via requests chardet==3.0.4 # via requests