PEP 739: specify how to handle conflicting installs#4889
Conversation
Signed-off-by: Filipe Laíns <lains@riseup.net>
|
(I've added the checklist to the PR description.) This is an accepted PEP, so needs SC approval:
https://peps.python.org/pep-0001/#pep-maintenance Please can you ask the SC about this change? |
|
@pfmoore, per python/steering-council#341 and python/steering-council#343, could you make a decision on this? Since the 3.15 feature freeze is just around the corner, I really don't want to have to wait for the Packaging Council to be up to speed. |
|
There's one edge case that I'd like to clarify before accepting. Suppose that a distribution has two Python builds that both get installed into the same prefix, but only one is actually installed by the user. From a strict reading, that one installation would need to be named It's arguable that the "UNLESS unfeasible due to technical limitations" exclusion applies here, and the potential to install two builds is considered enough of a technical limitation. But if it's too easy to justify using a different name, that dilutes the benefit of having an easily discoverable standard name for common cases, so allowing that could be a bad idea. Could you update the wording to clarify the intent in this case, please? |
Could you explain the meaning here? Does this mean: installed manually with tools such as (In this case, for operating systems like Debian, the case in question is not possible: the package manager owns /usr, and the user can use /usr/local or /opt for manual local installs) |
|
What I mean is, suppose Debian has A strict reading of the PEP implies that the file should be called The likely answer is that "technical reasons" apply here, so the files should be something like |
|
The free-threading case is one case (and still in Debian's future), but practically right now the there are two other clashes: debug builds and multiarch. Fundamentally the issue is that Debian installs multiple different builds of the same Python version, to the same tree. They can share For multiarch:
Fundamentally, you can't have two files with the same name with different contents. If each build needs its own file (and they do, because the file documents details of the Python interpreter like architecture and ABI flags), then they have to be named differently. We are currently working around this by calling our build-details files |
That should and will pretty clearly apply to packages for any distro. Moving files from one package around based on the user installing another package is a big no-no (file listings are static and used in UIs, similar to RECORD files in wheels), and not how anyone is going to consider implementing this. Simple proposed textual fix to address the comment: change "share" to "may share" in _"When multiple Python installations share the same prefix". @FFY00 any reason not to make that small tweak to address @pfmoore's edge case concern?
I think any packager will only deviate from the SHOULD when necessary, as in Debian's case.
Dots vs. underscores is a minor stylistic choice I'd think, but either way it'd be nice to recommend something (the examples kinda are a recommendation). You're assuming a scheme here that's In the end Debian is going to be the main user of this exception, so it'd be great to align the examples added to the PEP so they align with Debian's actual implementation and are readable. @stefanor would something like |
Absolutely. That would be nice and readable. I think that naming scheme should be defined in the spec, and (ideally) created by the generation script, itself. I don't want to have to invent my own scheme of mapping abi flags to readable strings, downstream. I'd much rather we define it here. |
Ah, nice idea, I like it. Since it's opt-in anyway, I can't think of a downside of having some kind of toggle (env var perhaps, since plumbing this in through |
PEP 123: Summary of changes)📚 Documentation preview 📚: https://pep-previews--4889.org.readthedocs.build/