From 63b7edc3cd6350ac40f89a5b455b1cc4e858dcb5 Mon Sep 17 00:00:00 2001 From: EugeneTorap Date: Thu, 18 May 2023 11:09:56 +0300 Subject: [PATCH 01/23] chore: Bump to Python3.10 --- .github/workflows/docker_build_push.sh | 12 ++++++------ .github/workflows/superset-applitool-cypress.yml | 2 +- .github/workflows/superset-cli.yml | 2 +- .github/workflows/superset-e2e.yml | 2 +- .github/workflows/superset-helm-lint.yml | 2 +- .../workflows/superset-python-integrationtest.yml | 6 +++--- .github/workflows/superset-python-misc.yml | 6 +++--- .github/workflows/superset-python-presto-hive.yml | 4 ++-- .github/workflows/superset-python-unittest.yml | 2 +- .github/workflows/superset-translations.yml | 2 +- Dockerfile | 2 +- Makefile | 6 +++--- docs/docs/contributing/local-backend.mdx | 2 +- requirements/development.txt | 2 +- requirements/testing.txt | 2 +- setup.py | 3 +-- 16 files changed, 28 insertions(+), 29 deletions(-) diff --git a/.github/workflows/docker_build_push.sh b/.github/workflows/docker_build_push.sh index 642b9b53db6de..0d5a6b1fb8e05 100755 --- a/.github/workflows/docker_build_push.sh +++ b/.github/workflows/docker_build_push.sh @@ -57,16 +57,16 @@ docker build --target lean \ . # -# Build the "lean310" image +# Build the "lean311" image # docker build --target lean \ - -t "${REPO_NAME}:${SHA}-py310" \ - -t "${REPO_NAME}:${REFSPEC}-py310" \ - -t "${REPO_NAME}:${LATEST_TAG}-py310" \ - --build-arg PY_VER="3.10-slim"\ + -t "${REPO_NAME}:${SHA}-py311" \ + -t "${REPO_NAME}:${REFSPEC}-py311" \ + -t "${REPO_NAME}:${LATEST_TAG}-py311" \ + --build-arg PY_VER="3.11-slim"\ --label "sha=${SHA}" \ --label "built_at=$(date)" \ - --label "target=lean310" \ + --label "target=lean311" \ --label "build_actor=${GITHUB_ACTOR}" \ . diff --git a/.github/workflows/superset-applitool-cypress.yml b/.github/workflows/superset-applitool-cypress.yml index 7222ed17d41c5..d6758343ecf93 100644 --- a/.github/workflows/superset-applitool-cypress.yml +++ b/.github/workflows/superset-applitool-cypress.yml @@ -60,7 +60,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: "3.9" + python-version: "3.10" - name: OS dependencies uses: ./.github/actions/cached-dependencies with: diff --git a/.github/workflows/superset-cli.yml b/.github/workflows/superset-cli.yml index 129ecc117abce..4eb9fec4dba3a 100644 --- a/.github/workflows/superset-cli.yml +++ b/.github/workflows/superset-cli.yml @@ -13,7 +13,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 diff --git a/.github/workflows/superset-e2e.yml b/.github/workflows/superset-e2e.yml index e1b090a5f3994..be683d4f81332 100644 --- a/.github/workflows/superset-e2e.yml +++ b/.github/workflows/superset-e2e.yml @@ -69,7 +69,7 @@ jobs: if: steps.check.outcome == 'failure' uses: actions/setup-python@v4 with: - python-version: "3.9" + python-version: "3.10" - name: OS dependencies if: steps.check.outcome == 'failure' uses: ./.github/actions/cached-dependencies diff --git a/.github/workflows/superset-helm-lint.yml b/.github/workflows/superset-helm-lint.yml index 4bb888e15d74e..33da18e5384d7 100644 --- a/.github/workflows/superset-helm-lint.yml +++ b/.github/workflows/superset-helm-lint.yml @@ -22,7 +22,7 @@ jobs: - uses: actions/setup-python@v4 with: - python-version: "3.9" + python-version: "3.10" - name: Set up chart-testing uses: ./.github/actions/chart-testing-action diff --git a/.github/workflows/superset-python-integrationtest.yml b/.github/workflows/superset-python-integrationtest.yml index 40096c2eb8ec3..b48c6fa2ed522 100644 --- a/.github/workflows/superset-python-integrationtest.yml +++ b/.github/workflows/superset-python-integrationtest.yml @@ -14,7 +14,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 @@ -80,7 +80,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 @@ -147,7 +147,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 diff --git a/.github/workflows/superset-python-misc.yml b/.github/workflows/superset-python-misc.yml index 400c217ed4262..7ed68e89045ca 100644 --- a/.github/workflows/superset-python-misc.yml +++ b/.github/workflows/superset-python-misc.yml @@ -14,7 +14,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@v3 @@ -54,7 +54,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@v3 @@ -95,7 +95,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@v3 diff --git a/.github/workflows/superset-python-presto-hive.yml b/.github/workflows/superset-python-presto-hive.yml index 9349549848449..2ca9b8a8dbc83 100644 --- a/.github/workflows/superset-python-presto-hive.yml +++ b/.github/workflows/superset-python-presto-hive.yml @@ -14,7 +14,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 @@ -91,7 +91,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 diff --git a/.github/workflows/superset-python-unittest.yml b/.github/workflows/superset-python-unittest.yml index 3fdc315b02642..2866c1f62f982 100644 --- a/.github/workflows/superset-python-unittest.yml +++ b/.github/workflows/superset-python-unittest.yml @@ -14,7 +14,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: diff --git a/.github/workflows/superset-translations.yml b/.github/workflows/superset-translations.yml index c903b9226940a..9cfbe890df761 100644 --- a/.github/workflows/superset-translations.yml +++ b/.github/workflows/superset-translations.yml @@ -35,7 +35,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@v3 diff --git a/Dockerfile b/Dockerfile index 0745294b45371..8fb6859b766dd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ ###################################################################### # Node stage to deal with static asset construction ###################################################################### -ARG PY_VER=3.9.16-slim +ARG PY_VER=3.10.11-slim # if BUILDPLATFORM is null, set it to 'amd64' (or leave as is otherwise). ARG BUILDPLATFORM=${BUILDPLATFORM:-amd64} diff --git a/Makefile b/Makefile index 14e7bb17efdac..aa8b9b20c62f6 100644 --- a/Makefile +++ b/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 diff --git a/docs/docs/contributing/local-backend.mdx b/docs/docs/contributing/local-backend.mdx index 5056f167369dc..2de66336cc2a1 100644 --- a/docs/docs/contributing/local-backend.mdx +++ b/docs/docs/contributing/local-backend.mdx @@ -12,7 +12,7 @@ version: 1 Make sure your machine meets the [OS dependencies](https://superset.apache.org/docs/installation/installing-superset-from-scratch#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) diff --git a/requirements/development.txt b/requirements/development.txt index e398368e7a7c0..fe9fad9323759 100644 --- a/requirements/development.txt +++ b/requirements/development.txt @@ -88,7 +88,7 @@ pure-sasl==0.6.2 # via thrift-sasl pydruid==0.6.5 # via apache-superset -pyhive[hive]==0.6.5 +pyhive==0.7.0.dev0 # via apache-superset pyinstrument==4.4.0 # via -r requirements/development.in diff --git a/requirements/testing.txt b/requirements/testing.txt index efa48fcad9398..d853959fe909f 100644 --- a/requirements/testing.txt +++ b/requirements/testing.txt @@ -107,7 +107,7 @@ pydata-google-auth==1.7.0 # via pandas-gbq pyfakefs==5.2.2 # via -r requirements/testing.in -pyhive[presto]==0.6.5 +pyhive==0.7.0.dev0 # via apache-superset pytest==7.3.1 # via diff --git a/setup.py b/setup.py index d59f0c6496a0e..7ab587750cf31 100644 --- a/setup.py +++ b/setup.py @@ -190,13 +190,12 @@ def get_git_sha() -> str: "vertica": ["sqlalchemy-vertica-python>=0.5.9, < 0.6"], "netezza": ["nzalchemy>=11.0.2"], }, - python_requires="~=3.9", + python_requires="~=3.10", author="Apache Software Foundation", author_email="dev@superset.apache.org", url="https://superset.apache.org/", download_url="https://www.apache.org/dist/superset/" + version_string, classifiers=[ - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", ], From a6803a120c689c2b8dbbcf1258db02864581a9fa Mon Sep 17 00:00:00 2001 From: EugeneTorap Date: Thu, 18 May 2023 11:23:12 +0300 Subject: [PATCH 02/23] Remove 'sasl' lib --- requirements/development.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/requirements/development.txt b/requirements/development.txt index fe9fad9323759..b05102c0f05bd 100644 --- a/requirements/development.txt +++ b/requirements/development.txt @@ -103,8 +103,6 @@ rfc3986==2.0.0 # via tableschema s3transfer==0.6.1 # via boto3 -sasl==0.3.1 - # via pyhive sqloxide==0.1.33 # via -r requirements/development.in stack-data==0.6.2 From 11db1b485276a69943c85bbfe5180c695896ed8e Mon Sep 17 00:00:00 2001 From: EugeneTorap Date: Thu, 18 May 2023 11:44:30 +0300 Subject: [PATCH 03/23] Add 'sasl' lib in hive CI --- .github/workflows/superset-python-presto-hive.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/superset-python-presto-hive.yml b/.github/workflows/superset-python-presto-hive.yml index 2ca9b8a8dbc83..5b09047cdd6dc 100644 --- a/.github/workflows/superset-python-presto-hive.yml +++ b/.github/workflows/superset-python-presto-hive.yml @@ -150,6 +150,7 @@ jobs: apt-get-install pip-upgrade pip install wheel + pip install sasl pip install -r requirements/testing.txt setup-postgres - name: Run celery From affc394775a0df36285e386d38b5a3a048ff865b Mon Sep 17 00:00:00 2001 From: EugeneTorap Date: Sat, 15 Jul 2023 18:49:21 +0300 Subject: [PATCH 04/23] Update python version --- RELEASING/Dockerfile.from_local_tarball | 2 +- RELEASING/Dockerfile.from_svn_tarball | 2 +- RELEASING/Dockerfile.make_docs | 2 +- RELEASING/Dockerfile.make_tarball | 2 +- tox.ini | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/RELEASING/Dockerfile.from_local_tarball b/RELEASING/Dockerfile.from_local_tarball index e62f409febe62..8f5605b25d646 100644 --- a/RELEASING/Dockerfile.from_local_tarball +++ b/RELEASING/Dockerfile.from_local_tarball @@ -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 diff --git a/RELEASING/Dockerfile.from_svn_tarball b/RELEASING/Dockerfile.from_svn_tarball index 308adc73eba08..22883552cabfa 100644 --- a/RELEASING/Dockerfile.from_svn_tarball +++ b/RELEASING/Dockerfile.from_svn_tarball @@ -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 diff --git a/RELEASING/Dockerfile.make_docs b/RELEASING/Dockerfile.make_docs index eaa59c34ab4f3..c4bca3bb3a89a 100644 --- a/RELEASING/Dockerfile.make_docs +++ b/RELEASING/Dockerfile.make_docs @@ -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 diff --git a/RELEASING/Dockerfile.make_tarball b/RELEASING/Dockerfile.make_tarball index 59a306fbf4088..3a963723de093 100644 --- a/RELEASING/Dockerfile.make_tarball +++ b/RELEASING/Dockerfile.make_tarball @@ -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 diff --git a/tox.ini b/tox.ini index c63fa947df6f4..c68e2919d0be8 100644 --- a/tox.ini +++ b/tox.ini @@ -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 From 8a432f8343a51f7bd8d6486461ec75a289ec36fd Mon Sep 17 00:00:00 2001 From: EugeneTorap Date: Sun, 8 Oct 2023 11:52:58 +0300 Subject: [PATCH 05/23] Use python 3.10.13 in Dockerfile --- .github/workflows/superset-python-presto-hive.yml | 1 - Dockerfile | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/superset-python-presto-hive.yml b/.github/workflows/superset-python-presto-hive.yml index 7c527c96aaf8a..531aeca11367a 100644 --- a/.github/workflows/superset-python-presto-hive.yml +++ b/.github/workflows/superset-python-presto-hive.yml @@ -148,7 +148,6 @@ jobs: apt-get-install pip-upgrade pip install wheel - pip install sasl pip install -r requirements/testing.txt setup-postgres - name: Run celery diff --git a/Dockerfile b/Dockerfile index aa94bdb147200..01f507d1efd64 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ ###################################################################### # Node stage to deal with static asset construction ###################################################################### -ARG PY_VER=3.10.12-slim +ARG PY_VER=3.10.13-slim # if BUILDPLATFORM is null, set it to 'amd64' (or leave as is otherwise). ARG BUILDPLATFORM=${BUILDPLATFORM:-amd64} From 918cde7707129872a6ade3be7aff2f3080237fb0 Mon Sep 17 00:00:00 2001 From: EugeneTorap Date: Fri, 2 Feb 2024 07:54:09 +0300 Subject: [PATCH 06/23] Update python version --- .github/ISSUE_TEMPLATE/bug-report.yml | 1 - .github/workflows/no-op.yml | 4 ++-- .github/workflows/pre-commit.yml | 2 +- scripts/build_docker.py | 8 ++++---- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index 40e5d97f27dfa..33753a691bc8a 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -54,7 +54,6 @@ body: attributes: label: Python version options: - - "3.9" - "3.10" - "3.11" - Not applicable diff --git a/.github/workflows/no-op.yml b/.github/workflows/no-op.yml index 835063640aa96..9671cf832ad81 100644 --- a/.github/workflows/no-op.yml +++ b/.github/workflows/no-op.yml @@ -34,7 +34,7 @@ jobs: pre-commit: strategy: matrix: - python-version: ["3.9"] + python-version: ["3.10"] runs-on: ubuntu-latest steps: - name: No-op for pre-commit @@ -45,7 +45,7 @@ jobs: python-lint: strategy: matrix: - python-version: ["3.9"] + python-version: ["3.10"] runs-on: ubuntu-latest steps: - name: No-op for python-lint diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 3e2c98970b1a4..f332f4b356b89 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -17,7 +17,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 diff --git a/scripts/build_docker.py b/scripts/build_docker.py index de6b8444f8ef8..4e160f1f05b6e 100755 --- a/scripts/build_docker.py +++ b/scripts/build_docker.py @@ -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" def run_cmd(command: str) -> str: @@ -139,9 +139,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" elif build_preset == "websocket": build_target = "" docker_context = "superset-websocket" @@ -200,7 +200,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( From bb2f849a4012d465cff220b87df006bfbf00dbc4 Mon Sep 17 00:00:00 2001 From: EugeneTorap Date: Fri, 2 Feb 2024 08:08:48 +0300 Subject: [PATCH 07/23] Update python version --- .asf.yaml | 4 ++-- .github/workflows/docker-release.yml | 2 +- .github/workflows/docker.yml | 2 +- docs/docs/installation/docker.mdx | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.asf.yaml b/.asf.yaml index 180414f24aa59..d56f29d58b38a 100644 --- a/.asf.yaml +++ b/.asf.yaml @@ -75,8 +75,8 @@ github: - test-sqlite (3.9) - docker-build (dev, linux/amd64) - docker-build (lean, linux/amd64) - - docker-build (py310, linux/arm64) - - docker-build (py310, linux/amd64) + - docker-build (py311, linux/arm64) + - docker-build (py311, linux/amd64) - docker-build (websocket, linux/arm64) - docker-build (websocket, linux/amd64) - docker-build (dockerize, linux/arm64) diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index 0d0770db28d5f..9285719ec2628 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -42,7 +42,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - build_preset: ["dev", "lean", "py310", "websocket", "dockerize"] + build_preset: ["dev", "lean", "py311", "websocket", "dockerize"] platform: ["linux/amd64", "linux/arm64"] exclude: # disabling because slow! no python wheels for arm/py39 and diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index ae54835e0fb73..4bfc62db48492 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - build_preset: ["dev", "lean", "py310", "websocket", "dockerize"] + build_preset: ["dev", "lean", "py311", "websocket", "dockerize"] platform: ["linux/amd64", "linux/arm64"] exclude: # disabling because slow! no python wheels for arm/py39 and diff --git a/docs/docs/installation/docker.mdx b/docs/docs/installation/docker.mdx index fc6ca041235d5..a4f7dd8aff8a6 100644 --- a/docs/docs/installation/docker.mdx +++ b/docs/docs/installation/docker.mdx @@ -18,7 +18,7 @@ Each code version has multiple builds for different purposes, identified by suff - `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 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. From fb9143729e8fd14cb55ba2ed224424b0405b3754 Mon Sep 17 00:00:00 2001 From: EugeneTorap Date: Fri, 2 Feb 2024 08:34:10 +0300 Subject: [PATCH 08/23] Revert changes --- .github/ISSUE_TEMPLATE/bug-report.yml | 1 + .github/workflows/docker_build_push.sh | 0 2 files changed, 1 insertion(+) delete mode 100755 .github/workflows/docker_build_push.sh diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index 33753a691bc8a..40e5d97f27dfa 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -54,6 +54,7 @@ body: attributes: label: Python version options: + - "3.9" - "3.10" - "3.11" - Not applicable diff --git a/.github/workflows/docker_build_push.sh b/.github/workflows/docker_build_push.sh deleted file mode 100755 index e69de29bb2d1d..0000000000000 From f08c5b1e26ab433967e13b4a0461b830f96e0e45 Mon Sep 17 00:00:00 2001 From: EugeneTorap Date: Fri, 2 Feb 2024 08:35:22 +0300 Subject: [PATCH 09/23] Remove exclude for arm64 docker building --- .github/workflows/docker-release.yml | 7 ------- .github/workflows/docker.yml | 7 ------- 2 files changed, 14 deletions(-) diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index 9285719ec2628..e9da666add549 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -44,13 +44,6 @@ jobs: matrix: build_preset: ["dev", "lean", "py311", "websocket", "dockerize"] platform: ["linux/amd64", "linux/arm64"] - exclude: - # disabling because slow! no python wheels for arm/py39 and - # QEMU is slow! - - build_preset: "dev" - platform: "linux/arm64" - - build_preset: "lean" - platform: "linux/arm64" fail-fast: false steps: - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 4bfc62db48492..21ce1a0c70705 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -19,13 +19,6 @@ jobs: matrix: build_preset: ["dev", "lean", "py311", "websocket", "dockerize"] platform: ["linux/amd64", "linux/arm64"] - exclude: - # disabling because slow! no python wheels for arm/py39 and - # QEMU is slow! - - build_preset: "dev" - platform: "linux/arm64" - - build_preset: "lean" - platform: "linux/arm64" fail-fast: false steps: - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" From 8c3c8cf2d5dd062d85125ace0266154e0df0ab3d Mon Sep 17 00:00:00 2001 From: EugeneTorap Date: Thu, 21 Mar 2024 13:49:10 +0300 Subject: [PATCH 10/23] Update python version --- .github/actions/setup-backend/action.yml | 2 +- Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-backend/action.yml b/.github/actions/setup-backend/action.yml index d3624bf531e89..126e6e86305f0 100644 --- a/.github/actions/setup-backend/action.yml +++ b/.github/actions/setup-backend/action.yml @@ -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 diff --git a/Dockerfile b/Dockerfile index 1d2169f2adc13..a1a49fe413897 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ ###################################################################### # Node stage to deal with static asset construction ###################################################################### -ARG PY_VER=3.10.13-slim +ARG PY_VER=3.10-slim-bookworm # if BUILDPLATFORM is null, set it to 'amd64' (or leave as is otherwise). ARG BUILDPLATFORM=${BUILDPLATFORM:-amd64} From 308690f74c025e6cc8038bba569d1f83bd78d70c Mon Sep 17 00:00:00 2001 From: EugeneTorap Date: Thu, 21 Mar 2024 13:51:37 +0300 Subject: [PATCH 11/23] Fix python version --- .github/supersetbot/src/docker.js | 2 +- scripts/build_docker.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/supersetbot/src/docker.js b/.github/supersetbot/src/docker.js index 03eb1a315fea2..e09942d2b9d56 100644 --- a/.github/supersetbot/src/docker.js +++ b/.github/supersetbot/src/docker.js @@ -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 }); diff --git a/scripts/build_docker.py b/scripts/build_docker.py index 085d36190e6b9..fd9416736d21e 100755 --- a/scripts/build_docker.py +++ b/scripts/build_docker.py @@ -25,7 +25,7 @@ REPO = "apache/superset" CACHE_REPO = f"{REPO}-cache" -BASE_PY_IMAGE = "3.10-slim" +BASE_PY_IMAGE = "3.10-slim-bookworm" def run_cmd(command: str, raise_on_failure: bool = True) -> str: From b8371e907290d318a296cb79c6b0dec0de3cc660 Mon Sep 17 00:00:00 2001 From: EugeneTorap Date: Thu, 21 Mar 2024 13:57:39 +0300 Subject: [PATCH 12/23] Update python-ldap to 3.4.4 --- requirements/development.in | 2 +- requirements/development.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements/development.in b/requirements/development.in index abd40746767fd..9bad1212b8e1b 100644 --- a/requirements/development.in +++ b/requirements/development.in @@ -36,7 +36,7 @@ pylint pytest pytest-cov pytest-mock -python-ldap>=3.4.3 +python-ldap>=3.4.4 sqloxide statsd tox diff --git a/requirements/development.txt b/requirements/development.txt index 18da59a79053f..f96d9d4b562fd 100644 --- a/requirements/development.txt +++ b/requirements/development.txt @@ -1,4 +1,4 @@ -# SHA1:3b6a7d105f9d14b449d4232aa368bd6a40d4c7ef +# SHA1:3ba2a85b7f1506a7fd0c2bba84ec741dbbaf8254 # # This file is autogenerated by pip-compile-multi # To update, run: @@ -239,7 +239,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 From 0b5075f8491d728d4602d7b713c0a114092f8215 Mon Sep 17 00:00:00 2001 From: EugeneTorap Date: Thu, 21 Mar 2024 14:11:35 +0300 Subject: [PATCH 13/23] Fix python version --- .github/ISSUE_TEMPLATE/bug-report.yml | 1 - .github/workflows/no-op.yml | 6 +++--- docker-compose-non-dev.yml | 2 +- docker-compose.yml | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index 32198231b9d75..a4766d1649dbc 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -54,7 +54,6 @@ body: attributes: label: Python version options: - - "3.9" - "3.10" - "3.11" - Not applicable diff --git a/.github/workflows/no-op.yml b/.github/workflows/no-op.yml index 8f1c1e56393ec..c06f2d71dbf3c 100644 --- a/.github/workflows/no-op.yml +++ b/.github/workflows/no-op.yml @@ -55,7 +55,7 @@ jobs: test-postgres-hive: strategy: matrix: - python-version: ["3.9"] + python-version: ["3.10"] runs-on: ubuntu-latest steps: - name: No-op for frontend-build @@ -65,7 +65,7 @@ jobs: test-postgres-presto: strategy: matrix: - python-version: ["3.9"] + python-version: ["3.10"] runs-on: ubuntu-latest steps: - name: No-op for frontend-build @@ -75,7 +75,7 @@ jobs: unit-tests: strategy: matrix: - python-version: ["3.9"] + python-version: ["3.10"] runs-on: ubuntu-latest steps: - name: No-op for frontend-build diff --git a/docker-compose-non-dev.yml b/docker-compose-non-dev.yml index b49d070118bcb..f537e26c38c15 100644 --- a/docker-compose-non-dev.yml +++ b/docker-compose-non-dev.yml @@ -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: diff --git a/docker-compose.yml b/docker-compose.yml index 23c040b2f6ec0..9dd0a6ca8f7e9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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: From 4538a7ba84392a1c540a83d4a961d1dcdfc18480 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Thu, 21 Mar 2024 17:08:05 -0700 Subject: [PATCH 14/23] Update action.yml This may work to fix some of the issues you're seeing --- .github/actions/setup-backend/action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/actions/setup-backend/action.yml b/.github/actions/setup-backend/action.yml index 126e6e86305f0..f895f1ce4daaa 100644 --- a/.github/actions/setup-backend/action.yml +++ b/.github/actions/setup-backend/action.yml @@ -22,6 +22,9 @@ runs: with: python-version: ${{ inputs.python-version }} cache: ${{ inputs.cache }} + - name: apt-get deps + shell: bash + run: sudo apt-get install -y libldap2-dev libsasl2-dev - name: Install dependencies run: | pip install --upgrade pip setuptools wheel From 78272650d06e2abce126fc05ac264a6ae775dc0d Mon Sep 17 00:00:00 2001 From: EugeneTorap Date: Fri, 22 Mar 2024 12:34:49 +0300 Subject: [PATCH 15/23] Bump .asf.yaml --- .asf.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.asf.yaml b/.asf.yaml index 4385e2ed02e97..9b2bfae806ada 100644 --- a/.asf.yaml +++ b/.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 From 1ffcc476564a15260eeac73fe8c1f9d1499f07fc Mon Sep 17 00:00:00 2001 From: EugeneTorap Date: Fri, 22 Mar 2024 12:37:52 +0300 Subject: [PATCH 16/23] Revert no-op.yml --- .github/workflows/no-op.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/no-op.yml b/.github/workflows/no-op.yml index c06f2d71dbf3c..1c68c4e1f5d85 100644 --- a/.github/workflows/no-op.yml +++ b/.github/workflows/no-op.yml @@ -34,7 +34,7 @@ jobs: pre-commit: strategy: matrix: - python-version: ["3.10"] + python-version: ["3.9"] runs-on: ubuntu-latest steps: - name: No-op for pre-commit @@ -45,7 +45,7 @@ jobs: python-lint: strategy: matrix: - python-version: ["3.10"] + python-version: ["3.9"] runs-on: ubuntu-latest steps: - name: No-op for python-lint @@ -55,7 +55,7 @@ jobs: test-postgres-hive: strategy: matrix: - python-version: ["3.10"] + python-version: ["3.9"] runs-on: ubuntu-latest steps: - name: No-op for frontend-build @@ -65,7 +65,7 @@ jobs: test-postgres-presto: strategy: matrix: - python-version: ["3.10"] + python-version: ["3.9"] runs-on: ubuntu-latest steps: - name: No-op for frontend-build @@ -75,7 +75,7 @@ jobs: unit-tests: strategy: matrix: - python-version: ["3.10"] + python-version: ["3.9"] runs-on: ubuntu-latest steps: - name: No-op for frontend-build From 2f8be00b855fa56a29c538bd87f5d38faa8857dc Mon Sep 17 00:00:00 2001 From: EugeneTorap Date: Fri, 22 Mar 2024 12:44:35 +0300 Subject: [PATCH 17/23] Add a bunch of no-op checks for Py3.9 --- .github/workflows/no-op.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/no-op.yml b/.github/workflows/no-op.yml index 1c68c4e1f5d85..2dbd82eb384d5 100644 --- a/.github/workflows/no-op.yml +++ b/.github/workflows/no-op.yml @@ -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 From 1706d1dddb7b39ecf7be04f83b82af9a8c1746d9 Mon Sep 17 00:00:00 2001 From: EugeneTorap Date: Fri, 22 Mar 2024 12:50:22 +0300 Subject: [PATCH 18/23] Revert 'python_requires' to "~=3.9" --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 0756836ca7d68..61721cd836d27 100644 --- a/setup.py +++ b/setup.py @@ -208,7 +208,7 @@ def get_git_sha() -> str: "starrocks": ["starrocks>=1.0.0"], "doris": ["pydoris>=1.0.0, <2.0.0"], }, - python_requires="~=3.10", + python_requires="~=3.9", # TODO: change it to "~=3.10" author="Apache Software Foundation", author_email="dev@superset.apache.org", url="https://superset.apache.org/", From 275f12917d95827de4ae34320979dbdacc884adc Mon Sep 17 00:00:00 2001 From: EugeneTorap Date: Fri, 22 Mar 2024 18:44:39 +0300 Subject: [PATCH 19/23] Fix PY 3.11 docker image --- scripts/build_docker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_docker.py b/scripts/build_docker.py index fd9416736d21e..3351e508dfedd 100755 --- a/scripts/build_docker.py +++ b/scripts/build_docker.py @@ -151,7 +151,7 @@ def get_docker_command( build_target = "lean" elif build_preset == "py311": build_target = "lean" - py_ver = "3.11-slim" + py_ver = "3.11-slim-bookworm" elif build_preset == "websocket": build_target = "" docker_context = "superset-websocket" From 73f8a6505dc2e7dc42fee769f08e16cc419b7b3f Mon Sep 17 00:00:00 2001 From: EugeneTorap Date: Fri, 22 Mar 2024 19:37:42 +0300 Subject: [PATCH 20/23] Add an entry on ./UPDATING.md --- UPDATING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/UPDATING.md b/UPDATING.md index b035b963f2d65..2a2b8511f7771 100644 --- a/UPDATING.md +++ b/UPDATING.md @@ -35,6 +35,7 @@ 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): Use Python 3.10 as the new minimum python version to run Superset. ### Breaking Changes From 45e2411fa911a492352487b805214eae9f1ea10f Mon Sep 17 00:00:00 2001 From: EugeneTorap Date: Fri, 29 Mar 2024 13:05:19 +0300 Subject: [PATCH 21/23] Revert "Revert 'python_requires' to "~=3.9"" This reverts commit 1706d1dddb7b39ecf7be04f83b82af9a8c1746d9. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 61721cd836d27..0756836ca7d68 100644 --- a/setup.py +++ b/setup.py @@ -208,7 +208,7 @@ def get_git_sha() -> str: "starrocks": ["starrocks>=1.0.0"], "doris": ["pydoris>=1.0.0, <2.0.0"], }, - python_requires="~=3.9", # TODO: change it to "~=3.10" + python_requires="~=3.10", author="Apache Software Foundation", author_email="dev@superset.apache.org", url="https://superset.apache.org/", From 0651b6b7db77a828ef8403f8a84dceb5b0e73a19 Mon Sep 17 00:00:00 2001 From: EugeneTorap Date: Sat, 30 Mar 2024 12:19:03 +0300 Subject: [PATCH 22/23] Revert "Update action.yml" This reverts commit 4538a7ba84392a1c540a83d4a961d1dcdfc18480. --- .github/actions/setup-backend/action.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/actions/setup-backend/action.yml b/.github/actions/setup-backend/action.yml index 899d5a700b3b1..5f6ba8d1a02f0 100644 --- a/.github/actions/setup-backend/action.yml +++ b/.github/actions/setup-backend/action.yml @@ -22,9 +22,6 @@ runs: with: python-version: ${{ inputs.python-version }} cache: ${{ inputs.cache }} - - name: apt-get deps - shell: bash - run: sudo apt-get install -y libldap2-dev libsasl2-dev - name: Install dependencies run: | sudo apt-get update && sudo apt-get -y install libldap2-dev libsasl2-dev From 13d5df4a6d1c315f7d050c0da8c4e841a450e640 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Tue, 2 Apr 2024 08:36:05 -0700 Subject: [PATCH 23/23] Add python 3.9 support back in setup.py --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 0756836ca7d68..0db1afdb34de6 100644 --- a/setup.py +++ b/setup.py @@ -208,12 +208,13 @@ def get_git_sha() -> str: "starrocks": ["starrocks>=1.0.0"], "doris": ["pydoris>=1.0.0, <2.0.0"], }, - python_requires="~=3.10", + python_requires="~=3.9", author="Apache Software Foundation", author_email="dev@superset.apache.org", url="https://superset.apache.org/", download_url="https://www.apache.org/dist/superset/" + version_string, classifiers=[ + "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", ],