Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Base Quart's default_config on Flask's#378

Open
JamesParrott wants to merge 4 commits into
pallets:main from
JamesParrott:Base_Quarts_default_config_on_Flasks
Open

Base Quart's default_config on Flask's #378
JamesParrott wants to merge 4 commits into
pallets:main from
JamesParrott:Base_Quarts_default_config_on_Flasks

Conversation

@JamesParrott

@JamesParrott JamesParrott commented Nov 14, 2024
edited
Loading

Copy link
Copy Markdown

Fixes #371 without pinning Flask to 3.0.0

  • [x ] Run pre-commit hooks and fix any issues.

A three line change, as per the title:

image

@JamesParrott JamesParrott changed the title (削除) Base quarts default config on flasks (削除ここまで) (追記) Base Quart's default_config on Flask's (追記ここまで) Nov 14, 2024
Comment thread src/quart/app.py Outdated
)
from urllib.parse import quote

import flask.app

Copy link
Copy Markdown
Member

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.

Comment thread src/quart/app.py Outdated

default_config = ImmutableDict(
{
flask.app.Flask.default_config

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@davidism davidism davidism left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Cannot Instantiate Quart object with Flask==3.1.0

AltStyle によって変換されたページ (->オリジナル) /