Nox session install not working
See original GitHub issueI have been following along, and I realise the articles are a few years old and poetry
, pip
etc. have moved along.
But when the install_with_constraints
function does the install it seems as though pip doesn’t like the constaints file.
Just wondering if this is something anyone else has seen and/or knows a way around?
$ nox -s black
nox > Running session black
nox > Creating virtual environment (virtualenv) using python3.10 in .nox/black
nox > poetry export --with dev --format=requirements.txt --output=/tmp/tmplk132qu3
nox > python -m pip install --constraint=/tmp/tmplk132qu3 black
nox > Command python -m pip install --constraint=/tmp/tmplk132qu3 black failed with exit code 1:
DEPRECATION: Constraints are only allowed to take the form of a package name and a version specifier. Other forms were originally permitted as an accident of the implementation, but were undocumented. The new implementation of the resolver no longer supports these forms. A possible replacement is replacing the constraint with a requirement. Discussion can be found at https://github.com/pypa/pip/issues/8210
ERROR: Constraints cannot have extras
nox > Session black failed.
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:7
Top Results From Across the Web
Configuration & API — Nox 2022.11.21 documentation
Use of session.install() is deprecated without a virtualenv since it modifies the global Python environment. If this is what you really want, use...
Read more >nox session doesn't find pytest installed by poetry #101 - GitHub
I just checked and the tests run without problem on the CI server. Running locally on my machine however gives the above error....
Read more >How to use the nox.session function in nox - Snyk
How to use the nox.session function in nox. To help you get started, we've selected a few nox examples, based on popular ways...
Read more >Get name of current nox session - Stack Overflow
This information is available at Session._runner.friendly_name : import nox @nox.session(python=['3.6', '3.7', '3.8', ...
Read more >nox-poetry documentation
session. ; run("pytest") ; Installation#. Install nox-poetry from the Python Package Index: $ pip install nox-poetry. Important: This package must be installed ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@accasey It’s actually two things:
constraints.txt
rather thanrequirements.txt
to take care of the error you had (doesn’t output the extras)--without-hashes
to take care of an error that came up when I changed the format to constraintsYes I see that now. Thanks again 😊