Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Bump to Python3.10 #24112

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
63b7edc
chore: Bump to Python3.10
EugeneTorap May 18, 2023
a6803a1
Remove 'sasl' lib
EugeneTorap May 18, 2023
11db1b4
Add 'sasl' lib in hive CI
EugeneTorap May 18, 2023
a961133
Merge branch 'master' into chore/bump-to-python3.10
EugeneTorap Jul 15, 2023
affc394
Update python version
EugeneTorap Jul 15, 2023
0b371d0
Merge branch 'master' into chore/bump-to-python3.10
EugeneTorap Jul 25, 2023
a5abd13
Merge branch 'master' into chore/bump-to-python3.10
EugeneTorap Jul 31, 2023
c88087b
Merge branch 'master' into chore/bump-to-python3.10
EugeneTorap Oct 8, 2023
8a432f8
Use python 3.10.13 in Dockerfile
EugeneTorap Oct 8, 2023
768bea6
Merge branch 'master' into chore/bump-to-python3.10
EugeneTorap Feb 2, 2024
918cde7
Update python version
EugeneTorap Feb 2, 2024
bb2f849
Update python version
EugeneTorap Feb 2, 2024
fb91437
Revert changes
EugeneTorap Feb 2, 2024
f08c5b1
Remove exclude for arm64 docker building
EugeneTorap Feb 2, 2024
c885dde
Merge branch 'master' into chore/bump-to-python3.10
EugeneTorap Mar 21, 2024
b6de4d4
Merge branch 'master' into chore/bump-to-python3.10
EugeneTorap Mar 21, 2024
8c3c8cf
Update python version
EugeneTorap Mar 21, 2024
308690f
Fix python version
EugeneTorap Mar 21, 2024
b8371e9
Update python-ldap to 3.4.4
EugeneTorap Mar 21, 2024
0b5075f
Fix python version
EugeneTorap Mar 21, 2024
4538a7b
Update action.yml
mistercrunch Mar 22, 2024
7827265
Bump .asf.yaml
EugeneTorap Mar 22, 2024
1ffcc47
Revert no-op.yml
EugeneTorap Mar 22, 2024
2f8be00
Add a bunch of no-op checks for Py3.9
EugeneTorap Mar 22, 2024
1706d1d
Revert 'python_requires' to "~=3.9"
EugeneTorap Mar 22, 2024
275f129
Fix PY 3.11 docker image
EugeneTorap Mar 22, 2024
73f8a65
Add an entry on ./UPDATING.md
EugeneTorap Mar 22, 2024
5c4f697
Merge branch 'master' into chore/bump-to-python3.10
EugeneTorap Mar 29, 2024
45e2411
Revert "Revert 'python_requires' to "~=3.9""
EugeneTorap Mar 29, 2024
0651b6b
Revert "Update action.yml"
EugeneTorap Mar 30, 2024
13d5df4
Add python 3.9 support back in setup.py
mistercrunch Apr 2, 2024
e7a6e9b
Merge branch 'master' into chore/bump-to-python3.10
mistercrunch Apr 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ body:
attributes:
label: Python version
options:
- "3.9"
- "3.10"
- "3.11"
- Not applicable
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup-backend/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/supersetbot/src/docker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/no-op.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/superset-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/superset-helm-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/superset-python-integrationtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/superset-python-misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/superset-python-presto-hive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/superset-python-unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/superset-translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion RELEASING/Dockerfile.from_local_tarball
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion RELEASING/Dockerfile.from_svn_tarball
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion RELEASING/Dockerfile.make_docs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion RELEASING/Dockerfile.make_tarball
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions UPDATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docker-compose-non-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/contributing/local-backend.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/installation/docker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion requirements/development.in
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pylint
pytest
pytest-cov
pytest-mock
python-ldap>=3.4.3
python-ldap>=3.4.4
sqloxide
statsd
tox
4 changes: 2 additions & 2 deletions requirements/development.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SHA1:3b6a7d105f9d14b449d4232aa368bd6a40d4c7ef
# SHA1:3ba2a85b7f1506a7fd0c2bba84ec741dbbaf8254
#
# This file is autogenerated by pip-compile-multi
# To update, run:
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions scripts/build_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

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:
Expand Down Expand Up @@ -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":
mistercrunch marked this conversation as resolved.
Show resolved Hide resolved
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"
Expand Down Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# Remember to start celery workers to run celery tests, e.g.
# celery --app=superset.tasks.celery_app:app worker -Ofair -c 2
[testenv]
basepython = python3.9
basepython = python3.10
ignore_basepython_conflict = true
commands =
superset db upgrade
Expand Down
Loading