-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add support for Python 3.13 and numpy 2 #27
Conversation
53b79e6
to
8264312
Compare
2e3f24b
to
e647b76
Compare
@kbarbary could you please enable the CI workflow and review when possible? |
@kbarbary cpython 3.13 is now released. Please consider merging this PR. |
Hi @lukeshingles. Have you thought about making your extinction repo available for the community? It looks like @kbarbary has not replied in years. See also sep where someone else "took over". |
@temuller I'm on a fixed term contract, so if I leave academia, I would also end up abandoning the repository. Ideally, a permanent staff member should fork and maintain this repo. The good news is that I am now able to pip install extinction on python3.13 and build from source successfully for whatever reason. This was probably fixed by some update to Cython, numpy, etc. |
Many apologies for not replying until now. I left the field of astrophysics for industry 7 years ago. At the time in 2017, I left my widely used projects (sep and extinction) in a good up-to-date state and called them feature complete. After that, I did a good job keeping up with minor maintenance for the first few years, but as time has gone on, my life has other priorities and my paying job and personal life always seem to come ahead of maintenance tasks on my astrophysics code projects. I've been meaning to catch up with the emails and github notifications, but it's always too low on my "to do" list. I feel quite bad for the community using this project for the numpy deprecations and lack of new Python version support that I haven't addressed -- I know how annoying this stuff can be! Clearly this needs a new maintainer. Anyway, I'm looking for someone interested in taking over support for this project, similar to what happened with sep where Peter Watson and I recently created the http://github.com/sep-developers organization and transferred ownership of the sep repo to it, along with maintainer access to the associated PyPI and readthedocs projects. I'll first inquire with the sncosmo folks in sncosmo/sncosmo#372 if the sncosmo organization wants to take over ownership. Otherwise, @lukeshingles would you be interested in taking over ownership of the repo? Alternatively, I could give PyPI access to anyone interested in creating new releases. |
@benjaminrose has agreed to have this package moved to the sncosmo organization. Is that an OK solution for you @lukeshingles (and @temuller)? If you're interested in managing new releases for this package, I'd imagine they'd love to add you to that org and/or the PyPI project for extinction. Thanks for your contributions here! |
@kbarbary Great solution, thanks! I can’t guarantee for how long I’ll be in astronomy, but would be happy to help keep the package building and installing in the meantime. |
@lukeshingles The repo has been transferred and I invited you to join sncosmo and the PyPI project. |
d9fc86f
to
8f609f1
Compare
Unless I'm mistaken, @lukeshingles pushing this merge to PyPI makes extinction not work with numpy <2.0 on modern python versions. That will break a lot of people's code, including SNCosmo. Can we discus this before merging and pushing to PyPI? |
Hello, sorry, but a new version is already uploaded to PyPI. The numpy 2.0 migration guide says that packages built with numpy 2 can be installed on environments with numpy 1.x. Can you tell me if something has become broken and I'll prioritise a fix/rollback? |
Hey, I can confirm that extinction 0.4.7 from PyPI works with current sncosmo:
(irrelevant lines abbreviated with ... for clarity) As the migration guide says, the Numpy 2 ABI is backwards-compatible with Numpy 1, but Numpy 1 is not forwards-compatible with Numpy 2. This is why this PR required |
Thanks @jvansanten. I missed that the numpy 2.0 was under the build requirements and not the runtime! Thanks to both you and @lukeshingles for helping get these two projects working with Numpy 2. |
Hi, thanks for the very useful extinction package. We depend on it when plotting observed spectra for comparison with our models with the https://github.com/artis-mcrt/artistools package.
cpython3.13 is now in the release candidate stage, which means that the ABI is stable and wheels can now be published to PyPI. The latest version of cibuildwheel now builds py313 wheels by default.
Building extinction with the cpython 3.13 headers results in a compilation error that is resolved when updating the C standard from C99 to C11. I also updated the GitHub actions workflows to test and build wheels for python3.13.
Fixes #26 by upgrading to numpy 2 when building for cpython >= 3.9 (installation still supports numpy 1). The minimum python version increased from 3.5 to 3.6 because this is the oldest version I can get to work on GitHub actions.