From 2c68d6b0298d430fdd0f498ec6b27b49193f8b1c Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 22 Mar 2024 16:33:37 +0100 Subject: [PATCH] python311Packages.packaging: 23.2 -> 24.0 https://github.com/pypa/packaging/blob/24.0/CHANGELOG.rst The `requires_dist` field now defaults to `None`, if the package does not specify any requirements. --- .../python/hooks/python-runtime-deps-check-hook.py | 7 ++++++- pkgs/development/python-modules/packaging/default.nix | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/development/interpreters/python/hooks/python-runtime-deps-check-hook.py b/pkgs/development/interpreters/python/hooks/python-runtime-deps-check-hook.py index 11687e585121..36ce389de50f 100644 --- a/pkgs/development/interpreters/python/hooks/python-runtime-deps-check-hook.py +++ b/pkgs/development/interpreters/python/hooks/python-runtime-deps-check-hook.py @@ -91,7 +91,12 @@ if __name__ == "__main__": args = argparser.parse_args() metadata = get_metadata(args.wheel) - tests = [test_requirement(requirement) for requirement in metadata.requires_dist] + requirements = metadata.requires_dist + + if not requirements: + sys.exit(0) + + tests = [test_requirement(requirement) for requirement in requirements] if not all(tests): sys.exit(1) diff --git a/pkgs/development/python-modules/packaging/default.nix b/pkgs/development/python-modules/packaging/default.nix index 123c1230fc87..32ce7fd8accb 100644 --- a/pkgs/development/python-modules/packaging/default.nix +++ b/pkgs/development/python-modules/packaging/default.nix @@ -14,14 +14,14 @@ let packaging = buildPythonPackage rec { pname = "packaging"; - version = "23.2"; + version = "24.0"; pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-BI+w6UBQNlGOqvSKVZU8dQwR4aG2jg3RqdYu0MCSz8U="; + hash = "sha256-64LF4+ViCQdHZuaIW7BLjDigwBXQowA26+fs40yZiek="; }; nativeBuildInputs = [