glass icon indicating copy to clipboard operation
glass copied to clipboard

gh-336: support Python 3.13

Open Saransh-cpp opened this issue 1 year ago • 2 comments

  • Add Python 3.13 classifier
  • Test on Python 3.13 in CI
  • Support for Python 3.13 in noxfile

Closes: #336

Saransh-cpp avatar Oct 08 '24 09:10 Saransh-cpp

Version 3.13 was not found in the local cache Error: The version '3.13' with architecture 'x64' was not found for Ubuntu 22.04. The list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json

I am not sure where the cache is coming from. I have tried re-running this multiple times and have also deleted the existing caches from GitHub Actions, but it somehow does not work. I will try re-running this later today, and maybe create an issue in setup-python if it still does not work? (Other pure-python repositories that I work on are not encountering this issue).

cc: @paddyroddy

Saransh-cpp avatar Oct 08 '24 11:10 Saransh-cpp

It will take some time for 3.13 to become available across GitHub

paddyroddy avatar Oct 08 '24 11:10 paddyroddy

Ah, healpix does not have 3.13 binaries on PyPI and we don't allow pip to build it from source -

https://github.com/glass-dev/glass/blob/1631757e7436a89501497aff3f8592a4729294f0/.github/test-constraints.txt#L11

I think this will have to wait till 3.13 wheels of healpix are available on PyPI.

cc: @ntessore

Saransh-cpp avatar Oct 09 '24 15:10 Saransh-cpp

Ah, healpix does not have 3.13 binaries on PyPI and we don't allow pip to build it from source -

We should definitely wait until all dependencies have 3.13 support. It is quite common for the ecosystem to take a while to catch up.

paddyroddy avatar Oct 09 '24 16:10 paddyroddy

healpix for cp313 has been uploaded

ntessore avatar Oct 10 '24 21:10 ntessore

Just marking as ready to see what happens in CI

paddyroddy avatar Oct 11 '24 09:10 paddyroddy

Also built flt wheels for cp312 and cp313. Excluding healpy, are these all of our native extension dependencies done?

ntessore avatar Oct 11 '24 11:10 ntessore

Also built flt wheels for cp312 and cp313. Excluding healpy, are these all of our native extension dependencies done?

I think so, hard to tell really unless we comment out healpy

paddyroddy avatar Oct 11 '24 11:10 paddyroddy

Still waiting on a new healpy release does make me wonder if our CI wouldn't be better served by using conda ... But this probably causes a lot of issues with tox/nox?

ntessore avatar Oct 15 '24 11:10 ntessore

Still waiting on a new healpy release does make me wonder if our CI wouldn't be better served by using conda ... But this probably causes a lot of issues with tox/nox?

Unless I've missed something, conda alone won't sort 3.13 support? It's still on the same version v1.17.3 https://anaconda.org/conda-forge/healpy, so will still need the library fixing.

Some libraries take a long time to support a new release, for example check out https://github.com/numba/numba/issues/9197.

A different question is do we need healpy as well as healpix?

paddyroddy avatar Oct 15 '24 11:10 paddyroddy

Unless I've missed something, conda alone won't sort 3.13 support? It's still on the same version v1.17.3 https://anaconda.org/conda-forge/healpy, so will still need the library fixing.

But conda has already provided 3.13 binaries for healpy 1.17.3 – healpy maintainers could add those to PyPI, like I did for healpix and flt.

Some libraries take a long time to support a new release, for example check out numba/numba#9197.

In my experience, that is only numba, which is understandable given what they have to go through.

A different question is do we need healpy as well as healpix?

The healpix package only deals with the HEALPix discretisation as such, but doesn't provide a spherical harmonic transform. Moving away from healpy for the latter is a long-term goal for GLASS, since healpy doesn't work on Windows (and many students come with Windows machines). In fact, I am looking forward to moving towards a generic Array API backend, since that is a very natural point to make that switch.

ntessore avatar Oct 15 '24 12:10 ntessore

But conda has already provided 3.13 binaries for healpy 1.17.3 – healpy maintainers could add those to PyPI, like I did for healpix and flt.

Ah yes, I see that now.

In my experience, that is only numba, which is understandable given what they have to go through.

You're very lucky, you've only had delays with numba!

paddyroddy avatar Oct 15 '24 13:10 paddyroddy

Still waiting on a new healpy release does make me wonder if our CI wouldn't be better served by using conda ... But this probably causes a lot of issues with tox/nox?

I do think we want to use whatever you anticipate end users using. I don't use conda these days in favour of uv.

paddyroddy avatar Oct 15 '24 13:10 paddyroddy

@paddyroddy, is this now blocked by something?

Saransh-cpp avatar Nov 08 '24 11:11 Saransh-cpp

@paddyroddy, is this now blocked by something?

Nope, sorry! I think I forgot this was only adding 3.13 support, not removing 3.9.

paddyroddy avatar Nov 08 '24 12:11 paddyroddy