Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Lambda runtime to Python 3.12 #36

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
deploy-dev:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Python 3.11
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Python 3.12
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: '3.11'
python-version: '3.12'
- name: Install Python dependencies
run: pip install tox
- name: Test with tox
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
deploy-prod:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Python 3.11
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Python 3.12
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: '3.11'
python-version: '3.12'
- name: Install Python dependencies
run: pip install tox
- name: Test with tox
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pr-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Python 3.11
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Python 3.12
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: '3.11'
python-version: '3.12'
- name: Install dependencies
run: pip install tox
- name: Test with tox
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM public.ecr.aws/lambda/python:3.11
FROM public.ecr.aws/lambda/python:3.12

COPY agresso ${LAMBDA_TASK_ROOT}/agresso
COPY barnehageregister ${LAMBDA_TASK_ROOT}/barnehageregister
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.black]
target-version = ['py311']
target-version = ['py312']
# Keep exclude in sync with flake8 config in tox.ini
exclude = '''
/(
Expand Down
2 changes: 2 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[pytest]
asyncio_default_fixture_loop_scope=function
58 changes: 28 additions & 30 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,34 +1,36 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile
#
aiohttp==3.10.2
aiohappyeyeballs==2.4.0
# via aiohttp
aiohttp==3.10.5
# via okdata-data-collectors (setup.py)
aiosignal==1.3.1
# via aiohttp
anyio==4.2.0
anyio==4.4.0
# via starlette
attrs==23.2.0
attrs==24.2.0
# via
# aiohttp
# jsonschema
# referencing
aws-xray-sdk==2.12.1
aws-xray-sdk==2.14.0
# via okdata-data-collectors (setup.py)
boto3==1.34.43
boto3==1.35.18
# via
# okdata-aws
# okdata-data-collectors (setup.py)
botocore==1.34.43
botocore==1.35.18
# via
# aws-xray-sdk
# boto3
# s3transfer
certifi==2024.7.4
certifi==2024.8.30
# via requests
cffi==1.16.0
cffi==1.17.1
# via cryptography
charset-normalizer==3.3.2
# via requests
Expand All @@ -40,7 +42,7 @@ frozenlist==1.4.1
# via
# aiohttp
# aiosignal
idna==3.7
idna==3.8
# via
# anyio
# requests
Expand All @@ -49,37 +51,35 @@ jmespath==1.0.1
# via
# boto3
# botocore
jsonschema==4.21.1
jsonschema==4.23.0
# via okdata-sdk
jsonschema-specifications==2023.12.1
# via jsonschema
jwcrypto==1.5.6
# via python-keycloak
multidict==6.0.5
multidict==6.1.0
# via
# aiohttp
# yarl
okdata-aws==2.1.0
okdata-aws==4.1.0
# via okdata-data-collectors (setup.py)
okdata-sdk==3.1.1
# via
# okdata-aws
# okdata-data-collectors (setup.py)
packaging==23.2
packaging==24.1
# via deprecation
pycparser==2.22
# via cffi
pydantic==1.10.14
# via okdata-aws
python-dateutil==2.8.2
python-dateutil==2.9.0.post0
# via botocore
python-keycloak==3.12.0
# via okdata-sdk
referencing==0.33.0
referencing==0.35.1
# via
# jsonschema
# jsonschema-specifications
requests==2.32.0
requests==2.32.3
# via
# okdata-aws
# okdata-data-collectors (setup.py)
Expand All @@ -88,30 +88,28 @@ requests==2.32.0
# requests-toolbelt
requests-toolbelt==1.0.0
# via python-keycloak
rpds-py==0.18.0
rpds-py==0.20.0
# via
# jsonschema
# referencing
s3transfer==0.10.0
s3transfer==0.10.2
# via boto3
six==1.16.0
# via python-dateutil
sniffio==1.3.0
sniffio==1.3.1
# via anyio
starlette==0.37.1
starlette==0.38.5
# via okdata-aws
structlog==24.1.0
structlog==24.4.0
# via okdata-aws
typing-extensions==4.9.0
# via
# jwcrypto
# pydantic
urllib3==1.26.19
typing-extensions==4.12.2
# via jwcrypto
urllib3==1.26.20
# via
# botocore
# okdata-sdk
# requests
wrapt==1.16.0
# via aws-xray-sdk
yarl==1.9.4
yarl==1.11.1
# via aiohttp
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"aiohttp>=3.9,<4",
"aws-xray-sdk",
"boto3",
"okdata-aws>=2.1,<3",
"okdata-aws>=2.1",
"okdata-sdk>=3.1.1,<4",
"requests",
],
python_requires=">=3.11",
python_requires=">=3.12",
)
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py311,flake8,black
envlist = py312,flake8,black

[testenv]
deps =
Expand Down
Loading