Skip to content

Add free-threaded Python support#2809

Merged
gaborbernat merged 25 commits intopypa:mainfrom
robsdedude:feat/free-threaded-python
Jan 15, 2025
Merged

Add free-threaded Python support#2809
gaborbernat merged 25 commits intopypa:mainfrom
robsdedude:feat/free-threaded-python

Conversation

@robsdedude
Copy link
Copy Markdown
Contributor

@robsdedude robsdedude commented Nov 29, 2024

Add free-threaded Python support

This PR adds the possibility to specify a free threaded Python.
Examples:

  • virtualenv -p 3.13t .venv
  • virtualenv -p 3t .venv
  • virtualenv -p cpython3.13t .venv

To be able to change PythonInfo to contain a flag whether the python version is a free-threaded one or not, I've introduced versioning to the py info cache files as I couldn't find another way to invalidate old cached infos.

Thanks for contributing, make sure you address all the checklists (for details on how see development documentation)

  • ran the linter to address style issues (tox -e fix)
  • wrote descriptive pull request text
  • ensured there are test(s) validating the fix
  • added news fragment in docs/changelog folder
  • updated/extended the documentation

Closes: #2776

@robsdedude robsdedude changed the title Add free-threaded Python support to PythonSpec Add free-threaded Python support Nov 29, 2024
@robsdedude robsdedude marked this pull request as ready for review January 8, 2025 12:39
@gaborbernat gaborbernat enabled auto-merge January 10, 2025 06:09
Copy link
Copy Markdown
Contributor

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems the CI is failing, can you fix it? @robsdedude Thanks

auto-merge was automatically disabled January 10, 2025 13:08

Head branch was pushed to by a user without write access

@robsdedude robsdedude marked this pull request as draft January 10, 2025 19:44
@gaborbernat
Copy link
Copy Markdown
Contributor

@robsdedude seems it is still failing 🤔

@robsdedude
Copy link
Copy Markdown
Contributor Author

Now CI should pass. I made the CI run on my fork to increase the iteration velocity 🙃

@robsdedude robsdedude marked this pull request as ready for review January 15, 2025 10:35
@gaborbernat gaborbernat enabled auto-merge (squash) January 15, 2025 15:31
@gaborbernat gaborbernat merged commit b00d59c into pypa:main Jan 15, 2025
@robsdedude robsdedude deleted the feat/free-threaded-python branch January 16, 2025 08:13
@ngoldbaum
Copy link
Copy Markdown

Thanks so much for fixing this and seeing the PR through @robsdedude. Our team at Quansight Labs is trying to spot ecosystem issues like this around free-threaded Python. If you are aware of any other issues, we should chat!

robsdedude added a commit to robsdedude/virtualenv that referenced this pull request Jan 17, 2025
This reverts some changes introduced in pypa#2809
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

virtualenv is not able to detect free-threading python3.13t

3 participants