Staging
v0.5.1
https://github.com/python/cpython
Revision d7773d92bd11640a8c950d6c36a9cef1cee36f96 authored by bennorth on 26 January 2018, 15:46:01 UTC, committed by Senthil Kumaran on 26 January 2018, 15:46:01 UTC
dictview_repr(): Use a Py_ReprEnter() / Py_ReprLeave() pair to check
for recursion, and produce "..." if so.

test_recursive_repr(): Check for the string rather than a
RecursionError.  (Test cannot be any tighter as contents are
implementation-dependent.)

test_deeply_nested_repr(): Add new test, replacing the original
test_recursive_repr().  It checks that a RecursionError is raised in
the case of a non-recursive but deeply nested structure.  (Very
similar to what test_repr_deep() in test/test_dict.py does for a
normal dict.)

OrderedDictTests: Add new test case, to test behavior on OrderedDict
instances containing their own values() or items().
1 parent e76daeb
History
Tip revision: d7773d92bd11640a8c950d6c36a9cef1cee36f96 authored by bennorth on 26 January 2018, 15:46:01 UTC
bpo-18533: Avoid RecursionError from repr() of recursive dictview (#4823)
Tip revision: d7773d9
File Mode Size
clinic
stringlib
README -rw-r--r-- 41 bytes
abstract.c -rw-r--r-- 66.8 KB
accu.c -rw-r--r-- 2.4 KB
boolobject.c -rw-r--r-- 6.5 KB
bytearrayobject.c -rw-r--r-- 69.2 KB
bytes_methods.c -rw-r--r-- 21.1 KB
bytesobject.c -rw-r--r-- 99.2 KB
call.c -rw-r--r-- 37.0 KB
capsule.c -rw-r--r-- 7.2 KB
cellobject.c -rw-r--r-- 4.4 KB
classobject.c -rw-r--r-- 17.9 KB
codeobject.c -rw-r--r-- 26.9 KB
complexobject.c -rw-r--r-- 32.3 KB
descrobject.c -rw-r--r-- 54.9 KB
dict-common.h -rw-r--r-- 2.3 KB
dictnotes.txt -rw-r--r-- 6.0 KB
dictobject.c -rw-r--r-- 128.9 KB
enumobject.c -rw-r--r-- 13.3 KB
exceptions.c -rw-r--r-- 85.6 KB
fileobject.c -rw-r--r-- 14.8 KB
floatobject.c -rw-r--r-- 71.1 KB
frameobject.c -rw-r--r-- 32.6 KB
funcobject.c -rw-r--r-- 29.2 KB
genobject.c -rw-r--r-- 66.3 KB
iterobject.c -rw-r--r-- 9.0 KB
listobject.c -rw-r--r-- 86.0 KB
listsort.txt -rw-r--r-- 34.9 KB
lnotab_notes.txt -rw-r--r-- 5.7 KB
longobject.c -rw-r--r-- 166.4 KB
memoryobject.c -rw-r--r-- 88.7 KB
methodobject.c -rw-r--r-- 9.2 KB
moduleobject.c -rw-r--r-- 22.7 KB
namespaceobject.c -rw-r--r-- 7.2 KB
object.c -rw-r--r-- 60.7 KB
obmalloc.c -rw-r--r-- 83.2 KB
odictobject.c -rw-r--r-- 76.1 KB
rangeobject.c -rw-r--r-- 34.3 KB
setobject.c -rw-r--r-- 73.3 KB
sliceobject.c -rw-r--r-- 19.2 KB
structseq.c -rw-r--r-- 13.1 KB
tupleobject.c -rw-r--r-- 29.9 KB
typeobject.c -rw-r--r-- 238.5 KB
typeslots.inc -rw-r--r-- 3.9 KB
typeslots.py -rwxr-xr-x 1.2 KB
unicodectype.c -rw-r--r-- 7.5 KB
unicodeobject.c -rw-r--r-- 450.6 KB
unicodetype_db.h -rw-r--r-- 233.8 KB
weakrefobject.c -rw-r--r-- 29.5 KB

README

back to top