[3.6] bpo-38216, bpo-36274: Allow subclasses to separately override v…#16462
Merged
ned-deily merged 1 commit intopython:3.6from Sep 28, 2019
jaraco:backport-7774d78-3.6
Merged
[3.6] bpo-38216, bpo-36274: Allow subclasses to separately override v…#16462ned-deily merged 1 commit intopython:3.6from jaraco:backport-7774d78-3.6
ned-deily merged 1 commit intopython:3.6from
jaraco:backport-7774d78-3.6
Conversation
…alidation and encoding behavior (GH-16448) * bpo-38216: Allow bypassing input validation * bpo-36274: Also allow the URL encoding to be overridden. * bpo-38216, bpo-36274: Add tests demonstrating a hook for overriding validation, test demonstrating override encoding, and a test to capture expectation of the interface for the URL. * Call with skip_host to avoid tripping on the host checking in the URL. * Remove obsolete comment. * Make _prepare_path_encoding its own attr. This makes overriding just that simpler. Also, don't use the := operator to make backporting easier. * Add a news entry. * _prepare_path_encoding -> _encode_prepared_path() * Once again separate the path validation and request encoding, drastically simplifying the behavior. Drop the guarantee that all processing happens in _prepare_path.. (cherry picked from commit 7774d78) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
ned-deily
approved these changes
Sep 28, 2019
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
…alidation and encoding behavior (GH-16448)
bpo-38216: Allow bypassing input validation
bpo-36274: Also allow the URL encoding to be overridden.
bpo-38216, bpo-36274: Add tests demonstrating a hook for overriding validation, test demonstrating override encoding, and a test to capture expectation of the interface for the URL.
Call with skip_host to avoid tripping on the host checking in the URL.
Remove obsolete comment.
Make _prepare_path_encoding its own attr.
This makes overriding just that simpler.
Also, don't use the := operator to make backporting easier.
Add a news entry.
_prepare_path_encoding -> _encode_prepared_path()
Once again separate the path validation and request encoding, drastically simplifying the behavior. Drop the guarantee that all processing happens in _prepare_path..
(cherry picked from commit 7774d78)
Co-authored-by: Jason R. Coombs jaraco@jaraco.com
https://bugs.python.org/issue38216