Upgrade to Cython 3

This commit is contained in:
ZipFile 2024-08-13 11:02:14 +00:00
parent 35eba2b753
commit ade1ccefc7
5 changed files with 6 additions and 7 deletions

View File

@ -40,8 +40,7 @@ jobs:
name: Run tests with coverage
runs-on: ubuntu-latest
env:
# Cython's version <3 issue with tracing: "error: no member named 'use_tracing' in 'struct _PyCFrame'"
# DEPENDENCY_INJECTOR_DEBUG_MODE: 1
DEPENDENCY_INJECTOR_DEBUG_MODE: 1
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
@ -49,7 +48,7 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: 3.12
- run: pip install tox cython==0.29.37
- run: pip install tox 'cython>=3,<4'
- run: make cythonize
- run: tox
env:

View File

@ -2,7 +2,7 @@ VERSION := $(shell python setup.py --version)
CYTHON_SRC := $(shell find src/dependency_injector -name '*.pyx')
CYTHON_DIRECTIVES = -Xlanguage_level=2
CYTHON_DIRECTIVES = -Xlanguage_level=3
ifdef DEPENDENCY_INJECTOR_DEBUG_MODE
CYTHON_DIRECTIVES += -Xprofile=True

View File

@ -1,4 +1,4 @@
cython==0.29.37
cython>=3,<4
pytest
pytest-asyncio
tox

View File

@ -1,3 +1,3 @@
flask==2.1.3
werkzeug==2.2.2
aiohttp==3.9.0b1
aiohttp

View File

@ -28,7 +28,7 @@ passenv = GITHUB_*, COVERALLS_*
basepython=python3.12
deps=
{[testenv]deps}
cython<3.0
cython>=3,<4
coverage
coveralls
commands=