Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ jobs:
- python-version: '3.13'
toxenv: 'py313-test'

- python-version: '3.14'
toxenv: 'py314-test'

- python-version: 'pypy-3.11'
toxenv: 'pypy3-test'

Expand Down Expand Up @@ -65,7 +68,7 @@ jobs:
pip install -U pip # so that we can use wheels
# tox creates the sdist: we need cython to be installed in the env which
# creates the sdist, to generate the .c files
pip install tox==4.25.0 cython==3.0.12
pip install tox==4.25.0 cython==3.1.7

- name: Run tox
run: tox -e ${{ matrix.toxenv }}
6 changes: 6 additions & 0 deletions capnpy/_hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@ typedef struct {

// Use values / methods from CPython 3.5
#define HASH_MASK _PyHASH_MODULUS

// https://groups.google.com/g/cython-users/c/YQkU8oc8oSM/m/nVJ_IX8KAgAJ
#if PY_VERSION_HEX < 0x030E0000
#define strhash_f _Py_HashBytes
#else
#define strhash_f Py_HashBuffer
#endif

// Unused in Python 3, but has to exist during cython compilation
_Py_HashSecret_custom HashSecret;
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"""

MIN_REQUIRED_CYTHON_VERSION = "0.29.30"
MAX_CYTHON_VERSION = "3.1.7"

###############################################################################
# Custom distutils commands
Expand Down Expand Up @@ -167,7 +168,7 @@ def getext(fname):

if USE_CYTHON:
ext_modules = get_cython_extensions()
extra_install_requires = [f'cython>={MIN_REQUIRED_CYTHON_VERSION}']
extra_install_requires = [f'cython>={MIN_REQUIRED_CYTHON_VERSION},<={MAX_CYTHON_VERSION}']
else:
ext_modules = []
extra_install_requires = []
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
# nopyx is a special env where Cython is NOT installed, and thus we run
# pure-python tests
envlist = py37-test,py38-test,py39-test,py310-test,py311-test,py312-test,py313-test,pypy-{test,bench},pypy3-{test},docs
envlist = py37-test,py38-test,py39-test,py310-test,py311-test,py312-test,py313-test,py314-test,pypy-{test,bench},pypy3-{test},docs

[testenv]
setenv =
Expand Down
Loading