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: Support Python 3.11 #22217

Merged
merged 5 commits into from
Dec 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ Commits to `master` trigger a rebuild and redeploy of the documentation site. Su
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, 3.9 or 3.10, then proceed with:
Ensure that you are using Python version 3.8, 3.9, 3.10 or 3.11, then proceed with:

```bash
# Create a virtual environment and activate it (recommended)
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.8-3.10
PYTHON=`command -v python3.10 || command -v python3.9 || command -v python3.8`
# 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`

.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.8, 3.9 or 3.10 installed"; exit 1; fi
if ! [ -x "${PYTHON}" ]; then echo "You need Python 3.8, 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

Expand Down
8 changes: 4 additions & 4 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ cachelib==0.4.1
# via apache-superset
celery==5.2.2
# via apache-superset
cffi==1.14.6
cffi==1.15.1
# via cryptography
click==8.0.4
# via
Expand Down Expand Up @@ -156,7 +156,7 @@ marshmallow-sqlalchemy==0.23.1
# via flask-appbuilder
msgpack==1.0.2
# via apache-superset
numpy==1.22.1
numpy==1.23.5
# via
# apache-superset
# pandas
Expand All @@ -165,7 +165,7 @@ packaging==21.3
# via
# bleach
# deprecation
pandas==1.4.4
pandas==1.5.2
# via apache-superset
parsedatetime==2.6
# via apache-superset
Expand All @@ -177,7 +177,7 @@ prison==0.2.1
# via flask-appbuilder
prompt-toolkit==3.0.28
# via click-repl
pyarrow==6.0.1
pyarrow==10.0.1
# via apache-superset
pycparser==2.20
# via cffi
Expand Down
2 changes: 1 addition & 1 deletion requirements/development.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ pillow==9.1.1
# via apache-superset
progress==1.6
# via -r requirements/development.in
psycopg2-binary==2.9.1
psycopg2-binary==2.9.5
# via apache-superset
ptyprocess==0.7.0
# via pexpect
Expand Down
2 changes: 1 addition & 1 deletion requirements/docker.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ gevent==21.8.0
# via -r requirements/docker.in
greenlet==1.1.3.post0
# via gevent
psycopg2-binary==2.9.1
psycopg2-binary==2.9.5
# via apache-superset
zope-event==4.5.0
# via gevent
Expand Down
23 changes: 13 additions & 10 deletions requirements/testing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ cachetools==5.2.0
# via google-auth
coverage==5.5
# via pytest-cov
db-dtypes @ git+https://git@github.com/googleapis/python-db-dtypes-pandas.git@388e082a47d9515a14e20ffd87705c71712087ab
# via
# apache-superset
# pandas-gbq
docker==5.0.0
# via -r requirements/testing.in
flask-testing==0.8.1
Expand All @@ -29,15 +33,16 @@ google-api-core[grpc]==2.11.0
# google-cloud-bigquery
# google-cloud-bigquery-storage
# google-cloud-core
# pandas-gbq
# sqlalchemy-bigquery
google-auth==2.14.1
# via
# google-api-core
# google-auth-oauthlib
# google-cloud-core
# pandas-gbq
# sqlalchemy-bigquery
# pydata-google-auth
# sqlalchemy-bigquery
google-auth-oauthlib==0.7.1
# via
# pandas-gbq
Expand All @@ -48,7 +53,10 @@ google-cloud-bigquery[bqstorage,pandas]==3.4.0
# pandas-gbq
# sqlalchemy-bigquery
google-cloud-bigquery-storage==2.16.2
# via google-cloud-bigquery
# via
# google-cloud-bigquery
# pandas-gbq
# sqlalchemy-bigquery
google-cloud-core==2.3.2
# via google-cloud-bigquery
google-crc32c==1.5.0
Expand All @@ -72,12 +80,8 @@ isort==5.9.3
# via pylint
lazy-object-proxy==1.6.0
# via astroid
libcst==0.4.9
# via google-cloud-bigquery-storage
mccabe==0.6.1
# via pylint
mypy-extensions==0.4.3
# via typing-inspect
oauthlib==3.2.2
# via requests-oauthlib
openapi-schema-validator==0.1.5
Expand All @@ -96,6 +100,7 @@ protobuf==4.21.10
# via
# google-api-core
# google-cloud-bigquery
# google-cloud-bigquery-storage
# googleapis-common-protos
# grpcio-status
# proto-plus
Expand All @@ -105,8 +110,6 @@ pyasn1==0.4.8
# rsa
pyasn1-modules==0.2.8
# via google-auth
sqlalchemy-bigquery==1.5.0
# via apache-superset
pydata-google-auth==1.4.0
# via pandas-gbq
pyfakefs==4.5.6
Expand All @@ -128,12 +131,12 @@ requests-oauthlib==1.3.1
# via google-auth-oauthlib
rsa==4.9
# via google-auth
sqlalchemy-bigquery==1.5.0
# via apache-superset
statsd==3.3.0
# via -r requirements/testing.in
trino==0.319.0
# via apache-superset
typing-inspect==0.7.1
# via libcst
websocket-client==1.2.0
# via docker
wrapt==1.12.1
Expand Down
10 changes: 6 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,16 @@ def get_git_sha() -> str:
"isodate",
"markdown>=3.0",
"msgpack>=1.0.0, <1.1",
"numpy==1.22.1",
"pandas>=1.4.4, <1.5",
"numpy==1.23.5",
"pandas>=1.5.2, <1.6",
"parsedatetime",
"pgsanity",
"polyline",
"pyparsing>=3.0.6, <4",
"python-dateutil",
"python-dotenv",
"python-geohash",
"pyarrow>=6.0.1, <7",
"pyarrow>=10.0.1, <11",
"pyyaml>=5.4",
"PyJWT>=2.4.0, <3.0",
"redis",
Expand All @@ -126,6 +126,7 @@ def get_git_sha() -> str:
"athena": ["pyathena[pandas]>=2, <3"],
"aurora-data-api": ["preset-sqlalchemy-aurora-data-api>=0.2.8,<0.3"],
"bigquery": [
"db-dtypes @ git+https://git@github.com/googleapis/python-db-dtypes-pandas.git@388e082a47d9515a14e20ffd87705c71712087ab#egg=db-dtypes",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In a hurry I see 😆

"pandas-gbq>=0.18.1",
"sqlalchemy-bigquery>=1.5.0",
"google-cloud-bigquery>=3.4.0",
Expand Down Expand Up @@ -159,7 +160,7 @@ def get_git_sha() -> str:
"mysql": ["mysqlclient>=2.1.0, <3"],
"oracle": ["cx-Oracle>8.0.0, <8.1"],
"pinot": ["pinotdb>=0.3.3, <0.4"],
"postgres": ["psycopg2-binary==2.9.1"],
"postgres": ["psycopg2-binary==2.9.5"],
"presto": ["pyhive[presto]>=0.6.5"],
"trino": ["trino>=0.319.0"],
"prophet": ["prophet>=1.0.1, <1.1", "pystan<3.0"],
Expand All @@ -184,5 +185,6 @@ def get_git_sha() -> str:
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
],
)