Skip to content

fix: Cython>=3.0 and Python 3.13 compatibility#122

Open
davecwright3 wants to merge 2 commits intonanograv:devfrom
davecwright3:feat/cython-3-compat
Open

fix: Cython>=3.0 and Python 3.13 compatibility#122
davecwright3 wants to merge 2 commits intonanograv:devfrom
davecwright3:feat/cython-3-compat

Conversation

@davecwright3
Copy link
Collaborator

@davecwright3 davecwright3 commented Nov 1, 2025

Description

This PR migrates the Cython utilities to Cython 3.0. It mostly is just additional flags for exceptions.

The PR also makes holodeck compatible with Python 3.13. This was a simple fix in cyutils.sam_poisson_gwb. long is no longer exposed in the C API in Python 3.13, but calling int is the same thing and is backwards compatible.

Todos

Notable points that this PR has either accomplished or will accomplish.

  • Migrate to Cython 3.0
  • Bumps NumPy lower bound to a version compatible with Cython 3.0
  • Add Python 3.13 compatibility

Status

  • Builds (fails tests but tests were already failing)
  • Confirmed locally that all builds 3.9-3.13 work on linux
  • Tests from Mac users
  • Tests from Windows users

As the status above suggests, I'd like to get some Mac and Windows users to check that the builds work.

@davecwright3 davecwright3 added the enhancement New feature or request label Nov 1, 2025
@kayhangultekin kayhangultekin self-assigned this Nov 6, 2025
@kayhangultekin
Copy link
Collaborator

Does this override #121 ?

@kayhangultekin
Copy link
Collaborator

I can confirm it works on my macOS 15.7.2 (Sequoia) Intel Xeon W iMac (from 2017). I will test on my M1 laptop next.

@kayhangultekin
Copy link
Collaborator

Can confirm it runs on my macOS 26.0.1 (Tahoe) Apple M2 laptop.

@kayhangultekin
Copy link
Collaborator

@jjohnpeter , Can you see if this PR (1) works for you on your windows set up and (2) does it fix the long long int issue you saw in #121 ?

@jjohnpeter
Copy link

@jjohnpeter , Can you see if this PR (1) works for you on your windows set up and (2) does it fix the long long int issue you saw in #121 ?

I tested the PR on my Windows setup, and it compiles and builds successfully without errors. It does not fix the long long int mismatch I was seeing in #121 though.

@kayhangultekin
Copy link
Collaborator

Thanks @jjohnpeter!

I see no reason not to merge this. @davecwright3 is building and running a single SAM notebook sufficient testing for you?

I will return to #121.

@davecwright3
Copy link
Collaborator Author

@kayhangultekin I forgot to add Python 3.13 tests. I'll add them in the next few days to this pull request.

@davecwright3
Copy link
Collaborator Author

The force push was a rebase onto dev. This should be good to go. Although, we could merge #124 first, then I can rebase again so that we can run the tests on this via GitHub actions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants