-
Notifications
You must be signed in to change notification settings - Fork 3k
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
tox -e lint doesn't work from behind a proxy #7599
Comments
Adding |
What about |
Yep, that worked :-) The docs say to use tox. Is that something that should change, or is using nox "unofficial" for now? The nox version doesn't check uncommitted changes, which sucks a bit. Looks like running via tox does pick these up, so I guess tox is "better". |
The commands being run are the exact same in tox and nox, so I'm not sure what difference you're seeing (and there's not enough context to make out what might be the cause - note that pre-commit gets the list of files from git, so if git doesn't track a file, pre-commit checks don't run on it). Once nox can be invoked with arbitrary interpreters, we should go ahead and drop tox entirely from our tool chain IMO. |
Yeah, I don't really know what happened myself. I'm on my slow laptop at the moment and runtimes of 10 minutes or more don't lend themselves to iteratively checking what's going on :-( I'll try to do some proper investigation (of both this and the test suite - I got lots of failures when I "just ran" the test suite, but I think it's because on Windows we need some extra arguments to skip tests that don't work there, and I don't recall what those args are right now) when I switch to the good laptop later. But this is why I've previously tended to let CI do the work for me - if I'm going to have to leave things to run in the background, I might as well do so on someone else's server :-) |
Oh, if additional arguments are needed to run pip's tests out of the box, that's not right. |
Tox does not pass all environment variables when it runs commands. Nox OTOH passes all environment variables by default. That would explain why you need to set |
Yeah, my feeling is that this reflects the difference in design focus of the 2 tools. Both are technically for running tests, but nox feels more general-purpose. Protecting tests from being messed up by environment settings seems like a good goal. Conversely, not having automations break because they rely on user-specific config via environment settings also seems like a good idea. Maybe we should have I'll create a PR for that. |
Actually, I also raised tox-dev/tox#1498 |
I agree that we should fix our tox configuration. |
The commands to run the tests on Windows (from the CI config) are:
Those work. But just I'll make this comment into a separate issue, but honestly I don't want to spend a lot of time fighting the test suite into submission on Windows, particularly if it involves trashing my system Python on a regular basis 🙁 So if anyone else wants to pick this up, they are welcome to do so. |
Environment
Running tox 3.14.4, pre-commit 1.21.0
Description
I'm running behind a proxy with environment variables
http{s}_proxy
set. When I runtox -e lint
a git call inpre-commit
fails with a network error. Investigation shows that the git command is run in an environment without my proxy variables.This is almost certainly an issue with tox or pre-commit, and not directly with pip. But I don't have time right now to debug, and I wanted to record the problem somewhere. My main development machine doesn't need a proxy, so this is not critical for me, but I'll look into it more when I get the chance.
Expected behavior
Proxy settings are passed to git.
How to Reproduce
See above
Output
The text was updated successfully, but these errors were encountered: