Skip to content

Commit ade1cce

Browse files
committed
Upgrade to Cython 3
1 parent 35eba2b commit ade1cce

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

.github/workflows/tests-and-linters.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,15 @@ jobs:
4040
name: Run tests with coverage
4141
runs-on: ubuntu-latest
4242
env:
43-
# Cython's version <3 issue with tracing: "error: no member named 'use_tracing' in 'struct _PyCFrame'"
44-
# DEPENDENCY_INJECTOR_DEBUG_MODE: 1
43+
DEPENDENCY_INJECTOR_DEBUG_MODE: 1
4544
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
4645
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4746
steps:
4847
- uses: actions/checkout@v3
4948
- uses: actions/setup-python@v4
5049
with:
5150
python-version: 3.12
52-
- run: pip install tox cython==0.29.37
51+
- run: pip install tox 'cython>=3,<4'
5352
- run: make cythonize
5453
- run: tox
5554
env:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ VERSION := $(shell python setup.py --version)
22

33
CYTHON_SRC := $(shell find src/dependency_injector -name '*.pyx')
44

5-
CYTHON_DIRECTIVES = -Xlanguage_level=2
5+
CYTHON_DIRECTIVES = -Xlanguage_level=3
66

77
ifdef DEPENDENCY_INJECTOR_DEBUG_MODE
88
CYTHON_DIRECTIVES += -Xprofile=True

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cython==0.29.37
1+
cython>=3,<4
22
pytest
33
pytest-asyncio
44
tox

requirements-ext.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
flask==2.1.3
22
werkzeug==2.2.2
3-
aiohttp==3.9.0b1
3+
aiohttp

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ passenv = GITHUB_*, COVERALLS_*
2828
basepython=python3.12
2929
deps=
3030
{[testenv]deps}
31-
cython<3.0
31+
cython>=3,<4
3232
coverage
3333
coveralls
3434
commands=

0 commit comments

Comments
 (0)