This is an automated email from the ASF dual-hosted git repository.
klesh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/devlake.git
The following commit(s) were added to refs/heads/main by this push:
new b7e5efaf1 chore(python): bump Python runtime from 3.9 to 3.11 (#9005)
b7e5efaf1 is described below
commit b7e5efaf15a0f9b554d87054b571fdfe70504002
Author: Dirk <[email protected]>
AuthorDate: Mon Aug 3 15:43:29 2026 +0200
chore(python): bump Python runtime from 3.9 to 3.11 (#9005)
Bump the Python runtime used across the project from 3.9 to 3.11:
- backend/Dockerfile: server image base python:3.9 -> python:3.11
- backend/python/uv.sh: default uv venv python 3.9 -> 3.11
- pydevlake / azuredevops / fakeplugin pyproject.toml: python
constraint "~3.9" -> ">=3.11,<3.12"
- .devcontainer/devcontainer.json: python feature 3.9 -> 3.11
- backend/python/DevelopmentSetup.md: docs reference python3.11
This is a pure runtime bump. No library versions are changed and the
existing Pydantic v1 code keeps working on 3.11 (verified with
build-pydevlake and unit-test-python). Library upgrades (Pydantic v2,
SQLModel, ...) and the corresponding poetry.lock regeneration are done
in a follow-up PR.
Signed-off-by: DoDiODev <[email protected]>
---
.devcontainer/devcontainer.json | 2 +-
backend/Dockerfile | 2 +-
backend/python/DevelopmentSetup.md | 10 +++++-----
backend/python/plugins/azuredevops/pyproject.toml | 2 +-
backend/python/pydevlake/pyproject.toml | 2 +-
backend/python/test/fakeplugin/pyproject.toml | 2 +-
backend/python/uv.sh | 2 +-
7 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index 94b84f20f..e6564dd2f 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -24,7 +24,7 @@
"ghcr.io/jungaretti/features/make:1": {},
"ghcr.io/devcontainers/features/docker-in-docker:2.12.0": {},
"ghcr.io/devcontainers/features/python:1": {
- "version": "3.9"
+ "version": "3.11"
},
"ghcr.io/devcontainers-extra/features/poetry:2": {},
"ghcr.io/devcontainers/features/node:1": {
diff --git a/backend/Dockerfile b/backend/Dockerfile
index 1d839f72e..87e9adaef 100644
--- a/backend/Dockerfile
+++ b/backend/Dockerfile
@@ -113,7 +113,7 @@ RUN cd /usr/local/deps/target/lib && \
done
-FROM python:3.9-slim-bookworm as base
+FROM python:3.11-slim-bookworm as base
RUN apt-get update && \
apt-get install -y python3-dev python3-pip tar pkg-config curl libssh2-1
zlib1g libffi-dev default-libmysqlclient-dev libpq-dev tini git openssh-client
corkscrew && \
diff --git a/backend/python/DevelopmentSetup.md
b/backend/python/DevelopmentSetup.md
index 4bc885a96..c831313c8 100644
--- a/backend/python/DevelopmentSetup.md
+++ b/backend/python/DevelopmentSetup.md
@@ -22,12 +22,12 @@ limitations under the License.
For the Python plugin tests to run properly, the following steps must be taken:
1. The following packages are required for Ubuntu: `libffi-dev
default-libmysqlclient-dev libpq-dev`
-2. `python3.9` is required by the time of this document.
- - Try `deadsnakes` if you are using Ubuntu 22.04 or above, the
`python3.9-dev` is required.
- - Use `virtualenv` if you are having multiple python versions. `virtualenv
-p python3.9 path/to/venv` and `source path/to/venv/bin/activate.sh` should do
the trick
-3. both `mysql-client` and `postgresql` are required.
+2. `python3.11` is required by the time of this document.
+ - Try `deadsnakes` if you are using Ubuntu 22.04 or above, the
`python3.11-dev` is required.
+ - Use `virtualenv` if you are having multiple python versions. `virtualenv
-p python3.11 path/to/venv` and `source path/to/venv/bin/activate.sh` should do
the trick
+3. both `mysql-client` and `postgresql` are required.
- `postgresql` is required for `psycopg2` to work
-4. [poetry](https://python-poetry.org/) is required.
+4. [poetry](https://python-poetry.org/) is required.
- run `cd backend/python/pydevlake && poetry install`
- run `cd backend/python/plugins/azuredevops && poetry install`
5. `sqlalchemy` won't work with `localhost` in the database connection string,
use `127.0.0.1` instead
diff --git a/backend/python/plugins/azuredevops/pyproject.toml
b/backend/python/plugins/azuredevops/pyproject.toml
index df7e8d255..74ee730f8 100644
--- a/backend/python/plugins/azuredevops/pyproject.toml
+++ b/backend/python/plugins/azuredevops/pyproject.toml
@@ -21,7 +21,7 @@ authors = ["Hezheng Yin <[email protected]>"]
readme = "README.md"
[tool.poetry.dependencies]
-python = "~3.9"
+python = ">=3.11,<3.12"
pydevlake = { path = "../../pydevlake", develop = true }
diff --git a/backend/python/pydevlake/pyproject.toml
b/backend/python/pydevlake/pyproject.toml
index 9f52bf821..c18cd9f62 100644
--- a/backend/python/pydevlake/pyproject.toml
+++ b/backend/python/pydevlake/pyproject.toml
@@ -22,7 +22,7 @@ license = "Apache-2.0"
readme = "README.md"
[tool.poetry.dependencies]
-python = "~3.9"
+python = ">=3.11,<3.12"
sqlmodel = "^0.0.8"
mysqlclient = "^2.1.1"
requests = "^2.28.1"
diff --git a/backend/python/test/fakeplugin/pyproject.toml
b/backend/python/test/fakeplugin/pyproject.toml
index 9f17ea3b3..d72afa4f9 100644
--- a/backend/python/test/fakeplugin/pyproject.toml
+++ b/backend/python/test/fakeplugin/pyproject.toml
@@ -20,7 +20,7 @@ description = "Fake python plugin used only in tests"
authors = []
[tool.poetry.dependencies]
-python = "~3.9"
+python = ">=3.11,<3.12"
pydevlake = { path = "../../pydevlake", develop = true }
diff --git a/backend/python/uv.sh b/backend/python/uv.sh
index 9e9d7696f..b775b9787 100755
--- a/backend/python/uv.sh
+++ b/backend/python/uv.sh
@@ -50,7 +50,7 @@ sync_project() {
rm -rf .venv
fi
if [ ! -x .venv/bin/python ]; then
- uv venv --python "${DEVLAKE_PYTHON_VERSION:-3.9}" .venv
+ uv venv --python "${DEVLAKE_PYTHON_VERSION:-3.11}" .venv
fi
uv pip install --python .venv/bin/python -e .
}