Hi,
I'm trying to make some make a library work in cPython 3.13 but have hit an issue I don't understand. It's possibly more to do with cPython than cython but I'm seeing a difference between 3.12 and 3.13.
Consider the following:
cython_hash.pyx:
```
cdef extern from "Python.h":
cdef Py_hash_t _Py_HashBytes(const void *src, Py_ssize_t len)
cpdef long strhash(bytes a, long start, long size):
cdef const unsigned char* p = a
p += start
return _Py_HashBytes(p, size)
```
setup.py
```
from setuptools import setup
from Cython.Build import cythonize
setup(
ext_modules=cythonize(['cython_hash.pyx']),
packages=['cython_hash'],
)
```
Building for both using:
```
$ ~/.pyenv/versions/cython_test-3.12.8/bin/python setup.py build_ext --inplace
$ ~/.pyenv/versions/cython_test-3.13.4/bin/python setup.py build_ext --inplace
```
and then:
```
$ PYTHONHASHSEED=0 ~/.pyenv/versions/cython_test-3.12.8/bin/python -c "import cython_hash; print(cython_hash.strhash(b'hello', 0, 5)); print(hash(b'hello'))"
-2096571579003691106
-2096571579003691106
$ PYTHONHASHSEED=0 ~/.pyenv/versions/cython_test-3.13.4/bin/python -c "import cython_hash; print(cython_hash.strhash(b'hello', 0, 5)); print(hash(b'hello'))"
-884072546
-2096571579003691106
```
Why is `_Py_HashBytes` giving a different value in 3.13?
I have looked at the cPython source for both 3.12 and 3.13 and have observed some changes around this but nothing seemed to actually switch out the implementation of it, plus hash(b'hello') gives the same result as 3.12.
Many thanks,
David