deprecate more #2085
Merged
Merged
Conversation
Check shallow in stream only, everything else reads from there.
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.
Deprecate various things I came across while adding typing to the code. These either seem unused or caused issues with typing, or both.
urls.Hrefseems to have been replaced bywerkzeug.routing.utils.detect_utf_encodingwas 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.loadsnow.CombinedMultiDictandHeadersboth had ahas_keyalias for__contains__.has_keyhas been deprecated since Python 2.Request.disable_data_descriptorclass attribute. There's an old comment about deprecating therequest.dataattribute, but I don't think that should be done.shallow=Truecan be used to the same effect.cache_property, renamed itcache_control_propertyto avoid confusion withcached_property, especially when using IDEs to find names.url_decode_streamhad areturn_iteratorflag that was unused anywhere in the code.HTTPException.wrapseems to only be used to create theBadRequestKeyErrorclass. 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_headermultipleparameter. It's not used anywhere, but it's the majority of the function, and I think it could be refactored differently later.Checklist:
CHANGES.rstsummarizing the change and linking to the issue... versionchanged::entries in any relevant code docs.pre-commithooks and fix any issues.pytestandtox, no tests failed.