From cfb5ebb12ddedd8246b51da6882fb43ea6cf2a38 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 23 Feb 2024 16:04:25 +0100 Subject: [PATCH 1/7] python311Packages.azure-core: 1.28.0 -> 1.30.0 Changelog: https://github.com/Azure/azure-sdk-for-python/blob/azure-core_1.30.0/sdk/core/azure-core/CHANGELOG.md --- .../python-modules/azure-core/default.nix | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/azure-core/default.nix b/pkgs/development/python-modules/azure-core/default.nix index 44f3c1b81085..b376126432b5 100644 --- a/pkgs/development/python-modules/azure-core/default.nix +++ b/pkgs/development/python-modules/azure-core/default.nix @@ -12,15 +12,16 @@ , pytest-trio , pytestCheckHook , requests +, setuptools , six , trio , typing-extensions }: buildPythonPackage rec { - version = "1.28.0"; + version = "1.30.0"; pname = "azure-core"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -28,10 +29,13 @@ buildPythonPackage rec { src = fetchPypi { inherit pname version; - extension = "zip"; - hash = "sha256-6e78Zvwf3lbatvBNTl0SxgdU1an6Sb3P2FNPyW7ZNr0="; + hash = "sha256-bzp4g+8YRyL2vZlyYu3a+Az+fls+DKqvjbFpVpWJPTU="; }; + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ requests six @@ -99,8 +103,8 @@ buildPythonPackage rec { meta = with lib; { description = "Microsoft Azure Core Library for Python"; - homepage = "https://github.com/Azure/azure-sdk-for-python"; - changelog = "https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CHANGELOG.md"; + homepage = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/core/azure-core"; + changelog = "https://github.com/Azure/azure-sdk-for-python/blob/azure-core_${version}/sdk/core/azure-core/CHANGELOG.md"; license = licenses.mit; maintainers = with maintainers; [ jonringer ]; }; From 36d5ef97b3edd7e7371b56aec0a99c603b18da81 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 23 Feb 2024 16:04:35 +0100 Subject: [PATCH 2/7] python311Packages.azure-keyvault-certificates: 4.7.0 -> 4.8.0 Changelog: https://github.com/Azure/azure-sdk-for-python/blob/azure-keyvault-certificates_4.8.0/sdk/keyvault/azure-keyvault-certificates/CHANGELOG.md --- .../azure-keyvault-certificates/default.nix | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/azure-keyvault-certificates/default.nix b/pkgs/development/python-modules/azure-keyvault-certificates/default.nix index 77d81c87ec31..e45f1b241517 100644 --- a/pkgs/development/python-modules/azure-keyvault-certificates/default.nix +++ b/pkgs/development/python-modules/azure-keyvault-certificates/default.nix @@ -3,36 +3,40 @@ , fetchPypi , azure-common , azure-core -, msrest -, msrestazure +, isodate , pythonOlder +, setuptools +, typing-extensions }: buildPythonPackage rec { pname = "azure-keyvault-certificates"; - version = "4.7.0"; - format = "setuptools"; + version = "4.8.0"; + pyproject = true; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - extension = "zip"; - hash = "sha256-nkfZp0gl5QKxPVSByZwYIEDE9Ucj9DNx4AhZQ23888o="; + hash = "sha256-xWEnPkQCwlEUhzSGyYv6GyxHiGIp1BAOh9rxAO4Edyg="; }; + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ azure-common azure-core - msrest - msrestazure + isodate + typing-extensions ]; pythonNamespaces = [ "azure.keyvault" ]; - # has no tests + # Module has no tests doCheck = false; pythonImportsCheck = [ @@ -41,7 +45,8 @@ buildPythonPackage rec { meta = with lib; { description = "Microsoft Azure Key Vault Certificates Client Library for Python"; - homepage = "https://github.com/Azure/azure-sdk-for-python"; + homepage = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/keyvault/azure-keyvault-certificates"; + changelog = "https://github.com/Azure/azure-sdk-for-python/blob/azure-keyvault-certificates_${version}/sdk/keyvault/azure-keyvault-certificates/CHANGELOG.md"; license = licenses.mit; maintainers = with maintainers; [ jonringer ]; }; From 6e689fe2b84b9ab684d7ccbc09635d80dc3e8d2b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 23 Feb 2024 16:20:18 +0100 Subject: [PATCH 3/7] python311Packages.azure-keyvault-secrets: 4.7.0 -> 4.8.0 Changelog: https://github.com/Azure/azure-sdk-for-python/tree/azure-keyvault-secrets_4.8.0/sdk/keyvault/azure-keyvault-secrets --- .../azure-keyvault-secrets/default.nix | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/azure-keyvault-secrets/default.nix b/pkgs/development/python-modules/azure-keyvault-secrets/default.nix index ddb5d440b0b3..56004efa76b6 100644 --- a/pkgs/development/python-modules/azure-keyvault-secrets/default.nix +++ b/pkgs/development/python-modules/azure-keyvault-secrets/default.nix @@ -1,41 +1,46 @@ { lib +, azure-core , buildPythonPackage , fetchPypi +, isodate , pythonOlder -, azure-common -, azure-core -, msrest +, setuptools +, typing-extensions }: buildPythonPackage rec { pname = "azure-keyvault-secrets"; - version = "4.7.0"; - format = "setuptools"; + version = "4.8.0"; + pyproject = true; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - extension = "zip"; - hash = "sha256-d+4lNLplGh8wbIXXtQW8PM7o/qd0UOuvr8Jq7BblRF0="; + hash = "sha256-VjbAodiiDjxXmcs8z/1Ovz8NGst8rpUmhhgzr4sP6BQ="; }; + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ - azure-common azure-core - msrest + isodate + typing-extensions ]; pythonNamespaces = [ "azure.keyvault" ]; - # requires checkout from mono-repo + # Tests require checkout from mono-repo doCheck = false; meta = with lib; { description = "Microsoft Azure Key Vault Secrets Client Library for Python"; - homepage = "https://github.com/Azure/azure-sdk-for-python"; + homepage = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/keyvault/azure-keyvault-secrets"; + changelog = "https://github.com/Azure/azure-sdk-for-python/tree/azure-keyvault-secrets_${version}/sdk/keyvault/azure-keyvault-secrets"; license = licenses.mit; maintainers = with maintainers; [ jonringer ]; }; From c108636f51436f997912a2bc02d93098e89f27cc Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 23 Feb 2024 16:33:18 +0100 Subject: [PATCH 4/7] python311Packages.azure-keyvault-administration: 4.3.0 -> 4.4.0 Changelog: https://github.com/Azure/azure-sdk-for-python/blob/azure-keyvault-administration_4.4.0/sdk/keyvault/azure-keyvault-administration/CHANGELOG.md --- .../azure-keyvault-administration/default.nix | 33 ++++++++++--------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/azure-keyvault-administration/default.nix b/pkgs/development/python-modules/azure-keyvault-administration/default.nix index 07d608dfa56f..a890e435508f 100644 --- a/pkgs/development/python-modules/azure-keyvault-administration/default.nix +++ b/pkgs/development/python-modules/azure-keyvault-administration/default.nix @@ -1,34 +1,36 @@ { lib +, azure-core , buildPythonPackage , fetchPypi +, isodate , pythonOlder -, azure-common -, azure-core -, msrest -, six +, setuptools +, typing-extensions }: buildPythonPackage rec { pname = "azure-keyvault-administration"; - version = "4.3.0"; - format = "setuptools"; + version = "4.4.0"; + pyproject = true; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - extension = "zip"; - hash = "sha256-PuKjui0OP0ODNErjbjJ90hOgee97JDrVT2sh+MufxWY="; + hash = "sha256-ems2y59UTzV1D/L6lMg7l7PvIMH+G0JOpoAY7ucD8d8="; }; - propagatedBuildInputs = [ - azure-common - azure-core - msrest - six + nativeBuildInputs = [ + setuptools ]; - # no tests in pypi tarball + propagatedBuildInputs = [ + azure-core + typing-extensions + isodate + ]; + + # Tests require checkout from mono-repo doCheck = false; pythonNamespaces = [ @@ -42,6 +44,7 @@ buildPythonPackage rec { meta = with lib; { description = "Microsoft Azure Key Vault Administration Client Library for Python"; homepage = "https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/keyvault/azure-keyvault-administration"; + changelog = "https://github.com/Azure/azure-sdk-for-python/blob/azure-keyvault-administration_${version}/sdk/keyvault/azure-keyvault-administration/CHANGELOG.md"; license = licenses.mit; maintainers = with maintainers; [ jonringer ]; }; From 14f52c51618229613efc88d3df384cb85ded9812 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 26 Feb 2024 07:36:57 +0100 Subject: [PATCH 5/7] python311Packages.sapi-python-client: 0.7.1 -> 0.7.2 Diff: https://github.com/keboola/sapi-python-client/compare/refs/tags/0.7.1...0.7.2 Changelog: https://github.com/keboola/sapi-python-client/releases/tag/0.7.2 --- .../python-modules/kbcstorage/default.nix | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/pkgs/development/python-modules/kbcstorage/default.nix b/pkgs/development/python-modules/kbcstorage/default.nix index ec41ce9f27f9..2c14e72bcf96 100644 --- a/pkgs/development/python-modules/kbcstorage/default.nix +++ b/pkgs/development/python-modules/kbcstorage/default.nix @@ -1,36 +1,38 @@ { lib +, azure-storage-blob +, boto3 , buildPythonPackage , fetchFromGitHub +, python-dotenv , pythonOlder - -# build +, requests +, responses , setuptools , setuptools-git-versioning , setuptools-scm - -# propagates -, azure-storage-blob -, boto3 -, requests - -# tests -, responses , unittestCheckHook +, urllib3 }: + buildPythonPackage rec { pname = "sapi-python-client"; - version = "0.7.1"; - format = "pyproject"; + version = "0.7.2"; + pyproject = true; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "keboola"; - repo = pname; + repo = "sapi-python-client"; rev = "refs/tags/${version}"; - hash = "sha256-74sChw6eMkBtfHV6hiaaLNOr/J0Sa73LB93Z8muLaiI="; + hash = "sha256-uZo2kEq7zIMGRlhX36kZyihQPZegw5XgVzgVQQOmpc4="; }; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "urllib3<2.0.0" "urllib3" + ''; + nativeBuildInputs = [ setuptools setuptools-git-versioning @@ -40,18 +42,16 @@ buildPythonPackage rec { propagatedBuildInputs = [ azure-storage-blob boto3 + python-dotenv requests + responses + urllib3 ]; # Requires API token and an active Keboola bucket # ValueError: Root URL is required. doCheck = false; - nativeCheckInputs = [ - unittestCheckHook - responses - ]; - pythonImportsCheck = [ "kbcstorage" "kbcstorage.buckets" From 284b8139c429115ba5878e1511209d4c21c96a64 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 28 Feb 2024 13:46:46 +0100 Subject: [PATCH 6/7] python311Packages.msrest: refactor - disable failing test on Python 3.12 --- pkgs/development/python-modules/msrest/default.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/msrest/default.nix b/pkgs/development/python-modules/msrest/default.nix index 3463931a1cb6..5f4f9869e304 100644 --- a/pkgs/development/python-modules/msrest/default.nix +++ b/pkgs/development/python-modules/msrest/default.nix @@ -9,16 +9,18 @@ , isodate , pytest-aiohttp , pytestCheckHook +, pythonAtLeast , pythonOlder , requests , requests-oauthlib +, setuptools , trio }: buildPythonPackage rec { pname = "msrest"; version = "0.7.1"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -30,6 +32,10 @@ buildPythonPackage rec { hash = "sha256-1EXXXflhDeU+erdI+NsWxSX76ooDTl3+MyQwRzm2xV0="; }; + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ azure-core aiodns @@ -56,6 +62,12 @@ buildPythonPackage rec { "test_conf_async_requests" "test_conf_async_requests" "test_conf_async_trio_requests" + ] ++ lib.optionals (pythonAtLeast "3.12") [ + # AttributeError: 'TestAuthentication' object has no attribute... + "test_apikey_auth" + "test_cs_auth" + "test_eventgrid_auth" + "test_eventgrid_domain_auth" ]; pythonImportsCheck = [ From bb106d0ccf12b5885e02bd09e77198bce05e2214 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 28 Feb 2024 13:48:55 +0100 Subject: [PATCH 7/7] python312Packages.msrestazure: refactor --- .../python-modules/msrestazure/default.nix | 53 +++++++++++-------- 1 file changed, 32 insertions(+), 21 deletions(-) diff --git a/pkgs/development/python-modules/msrestazure/default.nix b/pkgs/development/python-modules/msrestazure/default.nix index e564a0fd5959..b997cd9b5065 100644 --- a/pkgs/development/python-modules/msrestazure/default.nix +++ b/pkgs/development/python-modules/msrestazure/default.nix @@ -1,41 +1,52 @@ -{ pkgs -, lib +{ lib +, adal , buildPythonPackage , fetchFromGitHub -, isPy3k -, adal -, msrest -, mock , httpretty -, pytest +, mock +, msrest , pytest-asyncio +, pytestCheckHook +, pythonOlder +, setuptools }: buildPythonPackage rec { - version = "0.6.4"; - format = "setuptools"; pname = "msrestazure"; + version = "0.6.4"; + pyproject = true; + + disabled = pythonOlder "3.7"; - # Pypi tarball doesnt include tests - # see https://github.com/Azure/msrestazure-for-python/pull/133 src = fetchFromGitHub { owner = "Azure"; repo = "msrestazure-for-python"; - rev = "v${version}"; - sha256 = "0ik81f0n6r27f02gblgm0vl5zl3wc6ijsscihgvc1fgm9f5mk5b5"; + rev = "refs/tags/v${version}"; + hash = "sha256-ZZVZi0v1ucD2g5FpLaNhfNBf6Ab10fUEcEdkY4ELaEY="; }; - propagatedBuildInputs = [ adal msrest ]; + nativeBuildInputs = [ + setuptools + ]; - nativeCheckInputs = [ httpretty mock pytest ] - ++ lib.optionals isPy3k [ pytest-asyncio ]; + propagatedBuildInputs = [ + adal + msrest + ]; - checkPhase = '' - pytest tests/ - ''; + nativeCheckInputs = [ + httpretty + mock + pytest-asyncio + pytestCheckHook + ]; - meta = with pkgs.lib; { - description = "The runtime library 'msrestazure' for AutoRest generated Python clients."; + pythonImportsCheck = [ + "msrest" + ]; + + meta = with lib; { + description = "The runtime library 'msrestazure' for AutoRest generated Python clients"; homepage = "https://azure.microsoft.com/en-us/develop/python/"; license = licenses.mit; maintainers = with maintainers; [ bendlas jonringer ];