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: Deprecating ENABLE_FLASK_COMPRESS #10233

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: 2 additions & 0 deletions UPDATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Copy link
Member

@bkyryliuk bkyryliuk Jul 2, 2020

Choose a reason for hiding this comment

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

maybe add COMPRESS_REGISTER to the config.py
I tend to use the config.py as a documentation for the available configuration options.
and add the link in the comments: https://github.com/colour-science/flask-compress

Copy link
Member Author

Choose a reason for hiding this comment

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

@bkyryliuk historically config.py hasn't enumerated all the various Flask configs but rather only defines those which differ from the defaults.


Flask-AppBuilder Permissions
----------------------------
Expand Down
3 changes: 1 addition & 2 deletions superset/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,8 +588,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"])
Expand Down
4 changes: 0 additions & 4 deletions superset/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -731,10 +731,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

Expand Down