Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[3.5] bpo-38216, bpo-36274: Allow subclasses to separately override validation and encoding behavior (GH-16448)#16475

Merged
larryhastings merged 3 commits into
python:3.5python/cpython:3.5from
jaraco:backport-7774d78-3.5Copy head branch name to clipboard
Oct 8, 2019
Merged

[3.5] bpo-38216, bpo-36274: Allow subclasses to separately override validation and encoding behavior (GH-16448)#16475
larryhastings merged 3 commits into
python:3.5python/cpython:3.5from
jaraco:backport-7774d78-3.5Copy head branch name to clipboard

Conversation

@jaraco

@jaraco jaraco commented Sep 29, 2019

Copy link
Copy Markdown
Member
  • 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

…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>
@jaraco

jaraco commented Sep 29, 2019

Copy link
Copy Markdown
Member Author

The remaining test failures in CI seem to be spurious or otherwise unrelated to this PR.

@larryhastings larryhastings merged commit 2784e78 into python:3.5 Oct 8, 2019
@bedevere-bot

Copy link
Copy Markdown

@larryhastings: Please replace # with GH- in the commit message next time. Thanks!

@larryhastings

Copy link
Copy Markdown
Contributor

Thanks for the 3.5 love!

@jaraco jaraco deleted the backport-7774d78-3.5 branch December 10, 2019 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.