cpython: 3c9512d8ac0d (original) (raw)

Mercurial > cpython

changeset 99975:3c9512d8ac0d 3.5

set tp_new from the class in the hierarchy that actually owns the descriptor (closes #25731) Debugging by Eryk Sun. [#25731]

Benjamin Peterson benjamin@python.org
date Mon, 18 Jan 2016 21:11:18 -0800
parents 673d1ccea050
children a7953ee29f1c bf997b22df06
files Lib/test/test_descr.py Misc/NEWS Objects/typeobject.c
diffstat 3 files changed, 11 insertions(+), 1 deletions(-)[+] [-] Lib/test/test_descr.py 8 Misc/NEWS 2 Objects/typeobject.c 2

line wrap: on

line diff

--- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -4564,6 +4564,14 @@ order (MRO) for bases """ self.assertRegex(repr(method), r"<bound method qualname of <object object at .*>>")

+ class DictProxyTests(unittest.TestCase): def setUp(self):

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -10,6 +10,8 @@ Release date: tba Core and Builtins ----------------- +- Issue #25731: Fix set and deleting new on a class. +

--- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -6777,7 +6777,7 @@ update_one_slot(PyTypeObject *type, slot sanity checks and constructing a new argument list. Cut all that nonsense short -- this speeds up instance creation tremendously. */