diff --git a/.github/ci_requirements.txt b/.github/ci_requirements.txt index 04b8b104..a9c8f26d 100644 --- a/.github/ci_requirements.txt +++ b/.github/ci_requirements.txt @@ -1,2 +1,2 @@ -poetry==1.1.9 +poetry==1.3.2 nox==2022.1.7 diff --git a/noxfile.py b/noxfile.py index 028b306f..7c6006a1 100644 --- a/noxfile.py +++ b/noxfile.py @@ -21,6 +21,14 @@ def install_with_constraints(session, *args, **kwargs): f"--output={requirements.name}", external=True, ) + # Using sed to remove extras from the constraints file, thereby fixing the + # error "Constraints cannot have extras". A better solution might be to + # use `poetry install --only dev` but this requires a newer version of + # Poetry than we're using in our development environments. See + # https://github.com/jazzband/pip-tools/issues/1300#issuecomment-818122483 + # for more info relating to the sed solution + sed_expression = r"s/\[.*\]//g" + session.run("sed", "-i", sed_expression, requirements.name, external=True) session.install(f"--constraint={requirements.name}", *args, **kwargs) try: