diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 94b84f20f66..e6564dd2f84 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 1d839f72e8c..87e9adaefd8 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 4bc885a96a3..c831313c8de 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 df7e8d2552d..74ee730f87b 100644 --- a/backend/python/plugins/azuredevops/pyproject.toml +++ b/backend/python/plugins/azuredevops/pyproject.toml @@ -21,7 +21,7 @@ authors = ["Hezheng Yin "] 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 9f52bf821a5..c18cd9f62b3 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 9f17ea3b30b..d72afa4f9b3 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 9e9d7696f18..b775b9787c0 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 . }