Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c352620

Browse files
committed
backout 3c9512d8ac0d
1 parent 338502b commit c352620

3 files changed

Lines changed: 1 addition & 11 deletions

File tree

Lib/test/test_descr.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4564,14 +4564,6 @@ def __call__(self, arg):
45644564
self.assertRegex(repr(method),
45654565
r"<bound method qualname of <object object at .*>>")
45664566

4567-
def test_deleting_new_in_subclasses(self):
4568-
class X:
4569-
def __init__(self, a):
4570-
pass
4571-
X.__new__ = None
4572-
del X.__new__
4573-
X(1) # should work
4574-
45754567

45764568
class DictProxyTests(unittest.TestCase):
45774569
def setUp(self):

Misc/NEWS

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,6 @@ Core and Builtins
8080
(``int``) and ``f2()`` returns ``1.0`` (``int``), even if ``1`` and ``1.0``
8181
are equal.
8282

83-
- Issue #25731: Fix set and deleting __new__ on a class.
84-
8583
- Issue #22995: [UPDATE] Comment out the one of the pickleability tests in
8684
_PyObject_GetState() due to regressions observed in Cython-based projects.
8785

Objects/typeobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6777,7 +6777,7 @@ update_one_slot(PyTypeObject *type, slotdef *p)
67776777
sanity checks and constructing a new argument
67786778
list. Cut all that nonsense short -- this speeds
67796779
up instance creation tremendously. */
6780-
specific = (void *)((PyTypeObject *)PyCFunction_GET_SELF(descr))->tp_new;
6780+
specific = (void *)type->tp_new;
67816781
/* XXX I'm not 100% sure that there isn't a hole
67826782
in this reasoning that requires additional
67836783
sanity checks. I'll buy the first person to

0 commit comments

Comments
 (0)