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

fix: drop response.charset because charset deprecated #206

Merged

Conversation

miettal
Copy link
Contributor

@miettal miettal commented Aug 21, 2023

next release of Werkzeug will drop response.charset.

DeprecationWarning: The 'charset' attribute is deprecated and will not be used in Werkzeug 2.4. Text in body and cookie data will always use UTF-8.

Copy link
Member

@jeffwidman jeffwidman left a comment

Choose a reason for hiding this comment

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

Thanks.

I took a quick peek at upstream to see if this has any backwards-breaking issues whereby we'd need to check the werkzeug version, but from my reading it looks it should be fine most of the time.

Also, this was deprecated back in April's 2.3.0 release and then removed in the recent 3.0.0 release, so I suspect most of our userbase will have already migrated to those versions.

More context:

@jeffwidman jeffwidman merged commit 9571d06 into pallets-eco:master Oct 13, 2023
amCap1712 added a commit to amCap1712/flask-debugtoolbar that referenced this pull request Oct 30, 2023
pallets-eco#206 fixed this partially but one instance slipped through.
werkzueg is using utf-8 now for most places, encode the response to that
encoding always without checking for response.charset.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants