diff --git a/.travis.yml b/.travis.yml index 180db344c0b1a..247f9e4058714 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 eec22c23153f5..48fa027d040fe 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 69fc0a4046dc8..04c1934df0f4b 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 c5dba151a9be3..6cbe7a6051a52 100644 --- a/setup.py +++ b/setup.py @@ -8,9 +8,13 @@ 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 @@ def get_git_sha(): '/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 039075a8af8a3..c1fb32a4e2411 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