This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new 160e477 Deprecate support for Python < 3.6 (#5985)
160e477 is described below
commit 160e47720cdfbe69e0cc8c0ecffc63b7c5ad0b72
Author: Maxime Beauchemin <[email protected]>
AuthorDate: Fri Oct 5 13:44:45 2018 -0400
Deprecate support for Python < 3.6 (#5985)
* Deprecate support for Python < 3.6
This is a first step, beyond this we can:
* remove all from future imports
* remove 'six' lib as a dependency
* start using f-strings
* enjoy ourselves
* fix tox
* Rebasing
* fix
---
.travis.yml | 15 ++-------------
UPDATING.md | 3 +++
docs/installation.rst | 7 ++++---
setup.py | 6 ++++--
tox.ini | 6 +++---
5 files changed, 16 insertions(+), 21 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 180db34..247f9e4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -16,16 +16,8 @@ jobs:
before_install:
- nvm install 8.9
- language: python
- python: 2.7
- env: TOXENV=flake8
- - language: python
- python: 2.7
- env: TOXENV=py27-sqlite
- services:
- - redis-server
- - language: python
- python: 2.7
- env: TOXENV=py27-mysql
+ python: 3.6
+ env: TOXENV=py36-mysql
services:
- mysql
- redis-server
@@ -33,9 +25,6 @@ jobs:
- mysql -u root -e "DROP DATABASE IF EXISTS superset; CREATE DATABASE
superset DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci"
- mysql -u root -e "CREATE USER 'mysqluser'@'localhost' IDENTIFIED BY
'mysqluserpassword';"
- mysql -u root -e "GRANT ALL ON superset.* TO
'mysqluser'@'localhost';"
- - language: python
- python: 2.7
- env: TOXENV=pylint
- language: node_js
node_js: 8.9
cache:
diff --git a/UPDATING.md b/UPDATING.md
index eec22c2..48fa027 100644
--- a/UPDATING.md
+++ b/UPDATING.md
@@ -4,6 +4,9 @@ This file documents any backwards-incompatible changes in
Superset and
assists people when migrating to a new version.
## Superset 0.28.0
+* Support for Python 2 is deprecated, we only support >=3.6 from
+ `0.28.0` onwards
+
* Superset 0.28 deprecates the previous dashboard layout. While 0.27
offered a migration workflow to users and allowed them to validate and
publish their migrated dashboards individually, 0.28 forces
diff --git a/docs/installation.rst b/docs/installation.rst
index 69fc0a4..04c1934 100644
--- a/docs/installation.rst
+++ b/docs/installation.rst
@@ -4,9 +4,10 @@ Installation & Configuration
Getting Started
---------------
-Superset is currently tested against Python ``2.7`` and Python ``3.6``.
-Python 3.6 is preferred. Support for Python ``<=3.6`` is planned to get
-phased out.
+Superset has deprecated support for Python ``2.*`` and supports
+only ``~=3.6`` to take advantage of the newer Python features and reduce
+the burden of supporting previous versions. We run our test suite
+against ``3.6``, but running on ``3.7`` **should** work as well.
Cloud-native!
-------------
diff --git a/setup.py b/setup.py
index c5dba15..6cbe7a6 100644
--- a/setup.py
+++ b/setup.py
@@ -8,9 +8,13 @@ import io
import json
import os
import subprocess
+import sys
from setuptools import find_packages, setup
+if sys.version_info < (3, 6):
+ sys.exit('Sorry, Python < 3.6 is not supported')
+
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
PACKAGE_DIR = os.path.join(BASE_DIR, 'superset', 'static', 'assets')
PACKAGE_FILE = os.path.join(PACKAGE_DIR, 'package.json')
@@ -109,8 +113,6 @@ setup(
'/apache/incubator-superset/tarball/' + version_string
),
classifiers=[
- 'Programming Language :: Python :: 2.7',
- 'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
)
diff --git a/tox.ini b/tox.ini
index 039075a..c1fb32a 100644
--- a/tox.ini
+++ b/tox.ini
@@ -38,10 +38,10 @@ setenv =
PYTHONPATH = {toxinidir}
SUPERSET_CONFIG = tests.superset_test_config
SUPERSET_HOME = {envtmpdir}
- py27-mysql: SUPERSET__SQLALCHEMY_DATABASE_URI =
mysql://mysqluser:mysqluserpassword@localhost/superset?charset=utf8
+ py36-mysql: SUPERSET__SQLALCHEMY_DATABASE_URI =
mysql://mysqluser:mysqluserpassword@localhost/superset?charset=utf8
py36-mysql: SUPERSET__SQLALCHEMY_DATABASE_URI =
mysql://mysqluser:mysqluserpassword@localhost/superset
- py{27,36}-postgres: SUPERSET__SQLALCHEMY_DATABASE_URI =
postgresql+psycopg2://postgresuser:pguserpassword@localhost/superset
- py{27,36}-sqlite: SUPERSET__SQLALCHEMY_DATABASE_URI =
sqlite:////{envtmpdir}/superset.db
+ py36-postgres: SUPERSET__SQLALCHEMY_DATABASE_URI =
postgresql+psycopg2://postgresuser:pguserpassword@localhost/superset
+ py36-sqlite: SUPERSET__SQLALCHEMY_DATABASE_URI =
sqlite:////{envtmpdir}/superset.db
whitelist_externals =
npm