Staging
v0.5.1
https://github.com/python/cpython
Revision f5b1abbb3b0083381925dcd5898ae6d019224826 authored by Jason R. Coombs on 08 October 2019, 02:00:02 UTC, committed by Benjamin Peterson on 08 October 2019, 02:00:01 UTC
Backporting this change, I observe a couple of things:

1. The _encode_request call is no longer meaningful because the request construction will implicitly encode the request using the default encoding when the format string is used (request = '%s %s %s'...). In order to keep the code as consistent as possible, I decided to include the call as a pass-through. I'd be just as happy to remove it entirely, but I'll leave that up to the reviewer to decide. It's okay that this functionality is disabled on Python 2 because this functionality was mainly around bpo-36274, which was mainly a concern with the transition to Python 3.
2. Because _encode_request is no longer meaningful, neither is the test for it, so I've removed that test. Therefore, the meaningful part of this test is that for bpo-38216, adding a (underscore-protected) hook to customize/disable validation.

(cherry picked from commit 7774d7831e8809795c64ce27f7df52674581d298)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
1 parent e7e58fe
History
Tip revision: f5b1abbb3b0083381925dcd5898ae6d019224826 authored by Jason R. Coombs on 08 October 2019, 02:00:02 UTC
[2.7] bpo-38216, bpo-36274: Allow subclasses to separately override validation and encoding behavior (GH-16476)
Tip revision: f5b1abb
File Mode Size
stringlib
abstract.c -rw-r--r-- 81.4 KB
boolobject.c -rw-r--r-- 7.1 KB
bufferobject.c -rw-r--r-- 24.4 KB
bytearrayobject.c -rw-r--r-- 88.6 KB
bytes_methods.c -rw-r--r-- 9.5 KB
capsule.c -rw-r--r-- 6.9 KB
cellobject.c -rw-r--r-- 4.0 KB
classobject.c -rw-r--r-- 78.8 KB
cobject.c -rw-r--r-- 4.2 KB
codeobject.c -rw-r--r-- 23.3 KB
complexobject.c -rw-r--r-- 37.5 KB
descrobject.c -rw-r--r-- 47.3 KB
dictnotes.txt -rw-r--r-- 11.9 KB
dictobject.c -rw-r--r-- 100.9 KB
enumobject.c -rw-r--r-- 11.9 KB
exceptions.c -rw-r--r-- 60.6 KB
fileobject.c -rw-r--r-- 87.7 KB
floatobject.c -rw-r--r-- 76.9 KB
frameobject.c -rw-r--r-- 33.5 KB
funcobject.c -rw-r--r-- 27.0 KB
genobject.c -rw-r--r-- 12.5 KB
intobject.c -rw-r--r-- 45.5 KB
iterobject.c -rw-r--r-- 7.7 KB
listobject.c -rw-r--r-- 88.4 KB
listsort.txt -rw-r--r-- 34.9 KB
lnotab_notes.txt -rw-r--r-- 5.3 KB
longobject.c -rw-r--r-- 132.4 KB
memoryobject.c -rw-r--r-- 24.1 KB
methodobject.c -rw-r--r-- 11.6 KB
moduleobject.c -rw-r--r-- 8.2 KB
object.c -rw-r--r-- 68.6 KB
obmalloc.c -rw-r--r-- 69.8 KB
rangeobject.c -rw-r--r-- 11.7 KB
setobject.c -rw-r--r-- 70.7 KB
sliceobject.c -rw-r--r-- 12.0 KB
stringobject.c -rw-r--r-- 143.0 KB
structseq.c -rw-r--r-- 15.6 KB
tupleobject.c -rw-r--r-- 28.7 KB
typeobject.c -rw-r--r-- 209.8 KB
unicodectype.c -rw-r--r-- 4.6 KB
unicodeobject.c -rw-r--r-- 270.7 KB
unicodetype_db.h -rw-r--r-- 160.1 KB
weakrefobject.c -rw-r--r-- 30.6 KB

back to top