Skip to content

Commit 8792a04

Browse files
authored
Uncomment cryptography dependency in Python build test fixtures (#8667)
* Uncomment cryptography dependency in Python build test fixtures * Uncomment additional cryptography dependency in python build test fixtures --------- Co-authored-by: Chengjun Li <>
1 parent b79f1db commit 8792a04

21 files changed

Lines changed: 31 additions & 55 deletions

File tree

tests/integration/buildcmd/build_integ_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ class BuildIntegPythonBase(BuildIntegBase):
747747
"__init__.py",
748748
"main.py",
749749
"numpy",
750-
# 'cryptography',
750+
"cryptography",
751751
}
752752

753753
FUNCTION_LOGICAL_ID = "Function"

tests/integration/buildcmd/test_build_cmd.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ class TestBuildCommand_SingleFunctionBuilds(BuildIntegBase):
398398
"__init__.py",
399399
"main.py",
400400
"numpy",
401-
# 'cryptography',
401+
"cryptography",
402402
"requirements.txt",
403403
}
404404

@@ -1753,7 +1753,7 @@ class TestBuildWithNestedStacksImage(NestedBuildIntegBase):
17531753
"__init__.py",
17541754
"main.py",
17551755
"numpy",
1756-
# 'cryptography',
1756+
"cryptography",
17571757
"requirements.txt",
17581758
}
17591759

@@ -1927,7 +1927,7 @@ class TestBuildWithS3FunctionsOrLayers(NestedBuildIntegBase):
19271927
"__init__.py",
19281928
"main.py",
19291929
"numpy",
1930-
# 'cryptography',
1930+
"cryptography",
19311931
"requirements.txt",
19321932
}
19331933

tests/integration/testdata/buildcmd/PyLayer/requirements.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,4 @@
33
# NOTE: Fixing to <1.20.3 as numpy1.20.3 started to use a new wheel naming convention (PEP 600)
44
numpy<1.20.3; python_version < '3.10'
55
numpy==1.26.4; python_version >= '3.10'
6-
# `cryptography` has a dependency on `pycparser` which, for some reason doesn't build inside a Docker container.
7-
# Turning this off until we resolve this issue: https://github.com/awslabs/aws-lambda-builders/issues/29
8-
# cryptography~=2.4
6+
cryptography~=42.0

tests/integration/testdata/buildcmd/PyLayerMake/requirements.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,4 @@
33
# NOTE: Fixing to <1.20.3 as numpy1.20.3 started to use a new wheel naming convention (PEP 600)
44
numpy<1.20.3; python_version < '3.10'
55
numpy==1.26.4; python_version >= '3.10'
6-
# `cryptography` has a dependency on `pycparser` which, for some reason doesn't build inside a Docker container.
7-
# Turning this off until we resolve this issue: https://github.com/awslabs/aws-lambda-builders/issues/29
8-
# cryptography~=2.4
6+
cryptography~=42.0

tests/integration/testdata/buildcmd/Python/main.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import numpy
22

3-
4-
# from cryptography.fernet import Fernet
3+
from cryptography.fernet import Fernet
54

65

76
def handler(event, context):
87
# Try using some of the modules to make sure they work & don't crash the process
9-
# print(Fernet.generate_key())
8+
print(Fernet.generate_key())
109

1110
return {"pi": "{0:.2f}".format(numpy.pi)}
1211

tests/integration/testdata/buildcmd/Python/requirements.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,4 @@
44
numpy<1.20.3; python_version <= '3.9'
55
numpy==2.1.3; python_version >= '3.10' and python_version < '3.14'
66
numpy==2.3.4; python_version >= '3.14'
7-
# `cryptography` has a dependency on `pycparser` which, for some reason doesn't build inside a Docker container.
8-
# Turning this off until we resolve this issue: https://github.com/awslabs/aws-lambda-builders/issues/29
9-
# cryptography~=2.4
7+
cryptography~=42.0
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# These are some hard packages to build. Using them here helps us verify that building works on various platforms
2+
3+
# NOTE: Fixing to <1.20.3 as numpy1.20.3 started to use a new wheel naming convention (PEP 600)
4+
numpy<1.20.3; python_version <= '3.9'
5+
numpy==2.1.3; python_version >= '3.10' and python_version < '3.14'
6+
numpy==2.3.4; python_version >= '3.14'
7+
cryptography~=42.0

tests/integration/testdata/buildcmd/PythonImage/requirements.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,4 @@
44
numpy<1.20.3; python_version < '3.10'
55
numpy==2.1.3; python_version >= '3.10' and python_version < '3.14'
66
numpy==2.3.4; python_version >= '3.14'
7-
# `cryptography` has a dependency on `pycparser` which, for some reason doesn't build inside a Docker container.
8-
# Turning this off until we resolve this issue: https://github.com/awslabs/aws-lambda-builders/issues/29
9-
# cryptography~=2.4
7+
cryptography~=42.0

tests/integration/testdata/buildcmd/PythonImagesWithSharedCode/requirements.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,4 @@
44
numpy<1.20.3; python_version < '3.10'
55
numpy==2.1.3; python_version >= '3.10' and python_version < '3.14'
66
numpy==2.3.4; python_version >= '3.14'
7-
# `cryptography` has a dependency on `pycparser` which, for some reason doesn't build inside a Docker container.
8-
# Turning this off until we resolve this issue: https://github.com/awslabs/aws-lambda-builders/issues/29
9-
# cryptography~=2.4
7+
cryptography~=42.0

tests/integration/testdata/buildcmd/PythonPEP600/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ numpy==2.3.4; python_version >= '3.14'
77
greenlet==3.1.1; python_version < '3.14'
88
greenlet==3.2.4; python_version >= '3.14'
99
sqlalchemy==2.0.36
10+
cryptography~=42.0

0 commit comments

Comments
 (0)