-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
gh-81742 Omit platform from _sysconfigdata filename for multiarch #122879
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
Conversation
3b8b910
to
485218c
Compare
The multiarch triple encodes the platform name, so there is no need to have both in the _sysconfigdata filename. Debian has been carrying a (dumber) variant of this patch for a while. Fixes: python#81742
This is used in cross-compilation, so let's document it.
e662510
to
552ad77
Compare
There's no real context on this PR or on the original ticket for why this change is necessary or beneficial, other than "Debian does it", and a possible issue with the At least in the iOS context, So - what's the motivation for this change? |
Historically, the motivation was that the FreeBSD kernel's platform name changed frequently, without coordinating with any other userland change. So encoding Debian no longer has any kFreeBSD ports. So the issue is mostly moot for us. If you don't want it, we can attempt to transition away from this patch. |
I'm willing to be convinced otherwise, but based on your explanation, my inclination is that this sounds like a kFreeBSD problem (or, an issue with kFreeBSD platform identification in the configure script), so there's no reason to be disruptive with |
It's basically the same issue as |
In which case, it sounds like the same solution is called for - a transition to using |
Agreed with all of that.
Yes, I can't argue that this wouldn't be disruptive to code that attempts to predict sysconfig data module names like this. https://github.com/search?q=sysconfigdata_&type=code shows up a fairly large number of results. Making the change in Debian hasn't broken anything for any of the Python stuff we have, that we've noticed. There were probably knock-on effects in projects that build on Debian/Ubuntu. And we will have those affects again if we revert this patch. I would consider the sysconfig data module name to be an undocumented part of Python's private API, and available for change. There is a private (and undocumented) API for querying the name ( The name has previously changed in 3.6 (c4b53af). I've described the historical, practical need for the change, which no longer applies in Debian. The philosophical motivation for the change was that the multiarch-triplet is a more specific description of the platform than the platform name. Why specify both a vague and a specific name, when we can just specify one. It's more concise, and not ambiguous. Yes, you may need a lookup of one to the other. But you'll need a variety of lookups anyway, if you are doing anything with this value. As this is no longer a pressing issue for Debian, I'd be fine to close this MR and move towards retiring this patch in Debian. |
The counterargument - even accepting that this falls into the category of a "private" API, with a Python API to retrieve the module name, many of the uses will be in build systems and the like, a change of this nature will involve some disruption, and we don't actually gain anything (that I can tell) from the disruption, other than a shorter name. This differs from the previous call, which was necessary to add support for multiple co-existing sysconfigdata instances. This was equally disruptive, but there was a tangible benefit to the change (one that the iOS and Android ports make good use of). If we had our time over, I might agree that the more concise name would be better; but given the current state of things, and the limited benefits to a disruptive change, I'm not convinced the change is worth it. On that basis, I'll close this PR and the original ticket; however, if you want to make your case, I'd suggest starting a discussion on https://discuss.python.org. |
The multiarch triple encodes the platform name, so there is no need to have both in the _sysconfigdata filename.
Debian has been carrying a (dumber) variant of this patch for a while.
Fixes: #81742