Skip to content

Revert "python312Packages.numba: use a single numpy version; don't propagate it"#338884

Merged
dotlambda merged 2 commits intoNixOS:masterfrom
dotlambda:python3Packages.numba
Sep 5, 2024
Merged

Revert "python312Packages.numba: use a single numpy version; don't propagate it"#338884
dotlambda merged 2 commits intoNixOS:masterfrom
dotlambda:python3Packages.numba

Conversation

@dotlambda
Copy link
Member

@dotlambda dotlambda commented Sep 1, 2024

Description of changes

This reverts commit 3bad188.
Numba doesn't work without NumPy and it's in upstream's setup_requires as well as install_requires.

Things done

  • Built on platform(s)
    • 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.11 Release Notes (or backporting 23.11 and 24.05 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.

@dotlambda dotlambda requested a review from doronbehar September 1, 2024 19:46
@github-actions github-actions bot added the 6.topic: python Python is a high-level, general-purpose programming language. label Sep 1, 2024
@ofborg ofborg bot added 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. labels Sep 1, 2024
Copy link
Member

@natsukium natsukium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That PR also removed numpy from build-system.

@dotlambda dotlambda force-pushed the python3Packages.numba branch from 7afe2d5 to 8fc50a5 Compare September 2, 2024 00:34
…opagate it"

This reverts commit 3bad188.
Numba doesn't work without NumPy and it's in upstream's setup_requires
as well as install_requires.
@dotlambda dotlambda force-pushed the python3Packages.numba branch from 8fc50a5 to 9fe3c86 Compare September 2, 2024 00:34
@dotlambda dotlambda changed the title python312Packages.numba: move numpy to dependencies Revert "python312Packages.numba: use a single numpy version; don't propagate it" Sep 2, 2024
@dotlambda dotlambda requested a review from natsukium September 2, 2024 00:35
@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one person. label Sep 4, 2024
Copy link
Contributor

@doronbehar doronbehar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry but I don't agree with this policy. If there was a single numpy version in all of python3.pkgs, we wouldn't have argued so much. If you'd be able to iterate all usages of numpy_1 and make sure that there are no breakages when that is upgraded to numpy_2, I will let it go.

@dotlambda
Copy link
Member Author

If there was a single numpy version in all of python3.pkgs

There is, at least once this PR is merged. Every Python package uses numpy rather than numpy_2.

If you'd be able to iterate all usages of numpy_1 and make sure that there are no breakages when that is upgraded to numpy_2, I will let it go.

I already showed you how you'd make sure of that: #327446 (comment)

@doronbehar Honestly, you're not engaging with my proposed solutions so I don't see why I should keep arguing against your non-solution.
But again, it's a non-solution because as of right now, python3.withPackages (ps: [ ps.numba ]) is broken:

$ python3 -c "import numba"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/nix/store/w5af1gfflkph66mrghmqdhvxspz2dl7y-python3-3.12.5-env/lib/python3.12/site-packages/numba/__init__.py", line 54, in <module>
    _ensure_critical_deps()
  File "/nix/store/w5af1gfflkph66mrghmqdhvxspz2dl7y-python3-3.12.5-env/lib/python3.12/site-packages/numba/__init__.py", line 34, in _ensure_critical_deps
    import numpy as np
ModuleNotFoundError: No module named 'numpy'

@dotlambda dotlambda dismissed doronbehar’s stale review September 5, 2024 00:00

The Python maintainers disagree.

@dotlambda dotlambda merged commit 05238d5 into NixOS:master Sep 5, 2024
@dotlambda dotlambda deleted the python3Packages.numba branch September 5, 2024 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: python Python is a high-level, general-purpose programming language. 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants