GrahamDumpleton / wrapt

A Python module for decorators, wrappers and monkey patching.
BSD 2-Clause "Simplified" License
2.04k stars 230 forks source link

Publish CPython-3.10 manylinux wheels #193

Closed n1ngu closed 2 years ago

n1ngu commented 2 years ago

I noticed no cp310-manylinux wheels can be downloaded so I guess my installs atop python:3.10-slim docker images are falling back to the pure python implementation bundled within wrapt.

Are there any plans for building wheels for this platform? Is help needed? Is python-3.10 supported at all?

n1ngu commented 2 years ago

I see wheel support was recently added this summer #39 . Nice! (Which also means I have been unknowingly deploying the pure python wrapt fallback for years. Damn, I should've read the docs!)

Also I see the release process is already automated with the pypa/cibuildwheel toolchain and 3.10 support is pretty much stable as per #191 so I guess it is just a matter of issuing a new release?

GrahamDumpleton commented 2 years ago

Even before wheels you could still use the C extension deployment. So long as you had a compiler available the C extension would be compiled on demand when you installed wrapt. This is how all Python packages with C extensions worked before wheels and in general you will not get too far without a compiler as not all packages are available as binary wheels and as such trying to install such packages would fail as usually they don't have fallback implementations in pure Python like wrapt does.

So lack of either binary or source wheel for Python 3.10 should just mean that the C extension is compiled when you install wrapt.

As to why there is no Python 3.10 binary wheel, I can only imagine it is because the service that is being used by GitHub actions to create them wasn't generating them since Python 3.10 hadn't actually been released officially and they didn't want to use dev versions. I would need to work out whether it is now and what needs to be done to ensure they are being generated.

GrahamDumpleton commented 2 years ago

So it seems one can't get Python 3.10 wheels generated without dropping ability to generate Python 2.7 and 3.5 wheels as you need to move to a newer version of the package for building the wheels where they aren't supported anymore. So this will necessitate a wrapt 1.14.0 release where Python 2.7 support would be dropped, only then can Python 3.10 wheels be generated.

immense055 commented 2 years ago

P

GrahamDumpleton commented 2 years ago

Try with version 1.13.3rc1. You will need to pin the version in any package requirements file or when manually installing it. This manages to add wheels for Python 3.10 but still retain wheels for older Python 2.7 and 3.5 versions.

n1ngu commented 2 years ago

Yes, pip install -vv --pre wrapt will clearly find and install the wheel for the rc1 and _wrappers.cpython-310-x86_64-linux-gnu.so is present in the site-packages.

Thanks for the effort you put in convoluting the building github actions for this.

Seeing what you did I understand there are no plans to drop python2 support in the mid-term, then? Yet, I'd suggest a somewhat opposite approach: exceptionally using cibuildwheel-v1 for CPython<3.6 and PyPy<3.7 in a bdist_wheel_legacy action and using cibuildwheel-v2 for anything else. The rationale is that I foresee better maintenance for the 2.x series as well as a an increasing platform support, namely the upcoming musllinux support https://github.com/pypa/cibuildwheel/pull/768

Should this be discussed in a different issue? Anyway, I know this can be quite a burden so I am willing to work it out if you agree with the idea.

Also, I'd rather keep this issue open until a final 1.13.3 is released so that nobody gets confused.

GrahamDumpleton commented 2 years ago

With new release of cbuildwheel just being made, check out:

If anyone can test those, including wheels for musllinux that would be awesome.

n1ngu commented 2 years ago

cp310-musllinux wheels are correctly installed in a python:3.10-alpine docker image and pass this project test suite!

GrahamDumpleton commented 2 years ago

1.13.3 has been released. Closing this issue now.