From 11268fd23160ac53fd8dad7a2ff15e453678e159 Mon Sep 17 00:00:00 2001 From: Alex Zorin Date: Thu, 14 Jul 2022 11:20:14 +1000 Subject: [PATCH] pinning: strip extras from dependencies `poetry export` outputs in requirements.txt format, which is now apparently producing "dep[extra]==...". We are using this output as the constraints file for pip and pip's new resolver does not permit extras in the constraints file. This change filters out the extras specifiers. --- tools/pinning/common/export-pinned-dependencies.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/pinning/common/export-pinned-dependencies.sh b/tools/pinning/common/export-pinned-dependencies.sh index be6f0aa4e..89b45ea9c 100755 --- a/tools/pinning/common/export-pinned-dependencies.sh +++ b/tools/pinning/common/export-pinned-dependencies.sh @@ -40,5 +40,5 @@ fi poetry lock >&2 trap 'rm poetry.lock' EXIT -# We need to remove local packages from the output. -poetry export --without-hashes | sed '/^acme @/d; /certbot/d;' +# We need to remove local packages and extras specifiers from the output +poetry export --without-hashes | sed '/^acme @/d; /certbot/d; s/\[[^][]*\]//g;'