This is an automated email from the ASF dual-hosted git repository.

johnbodley 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 774c23a  chore: Deprecating ENABLE_FLASK_COMPRESS (#10233)
774c23a is described below

commit 774c23a6f1b31c8b951404b0fec4b4203ae76633
Author: John Bodley <4567245+john-bod...@users.noreply.github.com>
AuthorDate: Sat Jul 4 12:46:34 2020 -0700

    chore: Deprecating ENABLE_FLASK_COMPRESS (#10233)
    
    Co-authored-by: John Bodley <john.bod...@airbnb.com>
---
 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 8eccc80..deae935 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.
+
 * [10222](https://github.com/apache/incubator-superset/pull/10222): a change 
which changes how payloads are cached. Previous cached objects cannot be 
decoded and thus will be reloaded from source.
 
 * [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).
diff --git a/docs/installation.rst b/docs/installation.rst
index 90ddb31..623c4ef 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 c047a28..9dbc5cc 100644
--- a/superset/app.py
+++ b/superset/app.py
@@ -588,8 +588,7 @@ class SupersetAppInitializer:
             )
 
         # 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 89b813f..3e742c2 100644
--- a/superset/config.py
+++ b/superset/config.py
@@ -731,10 +731,6 @@ DB_CONNECTION_MUTATOR = None
 #        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
 

Reply via email to