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

Support python 3.13 #179

Open
ManonMarchand opened this issue Oct 15, 2024 · 6 comments · May be fixed by #183
Open

Support python 3.13 #179

ManonMarchand opened this issue Oct 15, 2024 · 6 comments · May be fixed by #183

Comments

@ManonMarchand
Copy link
Member

This is blocked by pyerfa (mandatory astropy dependency) for now. Should be good as soon as they release a version >2.0.1.4

@neutrinoceros
Copy link
Contributor

@ManonMarchand pyerfa 2.0.1.4 should already be compatible with Python 3.13 because it's compiled with Python's Limited C API

@ManonMarchand
Copy link
Member Author

I thought our CI failed due to pyerfa when I added python 3.13, but reading it again... maybe I'm wrong. Can you give us pointers on why it failed? See the run here: https://github.com/cds-astro/mocpy/actions/runs/11345966890/job/31553997210#step:5:5511

@neutrinoceros
Copy link
Contributor

It seeems this job is using the free-threaded version of Python 3.13 (shorthand: 3.13t), which is indeed incompatible with Python's Limited C API: this bit is solved in pyerfa (dev) and will indeed require a release there, however you shouldn't have this issue with the default (GIL-enabled) build for Python 3.13.
The part I don't understand at the moment is why you're getting 3.13t instead of a regular 3.13 in CI

@neutrinoceros
Copy link
Contributor

Oh I see, you're getting Python builds straight from a docker container (quay.io/pypa/manylinux2014_x86_64), and it looks like the only Python 3.13 that is in store is free-threaded.
Even if we release pyerfa with the fix for building in this env, it's a bit of a gamble to test 3.13t before 3.13, as your dependencies might not be compatible with this new and experimental build, so I would suggest finding ways to access a regular 3.13 build in CI if you can.

@ManonMarchand
Copy link
Member Author

ManonMarchand commented Nov 11, 2024

That's clearer, thanks. We'll investigate building wheels with an other base image. Do you need support for python3.13 soon?

However, we'll still need to support both 3.13 and 3.13t, since the manylinux2014 build was requested by our users.

@neutrinoceros
Copy link
Contributor

Do you need support for python3.13 soon?

No, I'm just looking for packages in the broad astropy ecosystem that might need a hand with ensuring compatibility, and this looked like the blocking issue for astroquery, but I do not need it personally.

we'll still need to support both 3.13 and 3.13t

Then I'd advise to be extra careful when communicating the level of support for 3.13t: even if your test suite pass on a single thread, it won't mean that you have free-threading compatibility out of the box, though it's still worth mentionning.

See this excellent resource if needed https://py-free-threading.github.io/

@ManonMarchand ManonMarchand linked a pull request Nov 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants