Skip to content

Commit 595daeb

Browse files
authored
Migrate to Cython3 (#813)
* Fix asyncio tests * Convert class-private attributes to just private * Upgrade to Cython 3 * Regenerate C files * Fix tox coverage report
1 parent 13a7ef6 commit 595daeb

File tree

12 files changed

+204491
-144752
lines changed

12 files changed

+204491
-144752
lines changed

Diff for: .github/workflows/tests-and-linters.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,18 @@ 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
44+
PIP_VERBOSE: 1
4545
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
4646
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4747
steps:
4848
- uses: actions/checkout@v3
4949
- uses: actions/setup-python@v4
5050
with:
5151
python-version: 3.12
52-
- run: pip install tox cython==0.29.37
52+
- run: pip install tox 'cython>=3,<4'
5353
- run: make cythonize
54-
- run: tox
54+
- run: tox -vv
5555
env:
5656
TOXENV: coveralls
5757

Diff for: Makefile

+1-1
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

Diff for: requirements-dev.txt

+1-1
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

Diff for: requirements-ext.txt

+1-1
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

0 commit comments

Comments
 (0)