Merged
Conversation
Owner
|
Thanks for the PR @h-mayorquin !
I looked into this and I don't think the dependency bump is necessary. If users want to use numpy 1.x with pynwb 2.6 and hdmf 3.13, they should be able to. If users want numpy 2.x, then later releases of pynwb/hdmf support that, and pip will resolve the latest compatible versions by default. I think we should be careful about unnecessarily raising lower bounds, which limits compatibility with other libraries users may need. Instead of bumping up the minimum dependencies when we move the minimum tests to Python 3.10+, I suggest we add a numpy<2 pin to the min-reqs to keep the test valid. |
Contributor
Author
|
@rly Ok, take a look at the latest commit. |
Owner
|
That looks great. Thank you! |
rly
approved these changes
Feb 27, 2026
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.
This PR makes three changes:
1. Fix NumPy 2.0 compatibility by updating minimum dependencies
The problem manifests when a user installs ndx-pose on Python 3.10+ with the old minimum dependencies (
pynwb==2.6.0,hdmf==3.13.0). Since pip resolves the newest compatible versions of transitive dependencies, it installs NumPy 2.0+ (released June 2024), which removednp.string_in favor ofnp.bytes_. However, neitherpynwb==2.6.0norhdmf==3.13.0pin NumPy<2.0 or contain fixes for NumPy 2.0 compatibility - hdmf didn't add NumPy 2.0 support until version 4.0.0 (released January 2025). This causes a runtimeAttributeErrorwhen reading/writing NWB files. The fix is to bump the minimum dependencies tohdmf>=4.0.0andpynwb>=3.0.0(the first pynwb compatible with hdmf 4.0+), ensuring any installation gets NumPy 2.0-compatible code.2. Drop Python 3.8 and 3.9 support
Python 3.8 reached end-of-life in October 2024 and Python 3.9 reaches end-of-life in October 2025. This PR updates the minimum Python version to 3.10 and removes 3.8/3.9 from the CI test matrix.
3. Use PEP 735 dependency groups
Migrates from
[project.optional-dependencies]to[dependency-groups]as specified in PEP 735.