fix: tighten minimum astropy/numpy/scipy dependency versions#316
Merged
Conversation
The previous floors (numpy>=1.6.2, scipy>=0.12.0, astropy>=1.1) predate
hmf's Python>=3.12 requirement by years. Because these bounds are so
permissive, pip can leave an already-installed but incompatible package
version in place ("Requirement already satisfied") instead of upgrading
it, which is what caused the astropy `_nu_info` AttributeError reported
in #286. Bump the floors to the earliest versions of each package that
actually support Python 3.12.
Fixes #286
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #316 +/- ##
=======================================
Coverage 97.86% 97.86%
=======================================
Files 26 26
Lines 2671 2671
=======================================
Hits 2614 2614
Misses 57 57 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The changelog is now generated from GitHub Release notes rather than CHANGELOG.rst, so hand-editing that file is stale/confusing. Add a note to AGENTS.md so this isn't repeated, plus a CLAUDE.md pointer to it.
steven-murray
enabled auto-merge (squash)
July 5, 2026 18:24
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.
Summary
'FlatLambdaCDM' object has no attribute '_nu_info') was already fixed onmainby fix: replace deprecated _nu_info with public has_massive_nu API #307, which replaced the privatecosmo._nu_info.has_massive_nuaccess with the publiccosmo.has_massive_nu/cosmo.nu_relative_densityAPI.pyproject.tomlstill listednumpy>=1.6.2,scipy>=0.12.0,astropy>=1.1, versions that predate this project'srequires-python = ">=3.12"by years. Because pip only upgrades a package when the installed version doesn't satisfy the constraint, an environment with an old-but-installed astropy could silently keep it ("Requirement already satisfied") instead of picking a version that actually matches what hmf needs.numpy>=1.26,scipy>=1.11,astropy>=6.0. Regenerateduv.lockto match.Test plan
uv run pytest tests/test_growth.py tests/test_transfer.py tests/test_cosmo.py— 64 passed, 1 skippeduv lockregenerates cleanly with no other changesFixes #286