Skip to content

Fix Cython 3.3 compatibility - #1248

Merged
Joao-Dionisio merged 2 commits into
scipopt:masterfrom
musicinmybrain:cython3.3
Aug 27, 2026
Merged

Joao-Dionisio merged 2 commits into
scipopt:masterfrom
musicinmybrain:cython3.3

Conversation

@musicinmybrain

Copy link
Copy Markdown
Contributor

Do not redeclare variables with different types. Use new names rather than redeclaring/shadowing the old ones.

Fixes #1247. See also cython/cython#7246.

Do not redeclare variables with different types. Use new names rather
than redeclaring/shadowing the old ones.

Fixes scipopt#1247.
@Joao-Dionisio

Copy link
Copy Markdown
Member

Thank you for the fix @musicinmybrain ! Can you please add a CHANELOG entry?

And thank you @Labeeb2339 for the review!!

@musicinmybrain

Copy link
Copy Markdown
Contributor Author

Thank you for the fix @musicinmybrain !

You’re welcome!

Can you please add a CHANELOG entry?

Done.

@Joao-Dionisio Joao-Dionisio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@Joao-Dionisio
Joao-Dionisio merged commit ca6631b into scipopt:master Aug 27, 2026
3 checks passed
luhenry added a commit to riseproject-dev/python-wheels that referenced this pull request Sep 25, 2026
All four interpreter builds failed while cythonizing scip.pyx:

  src/pyscipopt/matrix.pxi:236:4: 'axis' redeclared

PySCIPOpt 6.2.1 requires an unpinned "cython >=0.21", so the isolated
build pulls Cython 3.3.0, which rejects the annotated re-assignment of
the `axis` parameter. Backport upstream's fix (scipopt/PySCIPOpt#1248,
ca6631b) as a patch applied before cibuildwheel.

The same log also shows setup.py picking /project/scip/lib64: the
before-all moves the libraries into lib/ but left an empty lib64/
behind, and setup.py prefers lib64 when it exists, so the link would
fail next. Move only lib/, include/ and bin/ into the project, matching
what upstream's libscip-linux.zip contains.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error compiling/Cythonizing with Cython 3.3.0: 'axis' redeclared

2 participants