cpython: 9605c558ab58 (original) (raw)

--- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -7,6 +7,7 @@ import pickle import sys import types import unittest +import warnings import weakref from copy import deepcopy @@ -1661,6 +1662,75 @@ order (MRO) for bases """ self.assertEqual(b.foo, 3) self.assertEqual(b.class, D)

+

+

+

+

+

+ def test_altmro(self): # Testing mro() and overriding it... class A(object): @@ -3522,6 +3592,24 @@ order (MRO) for bases """ self.assertIsInstance(d, D) self.assertEqual(d.foo, 1)

+

+ def test_imul_bug(self): # Testing for imul problems... # SF bug 544647

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -10,6 +10,9 @@ What's New in Python 3.7.0 alpha 1 Core and Builtins ----------------- +- Issue #5322: Fixed setting new to a PyCFunction inside Python code.

--- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -6878,7 +6878,34 @@ 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. */