diff --git a/pkgs/development/python-modules/aws-sam-translator/default.nix b/pkgs/development/python-modules/aws-sam-translator/default.nix index ca01e35a3c55..1f0a38584d5a 100644 --- a/pkgs/development/python-modules/aws-sam-translator/default.nix +++ b/pkgs/development/python-modules/aws-sam-translator/default.nix @@ -5,6 +5,7 @@ , jsonschema , mock , parameterized +, pytest-env , pytestCheckHook , pythonOlder , pyyaml @@ -13,7 +14,7 @@ buildPythonPackage rec { pname = "aws-sam-translator"; - version = "1.42.0"; + version = "1.46.0"; format = "setuptools"; disabled = pythonOlder "3.6"; @@ -22,7 +23,7 @@ buildPythonPackage rec { owner = "aws"; repo = "serverless-application-model"; rev = "v${version}"; - sha256 = "sha256-pjcRsmxPL4lbgDopW+wKQRkRcqebLPTd95JTL8PiWtc="; + sha256 = "sha256-SLGxpRbTuK+Lxww45dfHIMwwxV5vhlnYyG4WqG45aNg="; }; propagatedBuildInputs = [ @@ -41,6 +42,7 @@ buildPythonPackage rec { checkInputs = [ mock parameterized + pytest-env pytestCheckHook pyyaml ]; diff --git a/pkgs/development/tools/aws-sam-cli/default.nix b/pkgs/development/tools/aws-sam-cli/default.nix index c4fdb203c34f..af2685681f16 100644 --- a/pkgs/development/tools/aws-sam-cli/default.nix +++ b/pkgs/development/tools/aws-sam-cli/default.nix @@ -5,11 +5,11 @@ python3.pkgs.buildPythonApplication rec { pname = "aws-sam-cli"; - version = "1.37.0"; + version = "1.52.0"; src = python3.pkgs.fetchPypi { inherit pname version; - hash = "sha256-XE3g2mKwAiaJvi0ShVScnCKrmz7ujaQgOeFXuYwtP4g="; + hash = "sha256-ldr0X+I5+Nfb+WBDOe0m202WOuccGUI5HFL3fpbBNPo="; }; propagatedBuildInputs = with python3.pkgs; [ @@ -36,15 +36,23 @@ python3.pkgs.buildPythonApplication rec { wrapProgram $out/bin/sam --set SAM_CLI_TELEMETRY 0 ''; + patches = [ + # Click 8.1 removed `get_terminal_size`, recommending + # `shutil.get_terminal_size` instead. + # (https://github.com/pallets/click/pull/2130) + ./support-click-8-1.patch + ]; + # fix over-restrictive version bounds postPatch = '' substituteInPlace requirements/base.txt \ --replace "aws_lambda_builders==" "aws-lambda-builders #" \ - --replace "click~=7.1" "click~=8.0" \ + --replace "click~=7.1" "click~=8.1" \ --replace "dateparser~=1.0" "dateparser>=0.7" \ --replace "docker~=4.2.0" "docker>=4.2.0" \ --replace "Flask~=1.1.2" "Flask~=2.0" \ --replace "jmespath~=0.10.0" "jmespath" \ + --replace "MarkupSafe==2.0.1" "MarkupSafe #" \ --replace "PyYAML~=5.3" "PyYAML #" \ --replace "regex==" "regex #" \ --replace "requests==" "requests #" \ diff --git a/pkgs/development/tools/aws-sam-cli/support-click-8-1.patch b/pkgs/development/tools/aws-sam-cli/support-click-8-1.patch new file mode 100644 index 000000000000..dc7af080ac66 --- /dev/null +++ b/pkgs/development/tools/aws-sam-cli/support-click-8-1.patch @@ -0,0 +1,21 @@ +diff --git a/samcli/commands/_utils/table_print.py b/samcli/commands/_utils/table_print.py +index de63af29..a9d0f2fe 100644 +--- a/samcli/commands/_utils/table_print.py ++++ b/samcli/commands/_utils/table_print.py +@@ -7,6 +7,7 @@ from functools import wraps + from typing import Sized + + import click ++import shutil + + MIN_OFFSET = 20 + +@@ -30,7 +31,7 @@ def pprint_column_names( + + def pprint_wrap(func): + # Calculate terminal width, number of columns in the table +- width, _ = click.get_terminal_size() ++ width, _ = shutil.get_terminal_size() + # For UX purposes, set a minimum width for the table to be usable + # and usable_width keeps margins in mind. + width = max(width, min_width) diff --git a/pkgs/tools/admin/awscli2/default.nix b/pkgs/tools/admin/awscli2/default.nix index 305a1e719f51..d772d1d16e4f 100644 --- a/pkgs/tools/admin/awscli2/default.nix +++ b/pkgs/tools/admin/awscli2/default.nix @@ -29,7 +29,7 @@ let in with py.pkgs; buildPythonApplication rec { pname = "awscli2"; - version = "2.7.8"; # N.B: if you change this, check if overrides are still up-to-date + version = "2.7.9"; # N.B: if you change this, check if overrides are still up-to-date src = fetchFromGitHub { owner = "aws"; @@ -67,6 +67,7 @@ with py.pkgs; buildPythonApplication rec { postPatch = '' substituteInPlace setup.cfg \ --replace "colorama>=0.2.5,<0.4.4" "colorama" \ + --replace "cryptography>=3.3.2,<37.0.0" "cryptography" \ --replace "docutils>=0.10,<0.16" "docutils" \ --replace "ruamel.yaml>=0.15.0,<0.16.0" "ruamel.yaml" \ --replace "wcwidth<0.2.0" "wcwidth" \