From 94ada9d971e16e62b7951f1c6bc97dabfda04fd0 Mon Sep 17 00:00:00 2001 From: John Bodley Date: Thu, 2 Jul 2020 10:59:16 -0700 Subject: [PATCH] chore: Deprecating ENABLE_FLASK_COMPRESS --- UPDATING.md | 2 ++ docs/installation.rst | 2 +- superset/app.py | 3 +-- superset/config.py | 4 ---- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/UPDATING.md b/UPDATING.md index 3810cda0e9b60..280570b77012b 100644 --- a/UPDATING.md +++ b/UPDATING.md @@ -23,6 +23,8 @@ assists people when migrating to a new version. ## Next +* [10233](https://github.com/apache/incubator-superset/pull/10233): a change which deprecates the `ENABLE_FLASK_COMPRESS` config option in favor of the Flask-Compress `COMPRESS_REGISTER` config option which serves the same purpose. + * [10130](https://github.com/apache/incubator-superset/pull/10130): a change which deprecates the `dbs.perm` column in favor of SQLAlchemy [hybird attributes](https://docs.sqlalchemy.org/en/13/orm/extensions/hybrid.html). * [10034](https://github.com/apache/incubator-superset/pull/10034): a change which deprecates the public security manager `assert_datasource_permission`, `assert_query_context_permission`, `assert_viz_permission`, and `rejected_tables` methods with the `raise_for_access` method which also handles assertion logic for SQL tables. diff --git a/docs/installation.rst b/docs/installation.rst index 90ddb319cabe3..623c4ef168126 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -228,7 +228,7 @@ Note that the development web server (`superset run` or `flask run`) is not intended for production use. If not using gunicorn, you may want to disable the use of flask-compress -by setting `ENABLE_FLASK_COMPRESS = False` in your `superset_config.py` +by setting `COMPRESS_REGISTER = False` in your `superset_config.py` Flask-AppBuilder Permissions ---------------------------- diff --git a/superset/app.py b/superset/app.py index 7dc7aec5f4250..8752f1a915337 100644 --- a/superset/app.py +++ b/superset/app.py @@ -563,8 +563,7 @@ def __call__( ) # Flask-Compress - if self.config["ENABLE_FLASK_COMPRESS"]: - Compress(self.flask_app) + Compress(self.flask_app) if self.config["TALISMAN_ENABLED"]: talisman.init_app(self.flask_app, **self.config["TALISMAN_CONFIG"]) diff --git a/superset/config.py b/superset/config.py index 5ef169cbc4c1d..ed11ae23c1a6d 100644 --- a/superset/config.py +++ b/superset/config.py @@ -730,10 +730,6 @@ class CeleryConfig: # pylint: disable=too-few-public-methods # return f"-- [SQL LAB] {username} {dttm}\n{sql}" SQL_QUERY_MUTATOR = None -# When not using gunicorn, (nginx for instance), you may want to disable -# using flask-compress -ENABLE_FLASK_COMPRESS = True - # Enable / disable scheduled email reports ENABLE_SCHEDULED_EMAIL_REPORTS = False