-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
A PyInfo cache populated under v20.28.1 cannot be loaded and used under v20.29.0 -- AttributeError on 'free_threaded' #2825
Description
Issue
Unfortunately, I still don't have a reasonable MRE to show.
This originally surfaced for me in a closed-source build process built on Poetry -- my initial bug report here.
However, I eventually found that my project was installing virtualenv==20.28.1 into an environment where 20.29.0 was already running. (Full detail in this comment, same issue.)
I'm fairly certain that I'm getting a v20.28.1 PyInfo object loaded from the cache while running v20.29.0, but as I'm unable to reproduce it reliably, I don't yet know how this could happen. In the original case, I believe that poetry is running virtualenv.cli_run in threads, and multiple versions could be executing simultaneously.
If I can reproduce, obviously that would help. If threaded invocations are not supported, that may carry back to poetry as a consideration.
Environment
Provide at least:
-
OS: Dockerized Debian -- python3.10 slim-bookworm
-
pip listof the host python wherevirtualenvis installed -- cannot provide from the closed source original (still working on a MRE)# sorry, still working on the MRE
Output of the virtual environment creation
Make sure to run the creation with -vvv --with-traceback:
# also needs to wait for the MREI really don't like that I'm opening a ticket without an MRE, but since this is new in the today's release, I think it's worth reporting.
If this cache load is something which should be supported, we just need to populate free_threaded explicitly if it's missing in PyInfo._from_dict -- I would be happy to open a PR with that change if appropriate.