-
-
Notifications
You must be signed in to change notification settings - Fork 522
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
Ability to disable provisioning #1921
Comments
Provisioning is meant to pull in the plugins so having a plugin that alters how you pull in plugins seems very meta. There has been no thought put into this behavior and overriding |
In Fedora, we use tox to run the upstream tests when we build the RPM packages. Unlike regular tox users, we don't want to install packages from PyPI to a virtual environment, because we need to test integration with other Fedora packages. We have created a plugin for our needs. More details about the use case are in the README. https://github.com/fedora-python/tox-current-env
This all works unless tox determines it needs provision. With provisioning, the situation differs depending on internet availability. When online:
When offline:
What I'd like to do instead:
|
I'll get back to you tomorrow on this, need to have a think about what's good approach here. |
Thanks. I'd also be happy to talk about it over chat or video if you'd prefer. |
Can you join discord.gg/tox? |
@hroncok if you can join Discord now 🙇🏻 |
Conclusion: @hroncok will create a PR against v3 to add a {
"minversion": "3.2.1",
"requires": ["PEP-440"]
} |
tox can now be invoked with a new --no-provision flag that prevents provision, if requires or minversion are not satisfied, tox will fail; if a path is specified as an argument to the flag (e.g. as `tox --no-provision missing.json`) and provision is prevented, provision metadata are written as JSON to that path. Fixes tox-dev#1921
tox can now be invoked with a new --no-provision flag that prevents provision, if requires or minversion are not satisfied, tox will fail; if a path is specified as an argument to the flag (e.g. as `tox --no-provision missing.json`) and provision is prevented, provision metadata are written as JSON to that path. Fixes tox-dev#1921
tox can now be invoked with a new --no-provision flag that prevents provision, if requires or minversion are not satisfied, tox will fail; if a path is specified as an argument to the flag (e.g. as `tox --no-provision missing.json`) and provision is prevented, provision metadata are written as JSON to that path. Fixes tox-dev#1921
tox can now be invoked with a new --no-provision flag that prevents provision, if requires or minversion are not satisfied, tox will fail; if a path is specified as an argument to the flag (e.g. as `tox --no-provision missing.json`) and provision is prevented, provision metadata are written as JSON to that path. Fixes tox-dev#1921
tox can now be invoked with a new --no-provision flag that prevents provision, if requires or minversion are not satisfied, tox will fail; if a path is specified as an argument to the flag (e.g. as `tox --no-provision missing.json`) and provision is prevented, provision metadata are written as JSON to that path. Fixes #1921
tox can now be invoked with a new --no-provision flag that prevents provision, if requires or minversion are not satisfied, tox will fail; if a path is specified as an argument to the flag (e.g. as `tox --no-provision missing.json`) and provision is prevented, provision metadata are written as JSON to that path. Fixes tox-dev#1921
I was looking into redefining how provisioning works via a plugin. I was not successful, it seems that provisioning happens before any plugin code even runs. I've seen the code in tox and realized that changing it in 3.x would be very tedious.
However, I've also realized, that I don't need to redefine the behavior, all I need is to stop it from happening. Apparently, all I needed to do was to set the
TOX_PROVISION=1
environment variable to get this exception:tox/src/tox/config/__init__.py
Lines 1349 to 1351 in d5957b8
Before I start using this as a hack:
WITHIN_PROVISION
is used at more places.Would it be possible to have a documented way to error here, without side effects? I was thinking
TOX_NO_PROVISION
or evenTOX_PROVISION=error
. Ideally, the error would print the list of missing dependencies in a way that is easily parseable (with literal_eval is fine).I can work on this, if this would be accepted. I can also go into details about why I'd like to have this if you want.
The text was updated successfully, but these errors were encountered: