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.
Deprecate various things I came across while adding typing to the code. These either seem unused or caused issues with typing, or both.
urls.Href
seems to have been replaced bywerkzeug.routing
.utils.detect_utf_encoding
was probably used by Flask, so I'm issuing a deprecation warning just in case someone uses an older Flask with Werkzeug 2.0. This function is part of Python'sjson.loads
now.CombinedMultiDict
andHeaders
both had ahas_key
alias for__contains__
.has_key
has been deprecated since Python 2.Request.disable_data_descriptor
class attribute. There's an old comment about deprecating therequest.data
attribute, but I don't think that should be done.shallow=True
can be used to the same effect.cache_property
, renamed itcache_control_property
to avoid confusion withcached_property
, especially when using IDEs to find names.url_decode_stream
had areturn_iterator
flag that was unused anywhere in the code.HTTPException.wrap
seems to only be used to create theBadRequestKeyError
class. It's more straightforward to create the class manually, and the type system understands it better too.One that I did not remove was the
parse_option_header
multiple
parameter. It's not used anywhere, but it's the majority of the function, and I think it could be refactored differently later.Checklist:
CHANGES.rst
summarizing the change and linking to the issue... versionchanged::
entries in any relevant code docs.pre-commit
hooks and fix any issues.pytest
andtox
, no tests failed.