Fix compatibility with Python 3.13 and Cython 3#69
Fix compatibility with Python 3.13 and Cython 3#69wridgers merged 21 commits intoantocuni:masterfrom
Conversation
Without this change cython produces incorrect C code with kwargs that start but don't end with `__`.
This causes issues on Cython 3 because we're no longer allowed to inherit from `int`. The fix here is to use the Python version of BaseEnum on both cPython and Pypy which will presumably be slower.
f43f8a1 to
8cb79df
Compare
|
For the hashing stuff: I think the hashing functions were previously private (the names start with Numpy had complaints about this (e.g. python/cpython#111545) and I think ultimately just copied the cpython code into numpy. We could do the same here. |
db36eac to
6e60835
Compare
|
Thank you for the PR. |
|
Marking as draft while I redo the _hash change. |
Thank you. I've been coordinating with @wridgers to get the tests running and do a deployment so it's not critical, though it could come in useful. |
ec9767f to
28ee71b
Compare
_Py_HashBytes was hidden in 3.13 (python/cpython#107026). > C assumes that any function with an "implicit declaration" returns an int, which'll be smaller than a Py_hash_t, hence the different results. (https://groups.google.com/g/cython-users/c/YQkU8oc8oSM/m/nVJ_IX8KAgAJ)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2 to 4.1.7. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](actions/download-artifact@v2...v4.1.7) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
It fails at "Set up python"
The previous version was failing in Python 3.13, 4.26 isn't compatible with 3.8
28ee71b to
b0ca17f
Compare
|
Let's try a RC of this. |
Python 3.13 requires Cython 3. Capnpy currently doesn't work with Cython 3 and so can't be used with Python 3.13.
This PR attempts to fix Cython 3 compatibility.
The main code issue was that the Cython version of
BaseEnuminherited fromint. This is no longer allowed in Cython 3.I'm not very familiar withe Cython, so this quick fix attempts to use the Python version of BaseEnum which was previously only used for Pypy.