cpython icon indicating copy to clipboard operation
cpython copied to clipboard

gh-121103: Put free-threaded libraries in `lib/python3.14t`

Open colesbury opened this issue 1 year ago • 8 comments

On POSIX systems, excluding macOS framework installs, the lib directory for the free-threaded build now includes a "t" suffix to avoid conflicts with a co-located default build installation.

  • Issue: gh-121103

colesbury avatar Jul 02 '24 20:07 colesbury

pip, uv, venv, setuptools, seem to work, but I don't entirely know what I'm doing, so I'd appreciate a thorough review.

colesbury avatar Jul 02 '24 20:07 colesbury

Does this mean that all of the pure Python standard library files would need to be installed in lib/python3.14t as well? I.e. when I have both the "normal" and the freethreaded Python installed, do I need all the standard library modules twice?

hroncok avatar Jul 03 '24 09:07 hroncok

I don't have very deep knowledge in this area, so I can't easily do a thorough review :( I'd trust @FFY00 and @hroncok's reviews if they can contribute their time for it.

encukou avatar Jul 03 '24 12:07 encukou

Does this mean that all of the pure Python standard library files would need to be installed in lib/python3.14t as well? I.e. when I have both the "normal" and the freethreaded Python installed, do I need all the standard library modules twice?

As far as I can tell, from a quick look at this PR: yes.

erlend-aasland avatar Jul 03 '24 12:07 erlend-aasland

As far as I can tell, from a quick look at this PR: yes.

I thought so.

The real question is: Is this the outcome we anticipated?

If not, I suggest keeping the stdlib and platstdlib values intact.

hroncok avatar Jul 03 '24 13:07 hroncok

Yes, that was the intention. The goal is to separate the installation. We run into a lot of potential problems if we have partially overlapping stdlib files.

colesbury avatar Jul 03 '24 14:07 colesbury

Yes, that was the intention. The goal is to separate the installation. We run into a lot of potential problems if we have partially overlapping stdlib files.

FTR, I totally agree with this.

erlend-aasland avatar Jul 03 '24 16:07 erlend-aasland

To expand on my previous comment: if we have kept a common stdlib and platstdlib, the Python files would be shared, but the .so files would not. So I'd be concerned that if someone installed, e.g. 3.13.0 default and 3.13.8 free-threaded to the same prefix, then the .py files and native .so libraries might not match. Keeping things separate in lib/python3.13t vs. lib/python3.13 avoids this problem.

colesbury avatar Jul 03 '24 16:07 colesbury

I plan to merge this tomorrow if there are no objections

colesbury avatar Jul 10 '24 15:07 colesbury

Thanks @colesbury for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. 🐍🍒⛏🤖

miss-islington-app[bot] avatar Jul 11 '24 20:07 miss-islington-app[bot]

GH-121631 is a backport of this pull request to the 3.13 branch.

bedevere-app[bot] avatar Jul 11 '24 20:07 bedevere-app[bot]