Extract utility functions from wsgi.py#2415
Merged
Merged
Conversation
pgjones
approved these changes
May 9, 2022
This is to make these functions available to non-WSGI uses.
81cddbe to
c46ecbb
Compare
dairiki
added a commit
to dairiki/lektor
that referenced
this pull request
Jul 24, 2022
Werkzeug 2.2.0 has deprecated pop_path_info. (See pallets/werkzeug#2415.)
dairiki
added a commit
to lektor/lektor
that referenced
this pull request
Jul 24, 2022
* Fix for werkzeug 2.2.0 The `any` route converter has apparently stopped working correctly if one of the choices is the empty string. * Use shift_path_info from wsgiref instead of werkzeug's pop_path_info Pop_path_info has been deprecated. (See pallets/werkzeug#2415.)
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.
This is a step towards supporting ASGI. Utility functions in the top-level wsgi.py module are extracted into the sansio/utils.py module.
The following functions were extracted:
The following functions were ignored:
get_input_stream -- The input stream is closely tied to WSGI
pop_path_info -- This replicates functionality from wsgiref for some reason
peek_path_info -- This replicates functionality from wsgiref for some reason
wrap_file -- This is specific to WSG
fixes refactor WSGI assumptions out of
http.pyandwsgi.pyfunctions #2408Checklist:
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.