From 98111032e3744bbcf94c27b3ab6b32b6c034423f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 24 Feb 2024 10:51:02 +0100 Subject: [PATCH 01/12] python311Packages.boto3: refactor --- pkgs/development/python-modules/boto3/default.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/boto3/default.nix b/pkgs/development/python-modules/boto3/default.nix index 3a48019b2e99..e0e17a8f3de0 100644 --- a/pkgs/development/python-modules/boto3/default.nix +++ b/pkgs/development/python-modules/boto3/default.nix @@ -1,13 +1,14 @@ { lib +, botocore , buildPythonPackage , pythonOlder , fetchFromGitHub -, botocore , jmespath +, pytestCheckHook +, pythonOlder , s3transfer , pythonRelaxDepsHook , setuptools -, pytestCheckHook }: buildPythonPackage rec { @@ -19,7 +20,7 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "boto"; - repo = pname; + repo = "boto3"; rev = "refs/tags/${version}"; hash = "sha256-oOrUVBh1sbaOibU8A+bGZ4z7IEiE4gjHwZ+8889Hv60="; }; @@ -54,14 +55,16 @@ buildPythonPackage rec { ]; passthru.optional-dependencies = { - crt = [ botocore.optional-dependencies.crt ]; + crt = [ + botocore.optional-dependencies.crt + ]; }; meta = with lib; { + description = "AWS SDK for Python"; homepage = "https://github.com/boto/boto3"; changelog = "https://github.com/boto/boto3/blob/${version}/CHANGELOG.rst"; license = licenses.asl20; - description = "AWS SDK for Python"; longDescription = '' Boto3 is the Amazon Web Services (AWS) Software Development Kit (SDK) for Python, which allows Python developers to write software that makes use of From 4e83f670c7555b7f644b03a0eecd622721217f93 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 24 Feb 2024 10:51:25 +0100 Subject: [PATCH 02/12] python311Packages.botocore: refactor --- .../python-modules/botocore/default.nix | 31 ++++++++++++------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/botocore/default.nix b/pkgs/development/python-modules/botocore/default.nix index bc1454b70ff1..b178f5606aaa 100644 --- a/pkgs/development/python-modules/botocore/default.nix +++ b/pkgs/development/python-modules/botocore/default.nix @@ -1,13 +1,14 @@ { lib -, buildPythonPackage -, pythonOlder -, fetchPypi -, python-dateutil -, jmespath -, urllib3 -, pytestCheckHook -, jsonschema , awscrt +, buildPythonPackage +, fetchPypi +, jmespath +, jsonschema +, pytestCheckHook +, python-dateutil +, pythonOlder +, setuptools +, urllib3 }: buildPythonPackage rec { @@ -22,15 +23,19 @@ buildPythonPackage rec { hash = "sha256-IZg7sEc6GRMBksUOxpdNVfDEqkinCUvPQPeILItpuPE="; }; + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ - python-dateutil jmespath + python-dateutil urllib3 ]; nativeCheckInputs = [ - pytestCheckHook jsonschema + pytestCheckHook ]; disabledTestPaths = [ @@ -46,14 +51,16 @@ buildPythonPackage rec { ]; passthru.optional-dependencies = { - crt = [ awscrt ]; + crt = [ + awscrt + ]; }; meta = with lib; { + description = "A low-level interface to a growing number of Amazon Web Services"; homepage = "https://github.com/boto/botocore"; changelog = "https://github.com/boto/botocore/blob/${version}/CHANGELOG.rst"; license = licenses.asl20; - description = "A low-level interface to a growing number of Amazon Web Services"; maintainers = with maintainers; [ anthonyroussel ]; }; } From 3a9389525eb8baa2d744afadad58d3b1f01d2f35 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 24 Feb 2024 10:54:03 +0100 Subject: [PATCH 03/12] python311Packages.botocore: 1.33.6 -> 1.34.49 Changelog: https://github.com/boto/botocore/blob/1.34.49/CHANGELOG.rst --- pkgs/development/python-modules/botocore/default.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/botocore/default.nix b/pkgs/development/python-modules/botocore/default.nix index b178f5606aaa..89b6dbe07821 100644 --- a/pkgs/development/python-modules/botocore/default.nix +++ b/pkgs/development/python-modules/botocore/default.nix @@ -7,23 +7,29 @@ , pytestCheckHook , python-dateutil , pythonOlder +, pythonRelaxDepsHook , setuptools , urllib3 }: buildPythonPackage rec { pname = "botocore"; - version = "1.34.21"; # N.B: if you change this, change boto3 and awscli to a matching version - format = "setuptools"; + version = "1.34.49"; # N.B: if you change this, change boto3 and awscli to a matching version + pyproject = true; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-IZg7sEc6GRMBksUOxpdNVfDEqkinCUvPQPeILItpuPE="; + hash = "sha256-2JQQvGBnPq/xaZ8/H9yw46Xh96agSMDYjDzlw1SUM+w="; }; + pythonRelaxDeps = [ + "urllib3" + ]; + nativeBuildInputs = [ + pythonRelaxDepsHook setuptools ]; From e6faa8eab0e0e51023b4057cf0cac7a88938fcfa Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 25 Jan 2024 21:55:51 +0100 Subject: [PATCH 04/12] python311Packages.s3transfer: 0.8.2 -> 0.10.0 Diff: https://github.com/boto/s3transfer/compare/refs/tags/0.8.2...0.10.0 Changelog: https://github.com/boto/s3transfer/blob/0.10.0/CHANGELOG.rst --- .../python-modules/s3transfer/default.nix | 31 ++++++++++++++----- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/s3transfer/default.nix b/pkgs/development/python-modules/s3transfer/default.nix index 91758650bba8..124b44f097cc 100644 --- a/pkgs/development/python-modules/s3transfer/default.nix +++ b/pkgs/development/python-modules/s3transfer/default.nix @@ -1,29 +1,38 @@ { lib +, stdenv , botocore , buildPythonPackage , fetchFromGitHub , pytestCheckHook , pythonOlder -, stdenv +, setuptools }: buildPythonPackage rec { pname = "s3transfer"; version = "0.10.0"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "boto"; - repo = pname; + repo = "s3transfer"; rev = "refs/tags/${version}"; hash = "sha256-21xycx1+84uY4gFr7N+ra98dpsEwxy9zeSl4QA66nUc="; }; - propagatedBuildInputs = [ botocore ]; + nativeBuildInputs = [ + setuptools + ]; - nativeCheckInputs = [ pytestCheckHook ]; + propagatedBuildInputs = [ + botocore + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; disabledTestPaths = [ # Requires network access @@ -32,12 +41,18 @@ buildPythonPackage rec { # There was a change in python 3.8 that defaults multiprocessing to spawn instead of fork on macOS # See https://bugs.python.org/issue33725 and https://github.com/python/cpython/pull/13603. # I suspect the underlying issue here is that upstream tests aren't compatible with spawn multiprocessing, and pass on linux where the default is still fork - lib.optionals stdenv.isDarwin [ "tests/unit/test_compat.py" ]; + lib.optionals stdenv.isDarwin [ + "tests/unit/test_compat.py" + ]; - pythonImportsCheck = [ "s3transfer" ]; + pythonImportsCheck = [ + "s3transfer" + ]; passthru.optional-dependencies = { - crt = [ botocore.optional-dependencies.crt ]; + crt = [ + botocore.optional-dependencies.crt + ]; }; meta = with lib; { From e7dc1e1d91ea5fab5a313e45be8e75b57100b1d9 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 24 Feb 2024 11:51:35 +0100 Subject: [PATCH 05/12] python311Packages.boto3: 1.33.6 -> 1.34.49 Changelog: https://github.com/boto/boto3/blob/1.34.49/CHANGELOG.rst --- pkgs/development/python-modules/boto3/default.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/boto3/default.nix b/pkgs/development/python-modules/boto3/default.nix index e0e17a8f3de0..f1ab0c4f28e3 100644 --- a/pkgs/development/python-modules/boto3/default.nix +++ b/pkgs/development/python-modules/boto3/default.nix @@ -1,20 +1,19 @@ { lib , botocore , buildPythonPackage -, pythonOlder , fetchFromGitHub , jmespath , pytestCheckHook , pythonOlder -, s3transfer , pythonRelaxDepsHook +, s3transfer , setuptools }: buildPythonPackage rec { pname = "boto3"; - version = "1.34.21"; # N.B: if you change this, change botocore and awscli to a matching version - format = "pyproject"; + version = "1.34.49"; # N.B: if you change this, change botocore and awscli to a matching version + pyproject = true; disabled = pythonOlder "3.8"; @@ -22,7 +21,7 @@ buildPythonPackage rec { owner = "boto"; repo = "boto3"; rev = "refs/tags/${version}"; - hash = "sha256-oOrUVBh1sbaOibU8A+bGZ4z7IEiE4gjHwZ+8889Hv60="; + hash = "sha256-/pgbLSL5RJ5RrKUAfQ1QNJykBdICrpqnuziHOVHt1JI="; }; nativeBuildInputs = [ From f32d37b938529ec6eb265640e223d8ad6c57852c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 24 Feb 2024 12:00:09 +0100 Subject: [PATCH 06/12] checkov: 3.2.8 -> 3.2.24 Changelog: https://github.com/bridgecrewio/checkov/releases/tag/3.2.24 --- pkgs/development/tools/analysis/checkov/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/analysis/checkov/default.nix b/pkgs/development/tools/analysis/checkov/default.nix index a60ef454284d..b2c5f8477e81 100644 --- a/pkgs/development/tools/analysis/checkov/default.nix +++ b/pkgs/development/tools/analysis/checkov/default.nix @@ -5,14 +5,14 @@ python3.pkgs.buildPythonApplication rec { pname = "checkov"; - version = "3.2.8"; + version = "3.2.24"; pyproject = true; src = fetchFromGitHub { owner = "bridgecrewio"; repo = "checkov"; rev = "refs/tags/${version}"; - hash = "sha256-Hd1YOzIH6v8N/oP2cJRUv6OkgOv9aSe7nkvzpsCN3rc="; + hash = "sha256-1v6Mft+FVEGXNQDiulpOvRy3KAD1JPkstjrURlL5r4o="; }; patches = [ @@ -20,6 +20,8 @@ python3.pkgs.buildPythonApplication rec { ]; pythonRelaxDeps = [ + "boto3" + "botocore" "bc-detect-secrets" "bc-python-hcl2" "dpath" From 2a7ab29d4d2efaaa95f2143320b4627786baf12e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 27 Feb 2024 15:35:14 +0100 Subject: [PATCH 07/12] python312Packages.thriftpy2: 0.4.16 -> 0.4.19 Diff: https://github.com/Thriftpy/thriftpy2/compare/refs/tags/v0.4.16...v0.4.19 Changelog: https://github.com/Thriftpy/thriftpy2/blob/v0.4.19/CHANGES.rst --- pkgs/development/python-modules/thriftpy2/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/thriftpy2/default.nix b/pkgs/development/python-modules/thriftpy2/default.nix index 6d8c9c9f83d2..092a3d03b602 100644 --- a/pkgs/development/python-modules/thriftpy2/default.nix +++ b/pkgs/development/python-modules/thriftpy2/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { pname = "thriftpy2"; - version = "0.4.16"; + version = "0.4.19"; format = "setuptools"; disabled = pythonOlder "3.6"; @@ -19,7 +19,7 @@ buildPythonPackage rec { owner = "Thriftpy"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-o+h38NREnh14M23gyF2X2UdW7/spmHFo0rqvkKnmSRQ="; + hash = "sha256-u5k9dP6llfTjM745fRHvKC2vM7jd9D8lvPUsDcYx0EI="; }; nativeBuildInputs = [ From 41de4c60a41a2a2093aa1172d163ef90a1238fcc Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 28 Feb 2024 17:05:52 +0100 Subject: [PATCH 08/12] python312Packages.aws-encryption-sdk: disable failing tests on Python 3.12 --- .../aws-encryption-sdk/default.nix | 32 ++++++++++++------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/aws-encryption-sdk/default.nix b/pkgs/development/python-modules/aws-encryption-sdk/default.nix index b9186ab1779c..7cdcc917c8a8 100644 --- a/pkgs/development/python-modules/aws-encryption-sdk/default.nix +++ b/pkgs/development/python-modules/aws-encryption-sdk/default.nix @@ -1,54 +1,62 @@ { lib -, buildPythonPackage -, fetchPypi , attrs , boto3 +, buildPythonPackage , cryptography -, setuptools -, wrapt +, fetchPypi , mock -, pytest , pytest-mock , pytestCheckHook +, pythonAtLeast +, pythonOlder +, setuptools +, wrapt }: buildPythonPackage rec { pname = "aws-encryption-sdk"; version = "3.1.1"; - format = "setuptools"; + pyproject = true; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; hash = "sha256-jV+/AY/GjWscrL5N0Df9gFKWx3Nqn+RX62hNBT9/lWM="; }; + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ attrs boto3 cryptography - setuptools wrapt ]; - doCheck = true; - nativeCheckInputs = [ mock - pytest pytest-mock pytestCheckHook ]; disabledTestPaths = [ - # requires networking + # Tests require networking "examples" "test/integration" ]; + disabledTests = lib.optionals (pythonAtLeast "3.12") [ + # AssertionError: Regex pattern did not match, https://github.com/aws/aws-encryption-sdk-python/issues/644 + "test_abstracts" + ]; + meta = with lib; { + description = "Python implementation of the AWS Encryption SDK"; homepage = "https://aws-encryption-sdk-python.readthedocs.io/"; changelog = "https://github.com/aws/aws-encryption-sdk-python/blob/v${version}/CHANGELOG.rst"; - description = "Fully compliant, native Python implementation of the AWS Encryption SDK."; license = licenses.asl20; maintainers = with maintainers; [ anthonyroussel ]; }; From 8af3330161a0dbaee6d7aa8bb33137bf4a0199fc Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 28 Feb 2024 17:27:43 +0100 Subject: [PATCH 09/12] python312Packages.aws-secretsmanager-caching: disable failing tests --- .../aws-secretsmanager-caching/default.nix | 51 ++++++++++++------- 1 file changed, 34 insertions(+), 17 deletions(-) diff --git a/pkgs/development/python-modules/aws-secretsmanager-caching/default.nix b/pkgs/development/python-modules/aws-secretsmanager-caching/default.nix index 7e54c030bf1e..90226ddd99e4 100644 --- a/pkgs/development/python-modules/aws-secretsmanager-caching/default.nix +++ b/pkgs/development/python-modules/aws-secretsmanager-caching/default.nix @@ -1,25 +1,37 @@ { lib +, botocore , buildPythonPackage -, pythonOlder , fetchPypi +, pytestCheckHook +, pythonAtLeast +, pythonOlder , setuptools , setuptools-scm -, botocore -, pytestCheckHook }: buildPythonPackage rec { - pname = "aws_secretsmanager_caching"; + pname = "aws-secretsmanager-caching"; version = "1.1.1.5"; - format = "setuptools"; + pyprject = true; disabled = pythonOlder "3.7"; src = fetchPypi { - inherit pname version; - sha256 = "5cee2762bb89b72f3e5123feee8e45fbe44ffe163bfca08b28f27b2e2b7772e1"; + pname = "aws_secretsmanager_caching"; + inherit version; + hash = "sha256-XO4nYruJty8+USP+7o5F++RP/hY7/KCLKPJ7Lit3cuE="; }; + patches = [ + # Remove coverage tests from the pytest invocation in setup.cfg. + ./remove-coverage-tests.patch + ]; + + postPatch = '' + substituteInPlace setup.py \ + --replace-fail "'pytest-runner'," "" + ''; + nativeBuildInputs = [ setuptools-scm ]; @@ -29,16 +41,6 @@ buildPythonPackage rec { setuptools # Needs pkg_resources at runtime. ]; - patches = [ - # Remove coverage tests from the pytest invocation in setup.cfg. - ./remove-coverage-tests.patch - ]; - - postPatch = '' - substituteInPlace setup.py \ - --replace "'pytest-runner'," "" - ''; - nativeCheckInputs = [ pytestCheckHook ]; @@ -48,6 +50,21 @@ buildPythonPackage rec { "test/integ" ]; + disabledTests = lib.optionals (pythonAtLeast "3.12") [ + # TypeError: 'float' object cannot be interpreted as an integer + "test_calls_hook_binary" + "test_calls_hook_string" + "test_get_secret_binary" + "test_get_secret_string" + "test_invalid_json" + "test_missing_key" + "test_string_with_additional_kwargs" + "test_string" + "test_valid_json_with_mixed_args" + "test_valid_json_with_no_secret_kwarg" + "test_valid_json" + ]; + pythonImportsCheck = [ "aws_secretsmanager_caching" ]; From 8676f4b4962eb14550ff5e56910f4dfbcd6b5b31 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 28 Feb 2024 17:36:58 +0100 Subject: [PATCH 10/12] python311Packages.aiobotocore: refactor --- .../python-modules/aiobotocore/default.nix | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/aiobotocore/default.nix b/pkgs/development/python-modules/aiobotocore/default.nix index 9b8609c435af..a4fc2ce3973b 100644 --- a/pkgs/development/python-modules/aiobotocore/default.nix +++ b/pkgs/development/python-modules/aiobotocore/default.nix @@ -7,7 +7,10 @@ , fetchFromGitHub , flask , flask-cors +, awscli , moto +, boto3 +, setuptools , pytest-asyncio , pytestCheckHook , pythonOlder @@ -17,13 +20,13 @@ buildPythonPackage rec { pname = "aiobotocore"; version = "2.9.1"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "aio-libs"; - repo = pname; + repo = "aiobotocore"; rev = "refs/tags/${version}"; hash = "sha256-cODdmP/O24fNIugzl4AYdf3g4Gzwx3JseYKbZKgEPbc="; }; @@ -34,6 +37,10 @@ buildPythonPackage rec { sed -i "s/'botocore>=.*'/'botocore'/" setup.py ''; + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ aiohttp aioitertools @@ -41,6 +48,15 @@ buildPythonPackage rec { wrapt ]; + passthru.optional-dependencies = { + awscli = [ + awscli + ]; + boto3 = [ + boto3 + ]; + }; + nativeCheckInputs = [ dill flask From b3d33e184fb7849be86abeb2459fdf8a5692ba71 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 28 Feb 2024 17:37:36 +0100 Subject: [PATCH 11/12] python311Packages.aiobotocore: 2.9.1 -> 2.11.2 Diff: https://github.com/aio-libs/aiobotocore/compare/refs/tags/2.9.1...2.11.2 Changelog: https://github.com/aio-libs/aiobotocore/releases/tag/2.11.2 --- pkgs/development/python-modules/aiobotocore/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/aiobotocore/default.nix b/pkgs/development/python-modules/aiobotocore/default.nix index a4fc2ce3973b..15eeb18989cc 100644 --- a/pkgs/development/python-modules/aiobotocore/default.nix +++ b/pkgs/development/python-modules/aiobotocore/default.nix @@ -19,7 +19,7 @@ buildPythonPackage rec { pname = "aiobotocore"; - version = "2.9.1"; + version = "2.11.2"; pyproject = true; disabled = pythonOlder "3.8"; @@ -28,7 +28,7 @@ buildPythonPackage rec { owner = "aio-libs"; repo = "aiobotocore"; rev = "refs/tags/${version}"; - hash = "sha256-cODdmP/O24fNIugzl4AYdf3g4Gzwx3JseYKbZKgEPbc="; + hash = "sha256-H9nsLPxjv3H5y6+5piBt6Pb+Wks4vwOitM+WQtyViPs="; }; # Relax version constraints: aiobotocore works with newer botocore versions From 5e7bc34a9bbfeebca2a6b5f123f18cb133f02c19 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 28 Feb 2024 19:36:49 +0100 Subject: [PATCH 12/12] python311Packages.aioboto3: 12.1.0 -> 12.3.0 Diff: https://github.com/terrycain/aioboto3/compare/refs/tags/v12.1.0...v12.3.0 Changelog: https://github.com/terrycain/aioboto3/blob/refs/tags/v12.3.0/CHANGELOG.rst --- pkgs/development/python-modules/aioboto3/default.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/aioboto3/default.nix b/pkgs/development/python-modules/aioboto3/default.nix index 231e4bbbe8b2..6b0f79655717 100644 --- a/pkgs/development/python-modules/aioboto3/default.nix +++ b/pkgs/development/python-modules/aioboto3/default.nix @@ -18,7 +18,7 @@ buildPythonPackage rec { pname = "aioboto3"; - version = "12.1.0"; + version = "12.3.0"; pyproject = true; disabled = pythonOlder "3.8"; @@ -27,7 +27,7 @@ buildPythonPackage rec { owner = "terrycain"; repo = "aioboto3"; rev = "refs/tags/v${version}"; - hash = "sha256-CVRDQhymQRi5dyVBLJYTnF3RI4jPBB966dVMT4lOd8g="; + hash = "sha256-GDuxy/V+j0LRJ2lbcRHMEAga+pdCbYIWhEt3ItrHMB4="; }; nativeBuildInputs = [ @@ -37,8 +37,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ aiobotocore - boto3 - ]; + ] ++ aiobotocore.optional-dependencies.boto3; passthru.optional-dependencies = { chalice = [