diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 315f74ba1..a8479f0ed 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,7 +20,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] + python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] steps: - name: Clone Lithops repository diff --git a/examples/call_async_cython.py b/examples/call_async_cython.py index 1fc4a77a0..aac34c17a 100755 --- a/examples/call_async_cython.py +++ b/examples/call_async_cython.py @@ -4,7 +4,7 @@ Commands to compile the function.py into function.so (Ubuntu): cython3 -3 --embed -X always_allow_keywords=true -o function.c function.py -gcc -shared -o function.so -fPIC -I /usr/include/python3.9 function.c +gcc -shared -o function.so -fPIC -I /usr/include/python3.12 function.c To make this example working, you have to delete funtion.py and rename function.cpython-39-x86_64-linux-gnu.so -> function.so diff --git a/examples/function.py b/examples/function.py index d70886e42..f3973ef90 100644 --- a/examples/function.py +++ b/examples/function.py @@ -3,7 +3,7 @@ Commands to compile the function.py into function.so (Ubuntu): cython3 -3 --embed -X always_allow_keywords=true -o function.c function.py -gcc -shared -o function.so -fPIC -I /usr/include/python3.9 function.c +gcc -shared -o function.so -fPIC -I /usr/include/python3.12 function.c """ diff --git a/lithops/serverless/backends/aliyun_fc/config.py b/lithops/serverless/backends/aliyun_fc/config.py index 60b01554a..4e4a56df8 100644 --- a/lithops/serverless/backends/aliyun_fc/config.py +++ b/lithops/serverless/backends/aliyun_fc/config.py @@ -33,8 +33,8 @@ BUILD_DIR = os.path.join(TEMP_DIR, 'AliyunRuntimeBuild') AVAILABLE_PY_RUNTIMES = { - '3.9': 'python3.9', - '3.10': 'python3.10' + '3.10': 'python3.10', + '3.12': 'python3.12', } REQUIREMENTS_FILE = """ diff --git a/lithops/serverless/backends/aws_lambda/config.py b/lithops/serverless/backends/aws_lambda/config.py index af4f6fe8f..853b6e599 100644 --- a/lithops/serverless/backends/aws_lambda/config.py +++ b/lithops/serverless/backends/aws_lambda/config.py @@ -32,11 +32,11 @@ ] AVAILABLE_PY_RUNTIMES = { - '3.8': 'python3.8', - '3.9': 'python3.9', '3.10': 'python3.10', '3.11': 'python3.11', - '3.12': 'python3.12' + '3.12': 'python3.12', + '3.13': 'python3.13', + '3.14': 'python3.14', } USER_RUNTIME_PREFIX = 'lithops.user_runtimes' diff --git a/lithops/serverless/backends/azure_functions/config.py b/lithops/serverless/backends/azure_functions/config.py index 438d145f1..ea4eb97ed 100644 --- a/lithops/serverless/backends/azure_functions/config.py +++ b/lithops/serverless/backends/azure_functions/config.py @@ -35,7 +35,7 @@ 'trigger': 'pub/sub' } -AVAILABLE_PY_RUNTIMES = ['3.8', '3.9', '3.10', '3.11'] +AVAILABLE_PY_RUNTIMES = ['3.10', '3.11', '3.12', '3.13', '3.14'] REQUIRED_AZURE_STORAGE_PARAMS = ('storage_account_name', 'storage_account_key') REQUIRED_AZURE_FUNCTIONS_PARAMS = ('resource_group', 'region') diff --git a/lithops/serverless/backends/gcp_functions/config.py b/lithops/serverless/backends/gcp_functions/config.py index fdb0a04f3..e61b67e50 100644 --- a/lithops/serverless/backends/gcp_functions/config.py +++ b/lithops/serverless/backends/gcp_functions/config.py @@ -29,12 +29,11 @@ RUNTIME_MEMORY_OPTIONS = {128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768} AVAILABLE_PY_RUNTIMES = { - '3.8': 'python38', - '3.9': 'python39', '3.10': 'python310', '3.11': 'python311', '3.12': 'python312', - '3.13': 'python313' + '3.13': 'python313', + '3.14': 'python314', } USER_RUNTIMES_PREFIX = 'lithops.user_runtimes' diff --git a/lithops/serverless/backends/ibm_cf/config.py b/lithops/serverless/backends/ibm_cf/config.py index 0c1e2707e..0d02ca8e0 100644 --- a/lithops/serverless/backends/ibm_cf/config.py +++ b/lithops/serverless/backends/ibm_cf/config.py @@ -18,8 +18,6 @@ import os AVAILABLE_PY_RUNTIMES = { - '3.8': 'docker.io/lithopscloud/ibmcf-python-v38', - '3.9': 'docker.io/lithopscloud/ibmcf-python-v39', '3.10': 'docker.io/lithopscloud/ibmcf-python-v310', '3.11': 'docker.io/lithopscloud/ibmcf-python-v311', '3.12': 'docker.io/lithopscloud/ibmcf-python-v312' diff --git a/lithops/serverless/backends/openwhisk/config.py b/lithops/serverless/backends/openwhisk/config.py index bc4b39d2d..a7cad3cda 100644 --- a/lithops/serverless/backends/openwhisk/config.py +++ b/lithops/serverless/backends/openwhisk/config.py @@ -17,8 +17,6 @@ import os AVAILABLE_PY_RUNTIMES = { - '3.8': 'docker.io/lithopscloud/openwhisk-python-v38', - '3.9': 'docker.io/lithopscloud/openwhisk-python-v39', '3.10': 'docker.io/lithopscloud/openwhisk-python-v310', '3.11': 'docker.io/lithopscloud/openwhisk-python-v311', '3.12': 'docker.io/lithopscloud/openwhisk-python-v312' diff --git a/lithops/serverless/backends/oracle_f/config.py b/lithops/serverless/backends/oracle_f/config.py index c2a29854c..d160a60a5 100644 --- a/lithops/serverless/backends/oracle_f/config.py +++ b/lithops/serverless/backends/oracle_f/config.py @@ -76,7 +76,7 @@ ENTRYPOINT ["/usr/local/bin/fdk", "handler/entry_point.py", "handler"] """ -AVAILABLE_PY_RUNTIMES = ['3.8', '3.9', '3.11'] +AVAILABLE_PY_RUNTIMES = ['3.11', '3.12'] REQ_PARAMS_1 = ('compartment_id', 'user', 'key_file', 'region', 'tenancy', 'fingerprint') REQ_PARAMS_2 = ('subnet_id', ) diff --git a/runtime/aliyun_fc/README.md b/runtime/aliyun_fc/README.md index e7e640106..882c797e3 100644 --- a/runtime/aliyun_fc/README.md +++ b/runtime/aliyun_fc/README.md @@ -2,7 +2,7 @@ The runtime is the place where your functions are executed. The default runtime is automatically created the first time you execute a function. Lithops automatically detects the Python version of your environment and deploys the default runtime based on it. -Currently, Aliyun Functions Compute supports Python 3.9 and 3.10. You can find the list of pre-installed modules [here](https://www.alibabacloud.com/help/en/function-compute/latest/python-event-functions). In addition, the Lithops default runtimes are built with the packages included in this [requirements.txt](requirements.txt) file: +Currently, Aliyun Function Compute supports Python 3.10 and 3.12 (3.12 is in public preview). You can find the list of pre-installed modules [here](https://www.alibabacloud.com/help/en/function-compute/latest/python-event-functions). In addition, the Lithops default runtimes are built with the packages included in this [requirements.txt](requirements.txt) file: To run a function with the default runtime you don't need to specify anything in the code, since everything is handled internally by Lithops: @@ -55,4 +55,4 @@ res = lith.get_result() print(res) ``` -Note that both the client and the runtime must have the same Python version. If you are running Lithops, for example, with Python 3.8, `my_matplotlib_runtime` will be a Python 3.8 runtime with the extra modules specified installed. +Note that both the client and the runtime must have the same Python version. If you are running Lithops, for example, with Python 3.10, `my_matplotlib_runtime` will be a Python 3.10 runtime with the extra modules specified installed. diff --git a/runtime/aws_lambda/Dockerfile.arm64 b/runtime/aws_lambda/Dockerfile.arm64 index e5b2ca986..f661a5c84 100644 --- a/runtime/aws_lambda/Dockerfile.arm64 +++ b/runtime/aws_lambda/Dockerfile.arm64 @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/python:3.8-arm64 +FROM public.ecr.aws/lambda/python:3.12-arm64 RUN apt-get update \ && apt-get install -y --no-install-recommends \ diff --git a/runtime/aws_lambda/README.md b/runtime/aws_lambda/README.md index 13ffddaec..045f83624 100644 --- a/runtime/aws_lambda/README.md +++ b/runtime/aws_lambda/README.md @@ -5,7 +5,7 @@ The runtime is the place where your functions are executed. AWS Lambda provides two methods for packaging the function code and dependencies of a runtime: ## Using predefined **runtimes** and **layers** -An AWS Lambda *runtime* is a predefined environment to run code on Lambda. For example, for Lithops we use runtimes for Python >= 3.8 that come with already preinstalled modules. A *layer* is a set of packaged dependencies that can be used by multiple runtimes. For example, Lithops dependencies are deployed as a layer, so if multiple runtimes are created with different memory values, they can mount the same layer containing the dependencies, instead +An AWS Lambda *runtime* is a predefined environment to run code on Lambda. For example, for Lithops we use runtimes for Python 3.10 through 3.14 that come with already preinstalled modules. A *layer* is a set of packaged dependencies that can be used by multiple runtimes. For example, Lithops dependencies are deployed as a layer, so if multiple runtimes are created with different memory values, they can mount the same layer containing the dependencies, instead of deploying them separately for each runtime. [In this link](https://gist.github.com/gene1wood/4a052f39490fae00e0c3#gistcomment-3131227) you can find which modules are preinstalled by default in an AWS Lambda Python runtime. Moreover, Lithops runtime also ships with the following packages: @@ -58,7 +58,7 @@ To build your own runtime, first install [Docker CE](https://docs.docker.com/get Update the [template Dockerfile](Dockerfile) that better fits to your requirements with your required system packages and Python modules. You can add a container layer (`RUN ...`) to install additional Python modules using `pip` or system libraries using `apt`, or even change to an older or newer Python version. -If you plan to use the **ARM64** architecture, you should consider creating a new dockerfile with an arm image from [https://gallery.ecr.aws/lambda/python](https://gallery.ecr.aws/lambda/python), in the tab "image tags". For example, you should start the dockerfile with the line `FROM public.ecr.aws/lambda/python:3.9-arm64` +If you plan to use the **ARM64** architecture, you should consider creating a new dockerfile with an arm image from [https://gallery.ecr.aws/lambda/python](https://gallery.ecr.aws/lambda/python), in the tab "image tags". For example, you should start the dockerfile with the line `FROM public.ecr.aws/lambda/python:3.12-arm64` Then, to build the custom runtime, use `lithops runtime build` CLI specifying the modified `Dockerfile` file and a runtime name. Note that you only need to specify the container name: `my-container-runtime-name`. diff --git a/runtime/azure_containers/Dockerfile b/runtime/azure_containers/Dockerfile index 8d89825ee..ddcefdf9b 100644 --- a/runtime/azure_containers/Dockerfile +++ b/runtime/azure_containers/Dockerfile @@ -1,13 +1,10 @@ -# Python 3.8 -#FROM python:3.8-slim-bookworm +# Python 3.12 +FROM python:3.12-slim-bookworm -# Python 3.9 -FROM python:3.9-slim-bookworm - -# Python 3.10 -#FROM python:3.10-slim-bookworm +# Python 3.13 +#FROM python:3.13-slim-bookworm RUN apt-get update && apt-get install -y \ zip \ diff --git a/runtime/azure_functions/README.md b/runtime/azure_functions/README.md index 255ef5670..b3febff28 100644 --- a/runtime/azure_functions/README.md +++ b/runtime/azure_functions/README.md @@ -2,7 +2,7 @@ The runtime is the place where your functions are executed. The default runtime is automatically created the first time you execute a function. Lithops automatically detects the Python version of your environment and deploys the default runtime based on it. -Currently, Azure Functions supports Python 3.8, 3.9, 3.10 and 3.11. You can find the list of pre-installed modules [here](https://github.com/Azure/azure-functions-python-worker/wiki/Preinstalled-Python-Libraries). In addition, the Lithops default runtimes are built with the packages included in this [requirements.txt](requirements.txt) file +Currently, Azure Functions supports Python 3.10, 3.11, 3.12, 3.13 and 3.14 (3.14 is in preview). You can find the list of pre-installed modules [here](https://github.com/Azure/azure-functions-python-worker/wiki/Preinstalled-Python-Libraries). In addition, the Lithops default runtimes are built with the packages included in this [requirements.txt](requirements.txt) file To run a function with the default runtime you don't need to specify anything in the code, since everything is handled internally by Lithops: @@ -54,4 +54,4 @@ res = lith.get_result() print(res) ``` -Note that both the client and the runtime must have the same python version. If you are running Lithops, for example, with Python 3.8, the `matplotlib-runtime` will be a Python 3.8 runtime with the extra modules specified installed. +Note that both the client and the runtime must have the same python version. If you are running Lithops, for example, with Python 3.12, the `matplotlib-runtime` will be a Python 3.12 runtime with the extra modules specified installed. diff --git a/runtime/code_engine/Dockerfile.opencv b/runtime/code_engine/Dockerfile.opencv index 4944f702f..fc140ed55 100644 --- a/runtime/code_engine/Dockerfile.opencv +++ b/runtime/code_engine/Dockerfile.opencv @@ -1,13 +1,10 @@ -# Python 3.8 -FROM python:3.8-slim-bookworm +# Python 3.12 +FROM python:3.12-slim-bookworm -# Python 3.9 -#FROM python:3.9-slim-bookworm - -# Python 3.10 -#FROM python:3.10-slim-bookworm +# Python 3.13 +#FROM python:3.13-slim-bookworm RUN apt-get update \ # add some packages required for the pip install diff --git a/runtime/gcp_functions/README.md b/runtime/gcp_functions/README.md index d63cbb640..f702c0cab 100644 --- a/runtime/gcp_functions/README.md +++ b/runtime/gcp_functions/README.md @@ -6,6 +6,8 @@ You can check supported runtimes and language details in the Cloud Run functions - [Runtime support](https://docs.cloud.google.com/functions/docs/runtime-support) - [Python dependencies](https://docs.cloud.google.com/run/docs/runtimes/python-dependencies) +Cloud Run functions currently supports Python 3.10, 3.11, 3.12, 3.13 and 3.14. + In addition, the Lithops default runtimes are built with the packages included in this [requirements.txt](requirements.txt) file: The default runtime is created automatically the first time you execute a function. Lithops automatically detects the Python version of your environment and deploys the default runtime based on it. In this sense, to run a function with the default runtime you don't need to specify anything in the code, since everything is managed internally by Lithops: diff --git a/runtime/openwhisk/README.md b/runtime/openwhisk/README.md index e194d0050..058a98c96 100644 --- a/runtime/openwhisk/README.md +++ b/runtime/openwhisk/README.md @@ -1,6 +1,6 @@ # Lithops runtime for OpenWhisk -The runtime is the place where your functions are executed. In Lithops, runtimes are based on docker images, and it includes default runtimes that allow you to run functions with Python >= 3.8 environments. Lithops main runtime is responsible to execute Python functions within OpenWhisk. The strong requirement here is to match Python versions between the client and the runtime. The runtime may also contain additional packages which your code depends on. +The runtime is the place where your functions are executed. In Lithops, runtimes are based on docker images, and it includes default runtimes that allow you to run functions with Python >= 3.10 environments. Lithops main runtime is responsible to execute Python functions within OpenWhisk. The strong requirement here is to match Python versions between the client and the runtime. The runtime may also contain additional packages which your code depends on. The default runtime is created the first time you execute a function. Lithops automatically detects the Python version of your environment and deploys the default runtime based on it. diff --git a/runtime/oracle_f/Dockerfile b/runtime/oracle_f/Dockerfile index 430874eb7..7ef0489d4 100644 --- a/runtime/oracle_f/Dockerfile +++ b/runtime/oracle_f/Dockerfile @@ -1,10 +1,10 @@ -# Python 3.8 -#FROM python:3.8-slim-bookworm +# Python 3.12 +FROM python:3.12-slim-bookworm -# Python 3.9 -FROM python:3.9-slim-bookworm +# Python 3.11 +#FROM python:3.11-slim-bookworm RUN apt-get update \ && apt-get install -y \ diff --git a/setup.py b/setup.py index c4c43fa98..0110e6cd0 100644 --- a/setup.py +++ b/setup.py @@ -115,11 +115,11 @@ 'Operating System :: OS Independent', 'Natural Language :: English', 'License :: OSI Approved :: Apache Software License', - 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', 'Programming Language :: Python :: 3.13', + 'Programming Language :: Python :: 3.14', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Scientific/Engineering', 'Topic :: System :: Distributed Computing',