diff --git a/.github/workflows/superset-e2e.yml b/.github/workflows/superset-e2e.yml index ab0d61bf3469a..bc47d6a17752f 100644 --- a/.github/workflows/superset-e2e.yml +++ b/.github/workflows/superset-e2e.yml @@ -67,7 +67,7 @@ jobs: if: steps.check.outcome == 'failure' uses: actions/setup-python@v2 with: - python-version: "3.7" + python-version: "3.8" - 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 272b7c91bccb7..a7f83f561ac25 100644 --- a/.github/workflows/superset-helm-lint.yml +++ b/.github/workflows/superset-helm-lint.yml @@ -22,7 +22,7 @@ jobs: - uses: actions/setup-python@v2 with: - python-version: 3.7 + python-version: 3.8 - 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 c006d22424ce8..43ef9e7d2e129 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.7] + python-version: [3.8] env: PYTHONPATH: ${{ github.workspace }} SUPERSET_CONFIG: tests.integration_tests.superset_test_config @@ -77,7 +77,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python-version: [3.7, 3.8] + python-version: [3.8, 3.9] env: PYTHONPATH: ${{ github.workspace }} SUPERSET_CONFIG: tests.integration_tests.superset_test_config @@ -141,7 +141,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python-version: [3.7] + python-version: [3.8] 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 fb365cac1dbf8..9804ef209d755 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.7] + python-version: [3.8] steps: - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" uses: actions/checkout@v2 @@ -50,7 +50,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python-version: [3.7] + python-version: [3.8] steps: - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" uses: actions/checkout@v2 @@ -76,7 +76,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python-version: [3.7] + python-version: [3.8] steps: - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" uses: actions/checkout@v2 diff --git a/.github/workflows/superset-python-unittest.yml b/.github/workflows/superset-python-unittest.yml index 69f96bcb9b779..8a64f092cb997 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.7,3.8] + python-version: [3.8, 3.9] env: PYTHONPATH: ${{ github.workspace }} steps: diff --git a/.github/workflows/superset-translations.yml b/.github/workflows/superset-translations.yml index 029c914cf1fc4..93fe58b62378c 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.7] + python-version: [3.8] steps: - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" uses: actions/checkout@v2 diff --git a/Dockerfile b/Dockerfile index 8244f16a11543..211ea55caad6d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ ###################################################################### # PY stage that simply does a pip install on our requirements ###################################################################### -ARG PY_VER=3.7.9 +ARG PY_VER=3.8.12 FROM python:${PY_VER} AS superset-py RUN mkdir /app \ @@ -73,7 +73,7 @@ RUN cd /app/superset-frontend \ ###################################################################### # Final lean image... ###################################################################### -ARG PY_VER=3.7.9 +ARG PY_VER=3.8.12 FROM python:${PY_VER} AS lean ENV LANG=C.UTF-8 \ @@ -94,7 +94,7 @@ RUN mkdir -p ${PYTHONPATH} \ libpq-dev \ && rm -rf /var/lib/apt/lists/* -COPY --from=superset-py /usr/local/lib/python3.7/site-packages/ /usr/local/lib/python3.7/site-packages/ +COPY --from=superset-py /usr/local/lib/python3.8/site-packages/ /usr/local/lib/python3.8/site-packages/ # Copying site-packages doesn't move the CLIs, so let's copy them one by one COPY --from=superset-py /usr/local/bin/gunicorn /usr/local/bin/celery /usr/local/bin/flask /usr/bin/ COPY --from=superset-node /app/superset/static/assets /app/superset/static/assets diff --git a/Makefile b/Makefile index 7593a282dc3d6..a7066bdccee67 100644 --- a/Makefile +++ b/Makefile @@ -15,8 +15,8 @@ # limitations under the License. # -# Python version installed; we need 3.8 or 3.7 -PYTHON=`command -v python3.8 || command -v python3.7` +# Python version installed; we need 3.7-3.9 +PYTHON=`command -v python3.9 || command -v python3.8 || command -v python3.7` .PHONY: install superset venv pre-commit @@ -62,7 +62,7 @@ update-js: venv: # Create a virtual environment and activate it (recommended) - if ! [ -x "${PYTHON}" ]; then echo "You need Python 3.7 or 3.8 installed"; exit 1; fi + if ! [ -x "${PYTHON}" ]; then echo "You need Python 3.7, 3.8 or 3.9 installed"; exit 1; fi test -d venv || ${PYTHON} -m venv venv # setup a python3 virtualenv . venv/bin/activate diff --git a/RELEASING/Dockerfile.from_local_tarball b/RELEASING/Dockerfile.from_local_tarball index affb4d885dc64..be08d6fb951fc 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.7-buster +FROM python:3.8-buster 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 3194ea53d7c68..5f9bde9c3f9ba 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.7-buster +FROM python:3.8-buster 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 1bbaa30942646..edb9c775694a1 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.7-buster +FROM python:3.8-buster 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 49e3fc3fba64c..3e50eb41a9926 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.7-buster +FROM python:3.8-buster RUN apt-get update -y RUN apt-get install -y jq diff --git a/docs/src/pages/docs/installation/installing_scratch.mdx b/docs/src/pages/docs/installation/installing_scratch.mdx index 2fb1b7a814eaf..7ea1f320202fb 100644 --- a/docs/src/pages/docs/installation/installing_scratch.mdx +++ b/docs/src/pages/docs/installation/installing_scratch.mdx @@ -65,7 +65,7 @@ We don't recommend using the system installed Python. Instead, first install the brew install readline pkg-config libffi openssl mysql postgres ``` -You should install a recent version of Python (Superset uses 3.7.9). We'd recommend using a Python version manager like [pyenv](https://github.com/pyenv/pyenv) (and also [pyenv-virtualenv](https://github.com/pyenv/pyenv-virtualenv)). +You should install a recent version of Python (the official docker image uses 3.8.12). We'd recommend using a Python version manager like [pyenv](https://github.com/pyenv/pyenv) (and also [pyenv-virtualenv](https://github.com/pyenv/pyenv-virtualenv)). Let's also make sure we have the latest version of `pip` and `setuptools`: diff --git a/requirements/base.txt b/requirements/base.txt index cbbc55f7295e8..3d24d52724b5d 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -257,7 +257,7 @@ sqlalchemy==1.3.24 # flask-sqlalchemy # marshmallow-sqlalchemy # sqlalchemy-utils -sqlalchemy-utils==0.36.8 +sqlalchemy-utils==0.37.8 # via # apache-superset # flask-appbuilder diff --git a/requirements/development.in b/requirements/development.in index db2162341dace..d53e0509f54c8 100644 --- a/requirements/development.in +++ b/requirements/development.in @@ -18,7 +18,7 @@ -r base.in flask-cors>=2.0.0 mysqlclient==1.4.2.post1 -pillow>=7.0.0,<8.0.0 +pillow>=8.3.1,<9 pydruid>=0.6.1,<0.7 pyhive[hive]>=0.6.1 psycopg2-binary==2.8.5 diff --git a/requirements/development.txt b/requirements/development.txt index 82133b43a320b..3a62a283865a7 100644 --- a/requirements/development.txt +++ b/requirements/development.txt @@ -1,4 +1,4 @@ -# SHA1:e4f3ea65026a8aec3735d6d9977f89fef4a1a4f9 +# SHA1:dbd3e93a11a36fc6b18d6194ac96ba29bd0ad2a8 # # This file is autogenerated by pip-compile-multi # To update, run: @@ -40,7 +40,7 @@ mysqlclient==1.4.2.post1 # via -r requirements/development.in openpyxl==3.0.7 # via tabulator -pillow==7.2.0 +pillow==8.3.1 # via -r requirements/development.in progress==1.6 # via -r requirements/development.in diff --git a/setup.py b/setup.py index 7baf6480985ca..abf514312db30 100644 --- a/setup.py +++ b/setup.py @@ -106,7 +106,7 @@ def get_git_sha() -> str: "simplejson>=3.15.0", "slackclient==2.5.0", # PINNED! slack changes file upload api in the future versions "sqlalchemy>=1.3.16, <1.4, !=1.3.21", - "sqlalchemy-utils>=0.36.6, <0.37", + "sqlalchemy-utils>=0.37.8, <0.38", "sqlparse==0.3.0", # PINNED! see https://github.com/andialbrecht/sqlparse/issues/562 "tabulate==0.8.9", "typing-extensions>=3.10, <4", # needed to support Literal (3.8) and TypeGuard (3.10) @@ -169,5 +169,6 @@ def get_git_sha() -> str: classifiers=[ "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", ], ) diff --git a/superset/utils/memoized.py b/superset/utils/memoized.py index 916984c9b8c22..153542fbb7b16 100644 --- a/superset/utils/memoized.py +++ b/superset/utils/memoized.py @@ -64,7 +64,9 @@ def __get__( if not self.is_method: self.is_method = True # Support instance methods. - return functools.partial(self.__call__, obj) + func = functools.partial(self.__call__, obj) + func.__func__ = self.func # type: ignore + return func def memoized(