Skip to content
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

python312Packages.numpy_2: init at 2.0.0 #310837

Merged
merged 2 commits into from
Jun 17, 2024
Merged

Conversation

mweinelt
Copy link
Member

@mweinelt mweinelt commented May 11, 2024

https://github.com/numpy/numpy/releases/tag/v2.0.0

can probably wait until after the branch-off

Description of changes

Things done

  • Built on platform(s)
    • i686-linux
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@l0b0
Copy link
Contributor

l0b0 commented May 15, 2024

FYI, numexpr v2.10.0 already depends on this.

@mweinelt
Copy link
Member Author

For libraries, we can only offer exactly one version of a popular dependency, because otherwise we'd run into conflicts, if different versions were propagated into some package.

Check if you can get numexpr unpinned, else downgrade it.

l0b0 added a commit to linz/emergency-management-tools that referenced this pull request May 15, 2024
Challenges:

- Upgrade GDAL to <3.9 because of
   <NixOS/nixpkgs#311310>.
- Upgrade numexpr to <2.10 because of
   <NixOS/nixpkgs#310837>.
- Had to add Cython 0 to the color-operations build inputs
   <nix-community/poetry2nix#1658>
@natsukium
Copy link
Member

numexpr has already been patched in a00fc32.

Due to ABI compatibility, the number of packages that require numpy2 as a build-time dependency is increasing, but I have yet to see one that requires numpy2 as a runtime dependency.

l0b0 added a commit to linz/emergency-management-tools that referenced this pull request May 23, 2024
Challenges:

- Had to hold back GDAL from 3.9 because it's not yet in nixpkgs
   <NixOS/nixpkgs#311310>.
- Had to hold back numexpr from 2.10 because it's not yet in nixpkgs
   <NixOS/nixpkgs#310837>.
- Had to hold back matplotlib from 3.9 because it needs a poetry2nix
   override <nix-community/poetry2nix#1659>.
- Had to force sat-search version 0.3.0 to avoid Poetry downgrading it to
   0.1.0.
- Had to add Cython 0 to the color-operations build inputs
   <nix-community/poetry2nix#1658>.

Script:

```bash
cd flooding/sentinel2_water_extraction
poetry add --lock gdal="<3.9" matplotlib="<3.9" numexpr="<2.10" sat-search=">=0.3.0"
poetry update --lock
git checkout pyproject.toml
poetry lock --no-update
cd ../sentinel1_water_extraction/
poetry add --lock gdal="<3.9"
poetry update --lock
git checkout pyproject.toml
poetry lock --no-update
```
l0b0 added a commit to linz/emergency-management-tools that referenced this pull request May 23, 2024
Challenges:

- Had to hold back GDAL from 3.9 because it's not yet in nixpkgs
   <NixOS/nixpkgs#311310>.
- Had to hold back numexpr from 2.10 because it's not yet in nixpkgs
   <NixOS/nixpkgs#310837>.
- Had to hold back matplotlib from 3.9 because it needs a poetry2nix
   override <nix-community/poetry2nix#1659>.
- Had to force sat-search version 0.3.0 to avoid Poetry downgrading it to
   0.1.0.
- Had to add Cython 0 to the color-operations build inputs
   <nix-community/poetry2nix#1658>.

Script:

```bash
cd flooding/sentinel2_water_extraction
poetry add --lock gdal="<3.9" matplotlib="<3.9" numexpr="<2.10" sat-search=">=0.3.0"
poetry update --lock
git checkout pyproject.toml
poetry lock --no-update
cd ../sentinel1_water_extraction/
poetry add --lock gdal="<3.9"
poetry update --lock
git checkout pyproject.toml
poetry lock --no-update
```
@mweinelt mweinelt changed the title python312Packages.numpy_2: init at 2.0.0rc1 python312Packages.numpy_2: init at 2.0.0rc2 Jun 16, 2024
@mweinelt mweinelt force-pushed the numpy2 branch 5 times, most recently from f54b227 to 68b3ff5 Compare June 16, 2024 22:00
@mweinelt mweinelt marked this pull request as draft June 16, 2024 22:01
@mweinelt mweinelt changed the base branch from master to staging June 16, 2024 22:02
@mweinelt mweinelt marked this pull request as ready for review June 16, 2024 22:03
https://github.com/numpy/numpy/releases/tag/v2.0.0

Default for Python 3.13, since Numpy 1.26.x lacks support for it.
Removes deprecated and removed unittest module functions.
@mweinelt
Copy link
Member Author

Retested on Python 3.11/3.12/3.13 on x86_64-linux.

@natsukium natsukium changed the title python312Packages.numpy_2: init at 2.0.0rc2 python312Packages.numpy_2: init at 2.0.0 Jun 17, 2024
@natsukium natsukium merged commit 7896ea2 into NixOS:staging Jun 17, 2024
28 of 30 checks passed
@mweinelt mweinelt deleted the numpy2 branch June 17, 2024 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants