feat: bump to Python3.9 (#23890)
Co-authored-by: EugeneTorap <evgenykrutpro@gmail.com>
This commit is contained in:
parent
2a2f8a8e0a
commit
e3719a1b07
12
.asf.yaml
12
.asf.yaml
|
|
@ -66,12 +66,12 @@ github:
|
|||
- cypress-matrix (3, chrome)
|
||||
- docker-build
|
||||
- frontend-build
|
||||
# - pre-commit (3.9)
|
||||
# - python-lint (3.9)
|
||||
# - test-mysql (3.9)
|
||||
# - test-postgres (3.9)
|
||||
# - test-postgres (3.10)
|
||||
# - test-sqlite (3.9)
|
||||
- pre-commit (3.9)
|
||||
- python-lint (3.9)
|
||||
- test-mysql (3.9)
|
||||
- test-postgres (3.9)
|
||||
- test-postgres (3.10)
|
||||
- test-sqlite (3.9)
|
||||
|
||||
required_pull_request_reviews:
|
||||
dismiss_stale_reviews: false
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ docker build --target lean \
|
|||
-t "${REPO_NAME}:${SHA}" \
|
||||
-t "${REPO_NAME}:${REFSPEC}" \
|
||||
-t "${REPO_NAME}:${LATEST_TAG}" \
|
||||
--build-arg PY_VER="3.8-slim"\
|
||||
--label "sha=${SHA}" \
|
||||
--label "built_at=$(date)" \
|
||||
--label "target=lean" \
|
||||
|
|
@ -58,16 +57,16 @@ docker build --target lean \
|
|||
.
|
||||
|
||||
#
|
||||
# Build the "lean39" image
|
||||
# Build the "lean310" image
|
||||
#
|
||||
docker build --target lean \
|
||||
-t "${REPO_NAME}:${SHA}-py39" \
|
||||
-t "${REPO_NAME}:${REFSPEC}-py39" \
|
||||
-t "${REPO_NAME}:${LATEST_TAG}-py39" \
|
||||
--build-arg PY_VER="3.9-slim"\
|
||||
-t "${REPO_NAME}:${SHA}-py310" \
|
||||
-t "${REPO_NAME}:${REFSPEC}-py310" \
|
||||
-t "${REPO_NAME}:${LATEST_TAG}-py310" \
|
||||
--build-arg PY_VER="3.10-slim"\
|
||||
--label "sha=${SHA}" \
|
||||
--label "built_at=$(date)" \
|
||||
--label "target=lean39" \
|
||||
--label "target=lean310" \
|
||||
--label "build_actor=${GITHUB_ACTOR}" \
|
||||
.
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ jobs:
|
|||
- name: Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.8"
|
||||
python-version: "3.9"
|
||||
- name: OS dependencies
|
||||
uses: ./.github/actions/cached-dependencies
|
||||
with:
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ jobs:
|
|||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.9]
|
||||
python-version: ["3.9"]
|
||||
env:
|
||||
PYTHONPATH: ${{ github.workspace }}
|
||||
SUPERSET_CONFIG: tests.integration_tests.superset_test_config
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ jobs:
|
|||
if: steps.check.outcome == 'failure'
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.8"
|
||||
python-version: "3.9"
|
||||
- name: OS dependencies
|
||||
if: steps.check.outcome == 'failure'
|
||||
uses: ./.github/actions/cached-dependencies
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ jobs:
|
|||
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.8
|
||||
python-version: "3.9"
|
||||
|
||||
- name: Set up chart-testing
|
||||
uses: ./.github/actions/chart-testing-action
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ jobs:
|
|||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.8]
|
||||
python-version: ["3.9"]
|
||||
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.8, 3.9]
|
||||
python-version: ["3.9", "3.10"]
|
||||
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.8]
|
||||
python-version: ["3.9"]
|
||||
env:
|
||||
PYTHONPATH: ${{ github.workspace }}
|
||||
SUPERSET_CONFIG: tests.integration_tests.superset_test_config
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ jobs:
|
|||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.8]
|
||||
python-version: ["3.9"]
|
||||
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.8]
|
||||
python-version: ["3.9"]
|
||||
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.8]
|
||||
python-version: ["3.9"]
|
||||
steps:
|
||||
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
|
||||
uses: actions/checkout@v3
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ jobs:
|
|||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.8]
|
||||
python-version: ["3.9"]
|
||||
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.8]
|
||||
python-version: ["3.9"]
|
||||
env:
|
||||
PYTHONPATH: ${{ github.workspace }}
|
||||
SUPERSET_CONFIG: tests.integration_tests.superset_test_config
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ jobs:
|
|||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.8, 3.9]
|
||||
python-version: ["3.9", "3.10"]
|
||||
env:
|
||||
PYTHONPATH: ${{ github.workspace }}
|
||||
steps:
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ jobs:
|
|||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.8]
|
||||
python-version: ["3.9"]
|
||||
steps:
|
||||
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
|
||||
uses: actions/checkout@v3
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
######################################################################
|
||||
# Node stage to deal with static asset construction
|
||||
######################################################################
|
||||
ARG PY_VER=3.8.16-slim
|
||||
ARG PY_VER=3.9.16-slim
|
||||
|
||||
# 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.8-3.11
|
||||
PYTHON=`command -v python3.11 || command -v python3.10 || command -v python3.9 || command -v python3.8`
|
||||
# Python version installed; we need 3.9-3.11
|
||||
PYTHON=`command -v python3.11 || command -v python3.10 || command -v python3.9`
|
||||
|
||||
.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.8, 3.9, 3.10 or 3.11 installed"; exit 1; fi
|
||||
if ! [ -x "${PYTHON}" ]; then echo "You need Python 3.9, 3.10 or 3.11 installed"; exit 1; fi
|
||||
test -d venv || ${PYTHON} -m venv venv # setup a python3 virtualenv
|
||||
. venv/bin/activate
|
||||
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ assists people when migrating to a new version.
|
|||
- [21163](https://github.com/apache/superset/pull/21163): The time grain will be decoupled from the time filter column and the time grain control will move below the X-Axis control when `GENERIC_CHART_AXES` feature flags set to `True`. The time grain will be applied on the time column in the column-like controls(x axis, dimensions) instead of the time column in the time section.
|
||||
- [21284](https://github.com/apache/superset/pull/21284): The non-functional `MAX_TABLE_NAMES` config key has been removed.
|
||||
- [21794](https://github.com/apache/superset/pull/21794): Deprecates the undocumented `PRESTO_SPLIT_VIEWS_FROM_TABLES` feature flag. Now for Presto, like other engines, only physical tables are treated as tables.
|
||||
- [23890](https://github.com/apache/superset/pull/23890): Removes Python 3.8 support.
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
|
|
|
|||
|
|
@ -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.8 or 3.9, then proceed with:
|
||||
Ensure that you are using Python version 3.9 or 3.10, then proceed with:
|
||||
|
||||
```bash
|
||||
# Create a virtual environment and activate it (recommended)
|
||||
|
|
|
|||
|
|
@ -122,8 +122,6 @@ geographiclib==1.52
|
|||
# via geopy
|
||||
geopy==2.2.0
|
||||
# via apache-superset
|
||||
graphlib-backport==1.0.3
|
||||
# via apache-superset
|
||||
greenlet==2.0.2
|
||||
# via sqlalchemy
|
||||
gunicorn==20.1.0
|
||||
|
|
|
|||
|
|
@ -19,16 +19,16 @@ import logging
|
|||
import re
|
||||
import time
|
||||
from collections import defaultdict
|
||||
from graphlib import TopologicalSorter
|
||||
from inspect import getsource
|
||||
from pathlib import Path
|
||||
from types import ModuleType
|
||||
from typing import Dict, List, Set, Type
|
||||
from typing import Any, Dict, List, Set, Type
|
||||
|
||||
import click
|
||||
from flask import current_app
|
||||
from flask_appbuilder import Model
|
||||
from flask_migrate import downgrade, upgrade
|
||||
from graphlib import TopologicalSorter # pylint: disable=wrong-import-order
|
||||
from progress.bar import ChargingBar
|
||||
from sqlalchemy import create_engine, inspect
|
||||
from sqlalchemy.ext.automap import automap_base
|
||||
|
|
@ -120,7 +120,7 @@ def find_models(module: ModuleType) -> List[Type[Model]]:
|
|||
# sort topologically so we can create entities in order and
|
||||
# maintain relationships (eg, create a database before creating
|
||||
# a slice)
|
||||
sorter = TopologicalSorter()
|
||||
sorter: TopologicalSorter[Any] = TopologicalSorter()
|
||||
for model in models:
|
||||
inspector = inspect(model)
|
||||
dependent_tables: List[str] = []
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ combine_as_imports = true
|
|||
include_trailing_comma = true
|
||||
line_length = 88
|
||||
known_first_party = superset
|
||||
known_third_party =alembic,apispec,backoff,cachelib,celery,click,colorama,cron_descriptor,croniter,cryptography,dateutil,deprecation,flask,flask_appbuilder,flask_babel,flask_caching,flask_compress,flask_jwt_extended,flask_login,flask_migrate,flask_sqlalchemy,flask_talisman,flask_testing,flask_wtf,freezegun,geohash,geopy,graphlib,holidays,humanize,isodate,jinja2,jwt,markdown,markupsafe,marshmallow,marshmallow_enum,msgpack,nh3,numpy,pandas,parameterized,parsedatetime,pgsanity,pkg_resources,polyline,prison,progress,pyarrow,sqlalchemy_bigquery,pyhive,pyparsing,pytest,pytest_mock,pytz,redis,requests,selenium,setuptools,simplejson,slack,sqlalchemy,sqlalchemy_utils,sqlparse,typing_extensions,urllib3,werkzeug,wtforms,wtforms_json,yaml
|
||||
known_third_party =alembic,apispec,backoff,cachelib,celery,click,colorama,cron_descriptor,croniter,cryptography,dateutil,deprecation,flask,flask_appbuilder,flask_babel,flask_caching,flask_compress,flask_jwt_extended,flask_login,flask_migrate,flask_sqlalchemy,flask_talisman,flask_testing,flask_wtf,freezegun,geohash,geopy,holidays,humanize,isodate,jinja2,jwt,markdown,markupsafe,marshmallow,marshmallow_enum,msgpack,nh3,numpy,pandas,parameterized,parsedatetime,pgsanity,pkg_resources,polyline,prison,progress,pyarrow,sqlalchemy_bigquery,pyhive,pyparsing,pytest,pytest_mock,pytz,redis,requests,selenium,setuptools,simplejson,slack,sqlalchemy,sqlalchemy_utils,sqlparse,typing_extensions,urllib3,werkzeug,wtforms,wtforms_json,yaml
|
||||
multi_line_output = 3
|
||||
order_by_type = false
|
||||
|
||||
|
|
|
|||
4
setup.py
4
setup.py
|
|
@ -92,7 +92,6 @@ setup(
|
|||
"flask-wtf>=1.0.1, <1.1",
|
||||
"func_timeout",
|
||||
"geopy",
|
||||
"graphlib-backport",
|
||||
"gunicorn>=20.1.0; sys_platform != 'win32'",
|
||||
"hashids>=1.3.1, <2",
|
||||
"holidays>=0.23, <0.24",
|
||||
|
|
@ -186,13 +185,12 @@ setup(
|
|||
"vertica": ["sqlalchemy-vertica-python>=0.5.9, < 0.6"],
|
||||
"netezza": ["nzalchemy>=11.0.2"],
|
||||
},
|
||||
python_requires="~=3.8",
|
||||
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.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
|
|
|||
Loading…
Reference in New Issue