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

pythonPackages311.pysha3: replace with safe-pysha3 #232845

Merged
merged 1 commit into from
May 20, 2023

Conversation

nevivurn
Copy link
Member

@nevivurn nevivurn commented May 19, 2023

Description of changes

ZHF: #230712

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • 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/)
  • 23.05 Release Notes (or backporting 22.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.

@nevivurn
Copy link
Member Author

Right, assuming the packages would have otherwise been built successfully, this breaks builds for python < 3.9. This only affects eth-hash as far as I can tell.

@wegank
Copy link
Member

wegank commented May 19, 2023

We could also remove python3Packages.manticore (and its dependency python3Packages.wasm) from nixpkgs:

disabled = pythonAtLeast "3.10"; # project is abandoned, remove we whe move to py310/311

@nevivurn
Copy link
Member Author

Sure thing. For future reference, is it written out anywhere which python versions are supported for a given release of nixpkgs / when it is OK to remove non-building packages?

@ofborg ofborg bot added 8.has: clean-up 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels May 19, 2023
@wegank
Copy link
Member

wegank commented May 19, 2023

I don't think that's documented, but you can usually figure it out by looking in pkgs/top-level/all-packages.nix:

  python27Packages = python27.pkgs;
  python38Packages = python38.pkgs;
  python39Packages = python39.pkgs;
  python310Packages = recurseIntoAttrs python310.pkgs;
  python311Packages = recurseIntoAttrs python311.pkgs;
  python312Packages = python312.pkgs;

Only the package sets with recurseIntoAttrs are built and cached.

@SuperSandro2000
Copy link
Member

  • But the package name is different and may break builds, not sure if I should delete the alias?

Is the import name the same?

@nevivurn
Copy link
Member Author

nevivurn commented May 19, 2023

Is the import name the same?

Yes, both pysha3 and safe-pysha3 provide sha3 (and monkey-patch hashlib). Might still require some patching in setup.py like https://github.com/NixOS/nixpkgs/blob/5c8385332672f54002e21c5fdd477c9ee50de876/pkgs/development/python-modules/manticore/default.nix#L61

@nevivurn
Copy link
Member Author

rebased due to conflicts from #232892

@@ -225,6 +225,7 @@ mapAliases ({
Pyro4 = pyro4; # added 2023-02-19
Pyro5 = pyro5; # added 2023-02-19
PyRSS2Gen = pyrss2gen; # added 2023-02-19
pysha3 = safe-pysha3; # added 2023-05-19
Copy link
Member

Choose a reason for hiding this comment

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

Probably just deprecate it instead, if additional postPatch is needed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@wegank wegank merged commit 3fcf68e into NixOS:master May 20, 2023
@nevivurn nevivurn deleted the feature/pysha3 branch May 20, 2023 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: python 8.has: clean-up 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants