From 3f90c530b272d5e90d7526a351013777ff89193b Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Thu, 4 Jan 2024 22:34:23 +0100 Subject: [PATCH 1/2] python311Packages.github3-py: rename from github3_py --- .../python-modules/{github3_py => github3-py}/default.nix | 0 pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 2 +- 3 files changed, 2 insertions(+), 1 deletion(-) rename pkgs/development/python-modules/{github3_py => github3-py}/default.nix (100%) diff --git a/pkgs/development/python-modules/github3_py/default.nix b/pkgs/development/python-modules/github3-py/default.nix similarity index 100% rename from pkgs/development/python-modules/github3_py/default.nix rename to pkgs/development/python-modules/github3-py/default.nix diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 2b896b833bfc..31b8be67c123 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -175,6 +175,7 @@ mapAliases ({ GeoIP = geoip; # added 2023-02-19 gigalixir = throw "gigalixir has been promoted to a top-level attribute"; # Added 2022-10-02 gitdb2 = throw "gitdb2 has been deprecated, use gitdb instead."; # added 2020-03-14 + github3_py = github3-py; # added 2024-01-04 GitPython = gitpython; # added 2022-10-28 glances = throw "glances has moved to pkgs.glances"; # added 2020-20-28 glasgow = throw "glasgow has been promoted to a top-level attribute"; # added 2023-02-05 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c6310d81f425..6d38976064ce 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4589,7 +4589,7 @@ self: super: with self; { github-webhook = callPackage ../development/python-modules/github-webhook { }; - github3_py = callPackage ../development/python-modules/github3_py { }; + github3-py = callPackage ../development/python-modules/github3-py { }; gitignore-parser = callPackage ../development/python-modules/gitignore-parser { }; From b73a5beb843afb31ecad5ec856d88d0160ed4713 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Thu, 4 Jan 2024 23:17:06 +0100 Subject: [PATCH 2/2] python311Packages.github3-py: 3.2.0 -> 4.0.1 --- .../python-modules/github3-py/default.nix | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/github3-py/default.nix b/pkgs/development/python-modules/github3-py/default.nix index e92af9380844..72fd8108f0c4 100644 --- a/pkgs/development/python-modules/github3-py/default.nix +++ b/pkgs/development/python-modules/github3-py/default.nix @@ -9,25 +9,31 @@ , pytestCheckHook , betamax , betamax-matchers +, hatchling +, fetchpatch }: buildPythonPackage rec { pname = "github3.py"; - version = "3.2.0"; - format = "setuptools"; + version = "4.0.1"; + format = "pyproject"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-Cbcr4Ul9NGsJaM3oNgoNavedwgbQFJpjzT7IbGXDd8w="; + hash = "sha256-MNVxB2dT78OJ7cf5qu8zik/LJLVNiWjV85sTQvRd3TY="; }; + nativeBuildInputs = [ + hatchling + ]; + propagatedBuildInputs = [ + pyjwt + python-dateutil requests uritemplate - python-dateutil - pyjwt ] ++ pyjwt.optional-dependencies.crypto; @@ -37,6 +43,14 @@ buildPythonPackage rec { betamax-matchers ]; + patches = [ + (fetchpatch { + # disable tests with "AttributeError: 'MockHTTPResponse' object has no attribute 'close'", due to betamax + url = "https://github.com/sigmavirus24/github3.py/commit/9d6124c09b0997b5e83579549bcf22b3e901d7e5.patch"; + hash = "sha256-8Z4vN7iKl/sOcEJptsH5jsqijZgvL6jS7kymZ8+m6bY="; + }) + ]; + # Solves "__main__.py: error: unrecognized arguments: -nauto" preCheck = '' rm tox.ini