Skip to content

Commit

Permalink
feature: python 3.13 (#308)
Browse files Browse the repository at this point in the history
Co-authored-by: Ran Isenberg <[email protected]>
  • Loading branch information
ran-isenberg and Ran Isenberg authored Jan 14, 2025
1 parent 7286c15 commit e8c41ab
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main-serverless-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ permissions:

env:
NODE_VERSION: "20"
PYTHON_VERSION: "3.12"
PYTHON_VERSION: "3.13"
AWS_REGION: "us-east-1"

on:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-serverless-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ permissions:

env:
NODE_VERSION: "20"
PYTHON_VERSION: "3.12"
PYTHON_VERSION: "3.13"
AWS_REGION: "us-east-1"

on:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# serverless-python-demo

[![license](https://img.shields.io/github/license/ran-isenberg/serverless-python-demo)](https://github.com/ran-isenberg/serverless-python-demo/blob/master/LICENSE)
![PythonSupport](https://img.shields.io/static/v1?label=python&message=3.12&color=blue?style=flat-square&logo=python)
![PythonSupport](https://img.shields.io/static/v1?label=python&message=3.13&color=blue?style=flat-square&logo=python)
[![codecov](https://codecov.io/gh/ran-isenberg/serverless-python-demo/branch/main/graph/badge.svg?token=P2K7K4KICF)](https://codecov.io/gh/ran-isenberg/serverless-python-demo)
![version](https://img.shields.io/github/v/release/ran-isenberg/serverless-python-demo)
![github-star-badge](https://img.shields.io/github/stars/ran-isenberg/serverless-python-demo.svg?style=social)
Expand Down
8 changes: 4 additions & 4 deletions infrastructure/product/crud/crud_api_construct.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def _add_put_product_lambda_integration(
lambda_function = _lambda.Function(
self,
constants.CREATE_LAMBDA,
runtime=_lambda.Runtime.PYTHON_3_12,
runtime=_lambda.Runtime.PYTHON_3_13,
code=_lambda.Code.from_asset(constants.BUILD_FOLDER),
handler='product.crud.handlers.handle_create_product.lambda_handler',
environment={
Expand Down Expand Up @@ -197,7 +197,7 @@ def _add_delete_product_lambda_integration(
lambda_function = _lambda.Function(
self,
constants.DELETE_LAMBDA,
runtime=_lambda.Runtime.PYTHON_3_12,
runtime=_lambda.Runtime.PYTHON_3_13,
code=_lambda.Code.from_asset(constants.BUILD_FOLDER),
handler='product.crud.handlers.handle_delete_product.lambda_handler',
environment={
Expand Down Expand Up @@ -235,7 +235,7 @@ def _add_get_product_lambda_integration(
lambda_function = _lambda.Function(
self,
constants.GET_LAMBDA,
runtime=_lambda.Runtime.PYTHON_3_12,
runtime=_lambda.Runtime.PYTHON_3_13,
code=_lambda.Code.from_asset(constants.BUILD_FOLDER),
handler='product.crud.handlers.handle_get_product.lambda_handler',
environment={
Expand Down Expand Up @@ -273,7 +273,7 @@ def _add_list_products_lambda_integration(
lambda_function = _lambda.Function(
self,
constants.LIST_LAMBDA,
runtime=_lambda.Runtime.PYTHON_3_12,
runtime=_lambda.Runtime.PYTHON_3_13,
code=_lambda.Code.from_asset(constants.BUILD_FOLDER),
handler='product.crud.handlers.handle_list_products.lambda_handler',
environment={
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/product/product_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def _build_common_lambda_layer(self, id_: str) -> PythonLayerVersion:
self,
f'{id_}{constants.LAMBDA_LAYER_NAME}',
entry=constants.COMMON_LAYER_BUILD_FOLDER,
compatible_runtimes=[_lambda.Runtime.PYTHON_3_12],
compatible_runtimes=[_lambda.Runtime.PYTHON_3_13],
removal_policy=RemovalPolicy.DESTROY,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def _build_stream_processor_lambda(
lambda_function = _lambda.Function(
self,
id=constants.STREAM_PROCESSOR_LAMBDA,
runtime=_lambda.Runtime.PYTHON_3_12,
runtime=_lambda.Runtime.PYTHON_3_13,
code=_lambda.Code.from_asset(constants.BUILD_FOLDER),
handler='product.stream_processor.handlers.process_stream.process_stream',
environment={
Expand Down
4 changes: 2 additions & 2 deletions infrastructure/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
classifiers=[
'Intended Audience :: Developers',
'Topic :: Software Development :: Build Tools',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
],
url='https://github.com/ran-isenberg/serverless-python-demo',
author='Ran Isenberg, Heitor Lessa',
author_email='[email protected]',
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
package_data={'': ['*.json']},
include_package_data=True,
python_requires='>=3.12',
python_requires='>=3.13',
install_requires=[],
)
4 changes: 2 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
repository = "https://github.com/"
readme = "README.md"
keywords = ["serverless"]
license = "MIT-0"

[tool.poetry.dependencies]
python = "^3.12.0"
python = "^3.13.0"
pydantic = { version = "^2.0.3" }
email-validator = { version = "*" }
aws-lambda-powertools = { extras = ["tracer"], version = "^2.20.0" }
Expand Down Expand Up @@ -107,8 +107,8 @@ exclude = [
line-length = 150
indent-width = 4

# Assume Python 3.12
target-version = "py312"
# Assume Python 3.13
target-version = "py313"

[tool.ruff.lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
Expand Down

0 comments on commit e8c41ab

Please sign in to comment.