From 5024021bec9952ca7b1e3d82e2c257f124c6300c Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Thu, 21 Apr 2022 19:42:31 +0200 Subject: [PATCH] fix(lambda-python): Pipenv projects no longer work for Python 3.6 (#20019) `pipenv` has dropped support for Python 3.6. Our install command was installing the latest `pipenv`, but that will start failing. Instead, pin to the latest version that still supports 3.6. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-lambda-python/lib/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-lambda-python/lib/Dockerfile b/packages/@aws-cdk/aws-lambda-python/lib/Dockerfile index 462d9c645fb9f..ac34823b6c3c6 100644 --- a/packages/@aws-cdk/aws-lambda-python/lib/Dockerfile +++ b/packages/@aws-cdk/aws-lambda-python/lib/Dockerfile @@ -9,6 +9,8 @@ ARG HTTPS_PROXY # Upgrade pip (required by cryptography v3.4 and above, which is a dependency of poetry) RUN pip install --upgrade pip -RUN pip install pipenv poetry + +# pipenv 2022.4.8 is the last version with Python 3.6 support +RUN pip install pipenv==2022.4.8 poetry CMD [ "python" ]