Conversation
deprecate some unused parameters and behaviors deprecate passing bytes handle quoting empty string dumping options skips None values unquote inline if calling the function would do some redundant work parse dict handles values with charsets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
parse_list_headerusesurllib.request.parse_http_list, which already unquotes and removes slash escapes.parse_dict_headerand a few other places can remove innerkey="value"quotes inline, without having to callunquote_header_value.quote_header_valuequotes the empty string, since an empty value isn't a valid token on its own.quote_header_valueextra_charsparameter is deprecated, it wasn't used anywhere and doesn't seem necessary for any HTTP header.quote_header_valueandparse_dict_headeris deprecated.dump_options_headerskipsNonevalues instead of writing a barekey;. While bare keys are useful for headers that usedump_header, they're not valid invalue; key=valueparameters.if value[-1] == "*"indump_headeranddump_options_header.dump_headerallow_tokenparameter is deprecated.quote_header_valuestill has the parameter, mainly for theDigestauth scheme.parse_dict_headersupportskey*=UTF-8''valueitems the same wayparse_options_headerdoes.