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

Add config.update support for setters #2354

Merged
merged 4 commits into from Jan 6, 2022
Merged

Add config.update support for setters #2354

merged 4 commits into from Jan 6, 2022

Conversation

ahopkins
Copy link
Member

@ahopkins ahopkins commented Jan 4, 2022

This is specifically to target this style of setting when there is a descriptor pattern with setters.

app.config.update({'FALLBACK_ERROR_FORMAT': 'text'})

Copy link
Member

@prryplatypus prryplatypus left a comment

Choose a reason for hiding this comment

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

Do we want to clean up the __setattr__ method, since all the logic it has is now also performed in update, which it calls after running the checks itself?

sanic/config.py Show resolved Hide resolved
tests/test_config.py Outdated Show resolved Hide resolved
@ahopkins ahopkins requested review from prryplatypus and a team January 5, 2022 23:12
prryplatypus
prryplatypus previously approved these changes Jan 5, 2022
@ahopkins ahopkins merged commit 34d1dee into 21.12LTS Jan 6, 2022
@ahopkins ahopkins deleted the config-update branch January 6, 2022 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants