-
-
Notifications
You must be signed in to change notification settings - Fork 168
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
Base Quart's default_config on Flask's #378
base: main
Are you sure you want to change the base?
Base Quart's default_config on Flask's #378
Conversation
…ult_config, then override them
src/quart/app.py
Outdated
@@ -26,6 +26,7 @@ | |||
) | |||
from urllib.parse import quote | |||
|
|||
import flask.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use from flask import Flask
here. Long term, maybe DEFAULT_CONFIG
should be defined outside Flask
so it can be shared more easily.
src/quart/app.py
Outdated
@@ -235,7 +236,8 @@ class Quart(App): | |||
websocket_class = Websocket | |||
|
|||
default_config = ImmutableDict( | |||
{ | |||
flask.app.Flask.default_config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably clean up config keys from here that aren't used anymore or don't change the default.
Thanks for the review. I've made the first change to the import. I case sensitive searched for "Flask" and that string only shows up in comments, so from this basic search at least, I couldn't find a clash in the namespace, so I assume the addition to the namespace is fine. I don't object to cleaning up the keys, but I'd prefer if someone else took that job on. The first time I looked at Quart's source code was Tuesday this week, so I don't yet have enough knowledge of Flask and Quart to say what all the config items do, and which can safely be removed. |
Fixes #371 without pinning Flask to 3.0.0
pre-commit
hooks and fix any issues.A three line change, as per the title: