mirror of
https://github.com/apache/superset.git
synced 2024-10-23 08:34:39 +08:00
chore: Bump to Python3.10 (#24112)
Co-authored-by: Maxime Beauchemin <maximebeauchemin@gmail.com>
This commit is contained in:
parent
f25795c4e4
commit
3a34c7ff7c
16
.asf.yaml
16
.asf.yaml
@ -67,15 +67,15 @@ github:
|
||||
- cypress-matrix (2, chrome)
|
||||
- cypress-matrix (3, chrome)
|
||||
- frontend-build
|
||||
- pre-commit (3.9)
|
||||
- python-lint (3.9)
|
||||
- test-mysql (3.9)
|
||||
- test-postgres (3.9)
|
||||
- pre-commit (3.10)
|
||||
- python-lint (3.10)
|
||||
- test-mysql (3.10)
|
||||
- test-postgres (3.10)
|
||||
- test-postgres-hive (3.9)
|
||||
- test-postgres-presto (3.9)
|
||||
- test-sqlite (3.9)
|
||||
- unit-tests (3.9)
|
||||
- test-postgres (3.11)
|
||||
- test-postgres-hive (3.10)
|
||||
- test-postgres-presto (3.10)
|
||||
- test-sqlite (3.10)
|
||||
- unit-tests (3.10)
|
||||
|
||||
required_pull_request_reviews:
|
||||
dismiss_stale_reviews: false
|
||||
|
1
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
1
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
@ -54,7 +54,6 @@ body:
|
||||
attributes:
|
||||
label: Python version
|
||||
options:
|
||||
- "3.9"
|
||||
- "3.10"
|
||||
- "3.11"
|
||||
- Not applicable
|
||||
|
2
.github/actions/setup-backend/action.yml
vendored
2
.github/actions/setup-backend/action.yml
vendored
@ -4,7 +4,7 @@ inputs:
|
||||
python-version:
|
||||
description: 'Python version to set up.'
|
||||
required: true
|
||||
default: '3.9'
|
||||
default: '3.10'
|
||||
cache:
|
||||
description: 'Cache dependencies. Options: pip'
|
||||
required: false
|
||||
|
2
.github/supersetbot/src/docker.js
vendored
2
.github/supersetbot/src/docker.js
vendored
@ -2,7 +2,7 @@ import { spawnSync } from 'child_process';
|
||||
|
||||
const REPO = 'apache/superset';
|
||||
const CACHE_REPO = `${REPO}-cache`;
|
||||
const BASE_PY_IMAGE = '3.9-slim-bookworm';
|
||||
const BASE_PY_IMAGE = '3.10-slim-bookworm';
|
||||
|
||||
export function runCmd(command, raiseOnFailure = true) {
|
||||
const { stdout, stderr } = spawnSync(command, { shell: true, encoding: 'utf-8', env: process.env });
|
||||
|
30
.github/workflows/no-op.yml
vendored
30
.github/workflows/no-op.yml
vendored
@ -82,3 +82,33 @@ jobs:
|
||||
run: |
|
||||
echo "This is a no-op step for unit-tests to ensure a successful status when skipped."
|
||||
exit 0
|
||||
test-mysql:
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.9"]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: No-op for test-mysql
|
||||
run: |
|
||||
echo "This is a no-op step for test-mysql to ensure a successful status when skipped."
|
||||
exit 0
|
||||
test-postgres:
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.9"]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: No-op for test-postgres
|
||||
run: |
|
||||
echo "This is a no-op step for test-postgres to ensure a successful status when skipped."
|
||||
exit 0
|
||||
test-sqlite:
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.9"]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: No-op for test-sqlite
|
||||
run: |
|
||||
echo "This is a no-op step for test-sqlite to ensure a successful status when skipped."
|
||||
exit 0
|
||||
|
2
.github/workflows/pre-commit.yml
vendored
2
.github/workflows/pre-commit.yml
vendored
@ -18,7 +18,7 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.9"]
|
||||
python-version: ["3.10"]
|
||||
steps:
|
||||
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
|
||||
uses: actions/checkout@v4
|
||||
|
2
.github/workflows/superset-cli.yml
vendored
2
.github/workflows/superset-cli.yml
vendored
@ -18,7 +18,7 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.9"]
|
||||
python-version: ["3.10"]
|
||||
env:
|
||||
PYTHONPATH: ${{ github.workspace }}
|
||||
SUPERSET_CONFIG: tests.integration_tests.superset_test_config
|
||||
|
2
.github/workflows/superset-helm-lint.yml
vendored
2
.github/workflows/superset-helm-lint.yml
vendored
@ -29,7 +29,7 @@ jobs:
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.9"
|
||||
python-version: "3.10"
|
||||
|
||||
- name: Set up chart-testing
|
||||
uses: ./.github/actions/chart-testing-action
|
||||
|
@ -18,7 +18,7 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.9"]
|
||||
python-version: ["3.10"]
|
||||
env:
|
||||
PYTHONPATH: ${{ github.workspace }}
|
||||
SUPERSET_CONFIG: tests.integration_tests.superset_test_config
|
||||
@ -76,7 +76,7 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.9", "3.10"]
|
||||
python-version: ["3.10", "3.11"]
|
||||
env:
|
||||
PYTHONPATH: ${{ github.workspace }}
|
||||
SUPERSET_CONFIG: tests.integration_tests.superset_test_config
|
||||
@ -136,7 +136,7 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.9"]
|
||||
python-version: ["3.10"]
|
||||
env:
|
||||
PYTHONPATH: ${{ github.workspace }}
|
||||
SUPERSET_CONFIG: tests.integration_tests.superset_test_config
|
||||
|
4
.github/workflows/superset-python-misc.yml
vendored
4
.github/workflows/superset-python-misc.yml
vendored
@ -23,7 +23,7 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.9"]
|
||||
python-version: ["3.10"]
|
||||
steps:
|
||||
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
|
||||
uses: actions/checkout@v4
|
||||
@ -51,7 +51,7 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.9"]
|
||||
python-version: ["3.10"]
|
||||
steps:
|
||||
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
|
||||
uses: actions/checkout@v4
|
||||
|
@ -23,7 +23,7 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.9"]
|
||||
python-version: ["3.10"]
|
||||
env:
|
||||
PYTHONPATH: ${{ github.workspace }}
|
||||
SUPERSET_CONFIG: tests.integration_tests.superset_test_config
|
||||
@ -90,7 +90,7 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.9"]
|
||||
python-version: ["3.10"]
|
||||
env:
|
||||
PYTHONPATH: ${{ github.workspace }}
|
||||
SUPERSET_CONFIG: tests.integration_tests.superset_test_config
|
||||
|
@ -29,7 +29,7 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.9", "3.10"]
|
||||
python-version: ["3.10", "3.11"]
|
||||
env:
|
||||
PYTHONPATH: ${{ github.workspace }}
|
||||
steps:
|
||||
|
2
.github/workflows/superset-translations.yml
vendored
2
.github/workflows/superset-translations.yml
vendored
@ -39,7 +39,7 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.9"]
|
||||
python-version: ["3.10"]
|
||||
steps:
|
||||
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
|
||||
uses: actions/checkout@v4
|
||||
|
@ -18,7 +18,7 @@
|
||||
######################################################################
|
||||
# Node stage to deal with static asset construction
|
||||
######################################################################
|
||||
ARG PY_VER=3.9-slim-bookworm
|
||||
ARG PY_VER=3.10-slim-bookworm
|
||||
|
||||
# if BUILDPLATFORM is null, set it to 'amd64' (or leave as is otherwise).
|
||||
ARG BUILDPLATFORM=${BUILDPLATFORM:-amd64}
|
||||
|
6
Makefile
6
Makefile
@ -15,8 +15,8 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
# Python version installed; we need 3.9-3.11
|
||||
PYTHON=`command -v python3.11 || command -v python3.10 || command -v python3.9`
|
||||
# Python version installed; we need 3.10-3.11
|
||||
PYTHON=`command -v python3.11 || command -v python3.10`
|
||||
|
||||
.PHONY: install superset venv pre-commit
|
||||
|
||||
@ -70,7 +70,7 @@ update-js:
|
||||
|
||||
venv:
|
||||
# Create a virtual environment and activate it (recommended)
|
||||
if ! [ -x "${PYTHON}" ]; then echo "You need Python 3.9, 3.10 or 3.11 installed"; exit 1; fi
|
||||
if ! [ -x "${PYTHON}" ]; then echo "You need Python 3.10 or 3.11 installed"; exit 1; fi
|
||||
test -d venv || ${PYTHON} -m venv venv # setup a python3 virtualenv
|
||||
. venv/bin/activate
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
FROM python:3.9-buster
|
||||
FROM python:3.10-slim-bookworm
|
||||
|
||||
RUN useradd --user-group --create-home --no-log-init --shell /bin/bash superset
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
FROM python:3.9-buster
|
||||
FROM python:3.10-slim-bookworm
|
||||
|
||||
RUN useradd --user-group --create-home --no-log-init --shell /bin/bash superset
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
FROM python:3.9-buster
|
||||
FROM python:3.10-slim-bookworm
|
||||
ARG VERSION
|
||||
|
||||
RUN git clone --depth 1 --branch ${VERSION} https://github.com/apache/superset.git /superset
|
||||
|
@ -14,7 +14,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
FROM python:3.9-buster
|
||||
FROM python:3.10-slim-bookworm
|
||||
|
||||
RUN apt-get update -y
|
||||
RUN apt-get install -y jq
|
||||
|
@ -35,6 +35,9 @@ assists people when migrating to a new version.
|
||||
files for production use cases! While we never really supported
|
||||
or should have tried to support docker-compose for production use cases, we now actively
|
||||
have taken a stance against supporting it. See the PR for details.
|
||||
- [24112](https://github.com/apache/superset/pull/24112): Python 3.10 is now the recommended python version to use, 3.9 still
|
||||
supported but getting deprecated in the nearish future. CI/CD runs on py310 so you probably want to align. If you
|
||||
use official dockers, upgrade should happen automatically.
|
||||
- [27697](https://github.com/apache/superset/pull/27697) [minor] flask-session bump leads to them
|
||||
deprecating `SESSION_USE_SIGNER`, check your configs as this flag won't do anything moving
|
||||
forward.
|
||||
|
@ -26,7 +26,7 @@ x-common-build: &common-build
|
||||
context: .
|
||||
target: dev
|
||||
cache_from:
|
||||
- apache/superset-cache:3.9-slim-bookworm
|
||||
- apache/superset-cache:3.10-slim-bookworm
|
||||
|
||||
version: "4.0"
|
||||
services:
|
||||
|
@ -30,7 +30,7 @@ x-common-build: &common-build
|
||||
context: .
|
||||
target: dev
|
||||
cache_from:
|
||||
- apache/superset-cache:3.9-slim-bookworm
|
||||
- apache/superset-cache:3.10-slim-bookworm
|
||||
|
||||
version: "4.0"
|
||||
services:
|
||||
|
@ -12,7 +12,7 @@ version: 1
|
||||
Make sure your machine meets the [OS dependencies](/docs/installation/installing-superset-from-pypi#os-dependencies) before following these steps.
|
||||
You also need to install MySQL or [MariaDB](https://mariadb.com/downloads).
|
||||
|
||||
Ensure that you are using Python version 3.9 or 3.10, then proceed with:
|
||||
Ensure that you are using Python version 3.10 or 3.11, then proceed with:
|
||||
|
||||
```bash
|
||||
# Create a virtual environment and activate it (recommended)
|
||||
|
@ -26,7 +26,7 @@ Here are the build presets that are exposed through the `build_docker.py` script
|
||||
- `lean`: The default Docker image, including both frontend and backend. Tags
|
||||
without a build_preset are lean builds, e.g., `latest`.
|
||||
- `dev`: For development, with a headless browser, dev-related utilities and root access.
|
||||
- `py310`, e.g., Py310: Similar to lean but with a different Python version (in this example, 3.10).
|
||||
- `py311`, e.g., Py311: Similar to lean but with a different Python version (in this example, 3.11).
|
||||
- `ci`: For certain CI workloads.
|
||||
- `websocket`: For Superset clusters supporting advanced features.
|
||||
- `dockerize`: Used by Helm.
|
||||
|
@ -36,7 +36,7 @@ pylint
|
||||
pytest
|
||||
pytest-cov
|
||||
pytest-mock
|
||||
python-ldap>=3.4.3
|
||||
python-ldap>=3.4.4
|
||||
sqloxide
|
||||
statsd
|
||||
tox
|
||||
|
@ -1,4 +1,4 @@
|
||||
# SHA1:3b6a7d105f9d14b449d4232aa368bd6a40d4c7ef
|
||||
# SHA1:3ba2a85b7f1506a7fd0c2bba84ec741dbbaf8254
|
||||
#
|
||||
# This file is autogenerated by pip-compile-multi
|
||||
# To update, run:
|
||||
@ -226,7 +226,7 @@ pytest-cov==4.0.0
|
||||
# via -r requirements/development.in
|
||||
pytest-mock==3.10.0
|
||||
# via -r requirements/development.in
|
||||
python-ldap==3.4.3
|
||||
python-ldap==3.4.4
|
||||
# via -r requirements/development.in
|
||||
pytz-deprecation-shim==0.1.0.post0
|
||||
# via tzlocal
|
||||
|
@ -25,7 +25,7 @@ import click
|
||||
|
||||
REPO = "apache/superset"
|
||||
CACHE_REPO = f"{REPO}-cache"
|
||||
BASE_PY_IMAGE = "3.9-slim-bookworm"
|
||||
BASE_PY_IMAGE = "3.10-slim-bookworm"
|
||||
|
||||
|
||||
def run_cmd(command: str, raise_on_failure: bool = True) -> str:
|
||||
@ -149,9 +149,9 @@ def get_docker_command(
|
||||
build_target = "dev"
|
||||
elif build_preset == "lean":
|
||||
build_target = "lean"
|
||||
elif build_preset == "py310":
|
||||
elif build_preset == "py311":
|
||||
build_target = "lean"
|
||||
py_ver = "3.10-slim-bookworm"
|
||||
py_ver = "3.11-slim-bookworm"
|
||||
elif build_preset == "websocket":
|
||||
build_target = ""
|
||||
docker_context = "superset-websocket"
|
||||
@ -217,7 +217,7 @@ def get_docker_command(
|
||||
@click.command()
|
||||
@click.argument(
|
||||
"build_preset",
|
||||
type=click.Choice(["lean", "dev", "dockerize", "websocket", "py310", "ci"]),
|
||||
type=click.Choice(["lean", "dev", "dockerize", "websocket", "py311", "ci"]),
|
||||
)
|
||||
@click.argument("build_context", type=click.Choice(["push", "pull_request", "release"]))
|
||||
@click.option(
|
||||
|
Loading…
Reference in New Issue
Block a user