Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we use regular nox (and not the special native-venv nox fork?) #508

Closed
itsayellow opened this issue Sep 29, 2020 · 5 comments · Fixed by #512
Closed

Can we use regular nox (and not the special native-venv nox fork?) #508

itsayellow opened this issue Sep 29, 2020 · 5 comments · Fixed by #512

Comments

@itsayellow
Copy link
Contributor

How would this feature be useful?

If we switched to regular nox (and not @cs01's) fork we could normalize our flow and take advantage of nox development and bug fixes.

Describe the solution you'd like

The comment in noxfile.py says to use @cs01's fork of nox...

# until this is fixed in nox. See
# https://github.com/theacodes/nox/issues/199

Currently nox wntrblm/nox#199 is closed, and a patch (wntrblm/nox#231) merged. nox has option @nox.session(venv_backend='venv') that can allow the use of a venv backend.

Can we switch to this now? Is there any reason to keep using the special fork of nox?

Describe alternatives you've considered

Alternative would be to keep doing what we're doing. However I'm starting to wonder how stale the special fork of nox is getting.

@uranusjr
Copy link
Member

Is the venv-virtualenv distinction actually relevant now? virtualenv now uses the same mechanism as venv on Python 3.

@itsayellow
Copy link
Contributor Author

I just tried plain nox with venv_backend='venv' and at least that works fine.

I'm waiting for #509 to land before doing more testing.

@itsayellow
Copy link
Contributor Author

Ok, also plain nox and no special venv_backend works. (Meaning virtualenv works as @uranusjr suggested). I disabled the assert_not_in_virtualenv() helper to test this.

@cs01 what used to break in the tests with virtualenv? Would it be obvious (like tests failing) or was it something more subtle to look out for?

@cs01
Copy link
Member

cs01 commented Oct 2, 2020

The issue was that from within a nox task, virtual environments were not able to be created. This is a corner case for nox usage that obviously pipx exploits heavily.

IIRC it had to do primarily with the python path resolution. If it works on vanilla nox now, that is great. I have been stressing about my custom nox branch for a while, so I am happy to delete it if things are working now.

@cs01
Copy link
Member

cs01 commented Oct 2, 2020

The assert_not_in_virtualenv() wasn't a venv vs virtualenv thing, it was just that creating a virtual environment from within one was failing (I think). It was a way to make the test fail earlier with a more obvious error message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants