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

python313Packages.simplekv: fix inputs #388393

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fabaff
Copy link
Member

@fabaff fabaff commented Mar 9, 2025

Related #382050

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/)
  • 25.05 Release Notes (or backporting 24.11 and 25.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.

@fabaff
Copy link
Member Author

fabaff commented Mar 9, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 388393


x86_64-linux

✅ 4 packages built:
  • python312Packages.simplekv
  • python312Packages.simplekv.dist
  • python313Packages.simplekv
  • python313Packages.simplekv.dist

@bengsparks
Copy link

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 388393


x86_64-linux

✅ 4 packages built:
  • python312Packages.simplekv
  • python312Packages.simplekv.dist
  • python313Packages.simplekv
  • python313Packages.simplekv.dist

aarch64-linux

✅ 4 packages built:
  • python312Packages.simplekv
  • python312Packages.simplekv.dist
  • python313Packages.simplekv
  • python313Packages.simplekv.dist

x86_64-darwin

✅ 4 packages built:
  • python312Packages.simplekv
  • python312Packages.simplekv.dist
  • python313Packages.simplekv
  • python313Packages.simplekv.dist

aarch64-darwin

✅ 4 packages built:
  • python312Packages.simplekv
  • python312Packages.simplekv.dist
  • python313Packages.simplekv
  • python313Packages.simplekv.dist

@@ -26,8 +26,9 @@ buildPythonPackage rec {

build-system = [ setuptools ];

dependencies = [
dulwich
dependencies = [ dulwich ];
Copy link

@bengsparks bengsparks Mar 9, 2025

Choose a reason for hiding this comment

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

I hope I'm not nitpicking; simplekv's tox.ini lists more dependencies, that when missing causes their tests to be skipped.

Is this an appropriate time to add these dependencies (as optional-dependencies?)?
If so, I would recommend adding pytest-xdist to the nativeCheckInputs, as the tests already take quite long (5 - 6 minutes per test suite per system) to run.

Copy link
Contributor

Choose a reason for hiding this comment

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

dulwich is no more important here than, say, redis is. Preferring one over the other because your client requires it is frankly being lazy.

I have spelled my opinions about this out here, but will repeat a bit:

simplekv is doing the "python thing" and saying that everything is optional because no one subset is required for any particular user's requirements. I don't want dulwich as I don't require it, but @fabaff shouldn't need redis if they don't require it either.

I think that if we could do grouped dependencies in optional-dependencies, everything should be in optional-dependencies. Since we cannot, I think it makes sense to leave that completely empty, remove pytestCheckHook from dependencies (as is done here) and rely on the consumer to know how this library works (this is a common pattern in python code and I think it makes sense to map it this way).

However, I recognize the incorrectness of this and would also be fine moving everything into optional-dependencies. It's more work for little gain, but it is the right thing to do in the Nix space.

We should not be adding dulwich like this though. It is wrong from both nix's point of view and from python's.

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Mar 9, 2025
@@ -26,8 +26,9 @@ buildPythonPackage rec {

build-system = [ setuptools ];

dependencies = [
dulwich
dependencies = [ dulwich ];
Copy link
Contributor

Choose a reason for hiding this comment

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

dulwich is no more important here than, say, redis is. Preferring one over the other because your client requires it is frankly being lazy.

I have spelled my opinions about this out here, but will repeat a bit:

simplekv is doing the "python thing" and saying that everything is optional because no one subset is required for any particular user's requirements. I don't want dulwich as I don't require it, but @fabaff shouldn't need redis if they don't require it either.

I think that if we could do grouped dependencies in optional-dependencies, everything should be in optional-dependencies. Since we cannot, I think it makes sense to leave that completely empty, remove pytestCheckHook from dependencies (as is done here) and rely on the consumer to know how this library works (this is a common pattern in python code and I think it makes sense to map it this way).

However, I recognize the incorrectness of this and would also be fine moving everything into optional-dependencies. It's more work for little gain, but it is the right thing to do in the Nix space.

We should not be adding dulwich like this though. It is wrong from both nix's point of view and from python's.

@bbenne10
Copy link
Contributor

I misunderstood optional-dependencies, but most of my point still stands. The hard work is left to be done (figuring out what imports this library requires and mapping them into optional-dependencies as groups.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants