-
Notifications
You must be signed in to change notification settings - Fork 965
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
Why does warehouse allow linux_armv6l and linux_armv7l wheels? #3668
Comments
This appears to be connected somehow to the piwheels project to provide wheels for Raspberry Pis running Raspbian, which is super cool. But as their FAQ says:
|
I started the piwheels project as a solution for Raspberry Pi users, and around the same time, some google devs working on a Pi project wanted to be able to distribute wheels for Pi users. piwheels was just getting started so they requested warehouse supported uploading armv6 and armv7 wheels. This was accepted quite quickly and then warehouse's back-end became the new default for uploads (a while before the front-end). Because Raspberry Pi's OS, Raspbian, is compatible with all Pi models (Pi 1/Zero are Armv6, Pi 2 is Armv7 and Pi 3 is Armv8), it's all Armv6 userland, despite Pi 2/3 presenting as Armv7. So wheels built on a Pi 3 will have the platform tag I wouldn't advise anyone upload these kind of wheels to PyPi (note you can't upload two identical files even with different filenames, so you could only upload an armv7 not both), because they're not truly Armv7. But I guess there's a use case for other Arm boards. piwheels doesn't pretend to be an Arm package repository, just a Raspberry Pi one. But if package maintainers want their packages to work for Pi users and other Arm board users, they need to be sure what they upload is compatible with everyone (and hope that doesn't cause piwheels to symlink armv7 to armv6 and break it for some people). See piwheels/piwheels#66 for issues around people uploading true Armv7 wheels to PyPI. |
I'm assuming that we can't reinstate the prohibition on Linux wheel uploads for ARM at this point without causing UX problems for Raspberry Pi users. So let's not do that :) Instead, my suggestion would be that we restrospectively declare If folks from the Raspberry Pi project were then interested in helping define distro-specific ABI compatibility tags (which would make it possible to distribute distro-specific wheels via PyPI without causing compatibility problems for users of other distros), that would be most welcome: https://mail.python.org/pipermail/distutils-sig/2018-April/032117.html is the latest write-up of a design that we believe would work for that purpose, and what might be involved in getting there. |
#3806 proposes a new comment on the list of permitted ABI tags noting that there's a lot more involved in adding a new ABI tag than just approving it there. |
Would removing support for uploading (Agreed that it would be great to have a proper wheel tag for this.) |
Ah, I'd missed that detail (https://www.piwheels.org/ is the URL). In that case, yeah, it would be highly desirable to go back to preventing use of these tags on pypi.org itself, and have the Warehouse level feature be a config setting for "extra wheel compatibility tags". Then @bennuttall could add these tags to the config setting for piwheels, and be in a similar situation to Galaxy Project where the ABI is implied by the repository you're using, rather than the compatibility tag. |
Here's all the Looks like ~20k total, over a handful of packages, mostly from google (maybe the dependency stack for a single package?) Query:
|
I don't particularly remember merging that PR, but generally we don't prevent people from uploading incompatible wheels (e.g. you can upload a manylinux wheel that is actually ubuntu specific) and there are benefits to allowing the generic tags. You may have additional files that only make sense on a Linux distribution (e.g. man files, etc) while still being a pure Python wheel. I believe that Armin Ronacher has been looking for a generic linux tag for quite some time as well for similar reasons. Quite generally, I don't think that the |
@dstufft the problem is that if you don't treat the OK yes I guess if Armin is building fully statically linked rust binaries that don't depend on the system libc, then that is an actual generic linux wheel, but if we want to allow that then we should talk about it on distutils-sig and there's no reason it should be allowed only on ARM. And I'm 99% sure that none of the linux ARM wheels currently on PyPI are like this. |
linux_armv?l tags aren't Pi specific, but if someone built a wheel on a Pi, it may be incompatible with other Arm boards.
👍
@ncoghlan Are you suggesting we force another tag on the wheels we build? Wouldn't that require a change in pip for requests from Raspbian to match the tag? Does anyone consider the fact pip identifies the platform as armv7 on a Pi 2/3 a bug, when it's actually armv6 userland? It's a detail we can mostly work around but it's the only compatibility issue. |
Yeah, you should file a separate bug on pip for that. It already has similar code to work around a similar problem on x86 (64-bit processor but 32-bit userland): https://github.com/pypa/pip/blob/7b1f2a06d24bd90a28405e52e9184848d33576c7/src/pip/_internal/pep425tags.py#L135-L138 |
I could have swore we already relaxed the restriction on x86 and amd64 wheels as well to allow them, but looking at the code that's not true. Maybe I intended to do it but never actually got around to doing it.
Wheel has bad defaults, we should fix them. There's no reason why a generic linux wheel is an unreasonable thing, the only real problem is that people will get it by default with opt-ing into it. Wheel should produce a hyper specific wheel by default, and require opting into the "generic" linux tags just like it does for manylinux. Beyond that, if people opt into a generic wheel but produce a specific wheel, that's a packaging bug on that package, the same as if they did it with a manylinux wheel. |
There aren't any hyper-specific Linux distro compatibility tags currently defined for wheel to opt in to: there's only "operating-system + CPU architecture". We can mostly get away with that on Windows because the python.org binary provides an anchor as to which versions of the Windows ABI should be supported, but there's a reason the Defining a more selective tag format for Linux is indeed what Nate Coraor from the Galaxy Project initially proposed, and it's a good idea, it's just a question of whether anyone is sufficiently motivated to write up an interoperability spec for how they would work in practice. |
Referred here by @NotAFile from meshy/pythonwheels#109 and https://github.com/WorksOnArm/cluster/issues/116 I'm interested in the process and practice of getting a full set of |
@vielmetti so kind of a multilinux2010 for arm64, based on a description of minimum os requirements? |
@mattip - Yes, essentially that. Having read PEP-0571, I might even suggest to base it on CentOS 7, which was announced for aarch64/arm64 in 2015. CentOS 6 is EOL in 2020, and if we do a new PEP based on CentOS 7 we could potentially pave the way for all of their supported architectures including not only aarch64/arm64 but also ARMv7hl. CentOS 7 is EOL in 2024. Having read this I am pretty sure that Alpine support will be difficult as they use |
piwheels is an open-source project which builds wheels for any platforms. Anyone can run their own instance. Feel free: https://github.com/bennuttall/piwheels/ https://piwheels.readthedocs.io/en/latest/ piwheels.org is the Raspberry Pi repository, an instance of piwheels. |
It seems that, with the CentOS route, there's no other way than to declare a new |
Part of what took so long with The switch to CalVer in the naming scheme was also primarily about making it easier to define newer baselines for non-x86[_64] architectures. |
The |
Folks may find the summary post at https://mail.python.org/archives/list/[email protected]/message/BFHBWB7ZO3L55V5JXGKN3FBNQQUN3END/ useful (it's my reply to the thread @njsmith linked). And yeah, I agree - having the next |
It will make future manylinux updates easier, but the reason I linked it here is because it will also make manylinux well-defined on every architecture. (Of course for each architecture someone will still have to do the work to figure out how to build portable wheels, but once you do then warehouse and pip will work immediately.) |
Well, mostly - each new libc would still need an algorithm defined for installers to extract the relevant version information. (I don't recall the exact details of what I found when I dug into possible |
Given that PEP 599/ This is a bit complicated by the fact that |
@di is pypa/manylinux#338 complete enough that we should start following up on this? |
Yes, I think so. We could probably do this along with #6792. |
I have a (maybe dumb) question on this issue. I apologize if it ends up being off-topic due to a misunderstanding on my part; working with the Python packaging ecosystem for platform-specific wheels has been a difficult experience for me and I'm quite sure I still don't fully understand it. As I read it, the intent of this issue is to ultimately block the uploading of I upload
Click to expand list
Notably absent are any
After updating Click to expand list
Again, no Finally, taking a look at the compatible tags from Click to expand list
All the manylinux tags are available. So my conclusion here is that, today, My question is this: is there a plan to rectify this prior to blocking uploads for |
@qlyoung Your
and then
what do you get? |
If there are |
That's interesting, I would expect that version of glibc to give you |
I posted the equivalent output in my OP, nice to know what the canonical way is 🙂
|
Got it, so I'm guessing |
The problem with the
If there are multiple ARM ABIs in active use, then I guess it wouldn't be complicated for pip/pypi to support multiple of them, as long as we can easily sniff out which ABI we're running under? |
This is indeed an
I see. In this case, as I understand it, there is no real support today for Also, for my own edification - are there docs on details like this w.r.t Python packaging, and if so, where? I've read through 425 and the
Quite right, the arch + abi scene in ARM land always confuses me.
That would be awesome. To provide a bit of background, the box in question is a datacenter-grade network switch; quite a few widely deployed models from various vendors use |
There are currently 105 projects that publish
I'm planning to email all maintainers/owners of these projects to announce a 6-month deprecation period for these distribution types, and provide guidance for migrating to |
Hi, is there a follow-up on this? |
Well, that didn't happen
Mostly because the specs here were in flux and such a guide doesn't exactly exist. First step towards unblocking this would be to draft an email to these users, and determining how we should guide them towards the new standards. |
Historically we never allowed
linux
wheels on PyPI, and this was an intentional choice, becauselinux
doesn't tell us enough to make any guesses about ABI compatibility. That's still true. But warehouse now allows specificallylinux_armv6l
andlinux_armv7l
as legal wheel platforms (but no other options).This appears to have come in through #2003, #2010, #2012, but none of those have any discussion of why we suddenly changed this policy...
What's going on here? Why are we allowing
linux
wheels at all, and why is it specific to these two CPU architectures?The text was updated successfully, but these errors were encountered: