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

Fix Cython 3.3 compatibility#1248
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.

@Labeeb2339 Labeeb2339 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I reviewed the Cython compatibility change. Normalizing the public axis argument into axis_tuple keeps the original axis parameter available while updating every downstream membership, shape, and transpose use consistently. The change is minimal and directly addresses the typed redeclaration, and I found no additional issue in the diff.

@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
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

3 participants