-
-
Notifications
You must be signed in to change notification settings - Fork 533
tox 3.0.0rc1 breaks devpi test
#755
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
Comments
Thanks @fschulze can you explain what broke or post a link to a CI run, where that happened? Is devpi relying on some tox internals there? As we don't really have a programmatic API for tox (at least thougt so), maybe we need to introduce one to prevent breakhages like this in the future? @tonybaloney also uses programmatic access to tox, so this might be something worth thinking about. |
It's used here: I haven't touched that code myself. I'm pretty sure the intention is to basically vendor tox and not run it as a subprocess which involves looking up the correct binary etc. The quick fix on our end is this: diff --git a/client/devpi/test.py b/client/devpi/test.py
index 8f91f83c..09463940 100644
--- a/client/devpi/test.py
+++ b/client/devpi/test.py
@@ -9,7 +9,6 @@ import pkg_resources
import py
from devpi_common.archive import Archive
import json
-import tox
from devpi_common.url import URL
from devpi_common.metadata import get_sorted_versions
@@ -116,7 +115,8 @@ class DevIndex:
import detox.main
return detox.main.main
else:
- return tox.cmdline
+ from tox.session import main
+ return main
def get_tox_args(self, unpack_path):
hub = self.hub But I think it's better if it's fixed on the tox side to avoid forcing people to update both devpi-client and tox and getting support requests for older devpi-client versions when used with newer tox. I haven't looked at how detox does things and if it's also affected by this. |
eh, @obestwalter said the only official API is the command line invocation, calling into tox code via import is sort of uncharted territory 🤔 |
Hi @gaborbernat this is he difference between the ideal and the real world - the 3.0 sounds less random now I guess ... I would like to collect problems like these for a bit longer and see how we should proceed with this release. Maybe grepping through github what people do programmatically with tox might be a good idea. I don't think it is many projects that would be affected by these changes. |
I took a quick look, and
Seeing that it's been in the documentation for a long time (and still is), it definitely seems like an official API to me... |
Hi @The-Compiler, thanks for checking that, those docs would have had to be changed or removed as part of that change (I am not even sure if they are still working as documented in current releases, because I don't use them). @gaborbernat that we don't have an offficial programmatic API is not something coming from me but from @hpk42 himself (as expressed in the CHANGELOG entry of the 2.0 release):
But if this is even in the docs, we don't have to be surprised that people are using it :) FWIW I don't see anything wrong with having a stable, importable |
…on and changing the entry point instead.
…on and changing the entry point instead.
From #728 (comment)
The change of
cmdline
in f85b827 brokedevpi test
.It's easy to fix on the devpi side, but I'm not sure if it will also break detox. I wasn't able to get detox tests running when I tried.
Maybe it would be better to revert
cmdline
back totest.session.main
and change the entry point to tox.session.run_main instead.cc @gaborbernat @obestwalter
The text was updated successfully, but these errors were encountered: