Skip to content

Migrate to Cython3 #813

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 4, 2024
Merged
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
8 changes: 4 additions & 4 deletions .github/workflows/tests-and-linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,18 @@ 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
PIP_VERBOSE: 1
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- 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
- run: tox -vv
env:
TOXENV: coveralls

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cython==0.29.37
cython>=3,<4
pytest
pytest-asyncio
tox
Expand Down
2 changes: 1 addition & 1 deletion requirements-ext.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
flask==2.1.3
werkzeug==2.2.2
aiohttp==3.9.0b1
aiohttp
Loading