Skip to content
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

Enable cython 3 #2151

Merged
merged 9 commits into from Aug 16, 2023
Merged

Enable cython 3 #2151

merged 9 commits into from Aug 16, 2023

Conversation

Ericgig
Copy link
Member

@Ericgig Ericgig commented Apr 12, 2023

Description
Ensure qutip works with cython 3.0.

  • nogil must come after except.
  • Set the options c_api_binop_methods=True to keep previous behaviour of operators.
  • Have one of the test case use cython 3.

There is a bug in cython 3.0.0b2 with overflowcheck that makes it unable to compile qutip. I works with 3.0.0.b1 and should work with the next release. See cython#5358

Related issues or PRs
close #2117

@Ericgig
Copy link
Member Author

Ericgig commented Apr 12, 2023

This require cython>=0.29.32...

.github/workflows/tests.yml Outdated Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Apr 12, 2023

Coverage Status

coverage: 84.655%. remained the same when pulling 6e05e97 on Ericgig:misc.cython3 into 5fa0ca6 on qutip:master.

@Ericgig
Copy link
Member Author

Ericgig commented Jun 6, 2023

cython 3.0.0b3 is out, but another conflict appeared, see cython#5472.

@Ericgig Ericgig marked this pull request as ready for review August 16, 2023 19:57
@Ericgig
Copy link
Member Author

Ericgig commented Aug 16, 2023

@hodgestar
Instead of waiting for the fix to be released in cython, I commented the missing feature: data specializations' __module__.

@Ericgig Ericgig merged commit b3e489b into qutip:master Aug 16, 2023
12 checks passed
@Ericgig Ericgig deleted the misc.cython3 branch August 16, 2023 22:37
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.

Prepare qutip for cython 3.0
3 participants