-
-
Notifications
You must be signed in to change notification settings - Fork 535
Tox hangs on waiting for pyproject_api backend if --installpkg
is used
#3512
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
I am aware this might be a duplicate of #2844, however, the described symptoms don't seem to match exactly 🤔. When Tox hangs as per the above description, there is an idle
If I Output with
|
It is interesting that the issue is not reproducible with the now-EOL |
It would be nice for us to get this resolved somehow, although of course we can simply skip these Devpi tests... I gave it an hour or two with my MRE,
I could essentially work around the issue by this two liner: --- a/src/tox/tox_env/python/virtual_env/package/pyproject.py
+++ b/src/tox/tox_env/python/virtual_env/package/pyproject.py
@@ -118,7 +118,11 @@ class Pep517VenvPackager(PythonPackageToxEnv, ABC):
@root.setter
def root(self, value: Path) -> None:
+ if value == self._root:
+ print(f'Pep517VenvPackager {id(self)}: not recreating frontend, same root!')
+ return
self._root = value
+ print(f'Pep517VenvPackager {id(self)}: recreate frontend with new root {value!r}')
self._frontend_ = None # force recreating the frontend with new root Does this change make sense? And what other ramifications are of recreating a frontend vs not recreating a frontend? |
Wow, so that's what's been happening in some of my automations on Python 3.12+ (at least seems like it) Although, in my case, I've been seeing something like this when installing from sdist but not wheel. |
@vytas7 could you check your example with a whl instead of a tarball to confirm? |
Also, check it all against Python 3.11 |
Also, add |
@webknjaz I've already checked the attached example (from the description), and it is the same behaviour with all current versions. The now-EOL Python 3.8, however, passes (which we were using at work prior to recent upgrade). Wheel should not be an issue, however, when it comes to our use case at work, Edit: I have just tested roughly the same case usage Edit2: |
@vytas7 (on an unrelated note) you might be interested in my experimental workflow, then (that also integrates https://github.com/re-actors/checkout-python-sdist): https://github.com/ansible/awx-plugins/blob/21173c4/.github/workflows/ci-cd.yml#L454-L537. |
Right, because wheels don't need to go through the PEP 517 code path... |
@webknjaz For now, I'm thinking to simply upload Tox I would submit a PR to Tox too, but tbh I don't even understand why Dropping an old |
This was done part of #3237 to address the respective issue. |
Issue
Tox hangs when using certain PEP 517 backends such as
pdm-backend
together with the--installpkg
option.It is the option that, for instance,
devpi-client
opts to use for thedevpi test
command.Interesting that it only happens if
tox
is run with at least two environments. Only one environment does not trigger the issue.Environment
CPython 3.12 on Ubuntu/Debian Linux.
The issue is reproducible with the official
python:3.12
Docker image (see below).Output of running tox
The output is indistinguishable from the normal, expected output unless the
--exit-and-dump-after
option is used.Minimal example
Consider the following self-contained example, let's assume it is saved under
/tmp/test.sh
:Now, run this
/tmp/test.sh
inside thepython:3.12
Docker image:The text was updated successfully, but these errors were encountered: