python-dependency-injector
python-dependency-injector copied to clipboard
Migrate to Cython3
As title says. Major incompatibility with v0.29 was new mandatory dunder mangling, so solution was simply to rename them. Otherwise migration was pretty much straightforward.
Notes:
- Cython 3 no longer recommends commiting C files. I already have some drafts, will submit PR after this one is merged.
- So far it builds and runs on CPython 3.7-3.12 (with coverage).
- On PyPy it won't build with
DEPENDENCY_INJECTOR_DEBUG_MODE(probably Cython issue), without debug mode looks like it builds and runs fine (no coverage ofc), but there are few failing tests, need investigate more if this is related to version of PyPy itself (I was testing with 7.3.16). - Not exactly sure about segfaults mentioned in #812, but majority of tests were failing because Cython 3 started mangling attributes that were previously unmangled.
@ZipFile wow, thanks for the PR!
coverage: 91.623%. remained the same when pulling cb81e56e5ee5af8aceed31d406043480017711e8 on ZipFile:cython3 into 2c998b8448ae717921efa63610669aa6ea661bae on ets-labs:master.
Looks like tox was ignoring DEPENDENCY_INJECTOR_DEBUG_MODE env var set from GHA pipeline, coverage supposed to be around 94% with *.pyx included. Pushed fix + extra logging.
@ZipFile thanks for the PR, It looks cool 👏
Hi @rmk135, would you mind taking a look at this PR when you have a chance? 🙏
Is there anything else needed to move it forward? I can try to help if needed