Support Python 3.14 and upgrade NumPy to 2.x#519
Open
Conversation
The test in test_scan_map.py, `test_scan_map_no_interpolation`, was simplified a lot: the first part re-implemented the code of the binner but was no longer working because of updates in AstroPy pointing precision.
For some weird reason, it fails to run with Python 3.14.3 and NumPy 2.2.6
Member
Author
|
I forgot to say that, unlike NumPy and AstroPy, we are not dropping support for Python 3.10, which is the reason why I did not upgrade NumPy and AstroPy to the latest version. The End of Life for Python 3.10 is scheduled for October 2026, so we have still some time before dropping support for it. |
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||||||||
Every new release of ty introduces new features and checks. This makes hard to create new PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With the release of PySM3 3.4.4, we can finally add support for Python 3.14 and update a few dependencies; most notably, we can now drop support for NumPy 1.x and move to NumPy 2.x.
The transition was not seamless, though. It seems that
np.testing.assert_allclose()causes weird memory corruption errors when used with Py 3.14 + NumPy 2.2, so I had to change it toassert np.allclose()(which does not seem to suffer from the same problem).Because of an updated dependency on AstroPy, a few tests that relied on HealPy to convert Equatorial coordinates into Galactic coordinates started failing, probably because of an update in the transformation matrices used by AstroPy. In a few cases I modified tests to stop using HealPy to do the conversion, but for
test_scan_map.pyI realized that the very long test on the binner could be significantly simplified, as in the first part it just re-implemented the map-making equation to compare it with the result of the binner. As a consequence, this test now runs in ~50% of the time.