epics-base / p4p

Python bindings for the PVAccess network client and server.
BSD 3-Clause "New" or "Revised" License
27 stars 38 forks source link

Add Python 3.11 builds #107

Closed AlexanderWells-diamond closed 1 year ago

AlexanderWells-diamond commented 1 year ago

This PR adds Python 3.11 to the build matrix, following the same pattern as previous releases.

Note that I didn't add a linux i686 version, as it was already missing a Python 3.10 build.

I also note a subtle difference between this and a similar PR I made on epicscorelibs: The piparch value here seems different - in p4p it always has the same value macosx_10_9_intel but in epicscorelibs its value changes to macosx_10_10_intel for Python 3.10. I don't understand the significance of this, so have simply followed the apparent respective pattern in both places.

mdavidsaver commented 1 year ago

I also note a subtle difference between this and a similar PR I made on epicscorelibs

This was not intentional on my part. The pip target names should match. This is essential for manylinux targets. I guess with OSX this isn't as critical, at least 10.9 vs. 10.10 for those aspects of ABI we use.

Also, pvxslibs needs updating, and should match as well.

AlexanderWells-diamond commented 1 year ago

Thank you. I'll update the MacOS string to macosx_10_9_intel in all cases.

I'll also make another PR for pvxslibs shortly.

AlexanderWells-diamond commented 1 year ago

The numpy version 1.22.0 is no longer supported in Python 3.11. I've bumped it to 1.23.5, which is the next minor version and the highest build version. To me it looked like the best choice from the available list:

ERROR: Could not find a version that satisfies the requirement numpy==1.22.0 (from versions: 1.23.2, 1.23.3, 1.23.4, 1.23.5, 1.24.0rc1, 1.24.0rc2, 1.24.0, 1.24.1, 1.24.2, 1.24.3, 1.25.0rc1)
AlexanderWells-diamond commented 1 year ago

Well this is unexpected: We cannot build on Python 3.11, because there is a dependency on cothread, which currently doesn't work due to breaking API changes in Python 3.11.

As per that linked issue, I'm hoping to get to look at this problem in the near future, but it'll likely still be a month or so away. Until then I don't know of any workaround.

mdavidsaver commented 1 year ago

I've applied these changes, and also increased the Cython version to fix a compile error from generated code. Also, until the cothread issue w/ 3.11 can be resolved I've set those GHA jobs to skip installing it. Since cothread is not a build time dependency, the only consequence is that that some of the unit tests will be skipped. Please let me know once the cothread issue is resolved so that I can re-enable those tests.

p4p==4.1.7a2 has been uploaded. The automatic tests all passed, so I think these builds should be usable. Still, since this will be the first release with py3.11 wheels, I would appreciate some manual confirmation that things work as expected.