bpo:29950: Rename SlotWrapperType to WrapperDescriptorType (GH-926)
authorJim Fasarakis-Hilliard <d.f.hilliard@gmail.com>
Tue, 25 Apr 2017 18:26:36 +0000 (21:26 +0300)
committerBerker Peksag <berker.peksag@gmail.com>
Tue, 25 Apr 2017 18:26:36 +0000 (21:26 +0300)
Doc/library/types.rst
Lib/test/test_types.py
Lib/types.py
Misc/NEWS

index 2602e3cf761f5c8f9e8907682aaa36a00ad6600f..89aca9c9df864a83718540845f3078c51e00c95e 100644 (file)
@@ -132,7 +132,7 @@ Standard names are defined for the following types:
    C".)
 
 
-.. data:: SlotWrapperType
+.. data:: WrapperDescriptorType
 
    The type of methods of some built-in data types and base classes such as
    :meth:`object.__init__` or :meth:`object.__lt__`.
index 67d3281f3eaffaaea531b2d04caef7af53f5aef9..3fd66dbc70d8519ffafa574355fffdb0ca2a16b5 100644 (file)
@@ -577,10 +577,10 @@ class TypesTests(unittest.TestCase):
         self.assertGreater(tuple.__itemsize__, 0)
 
     def test_slot_wrapper_types(self):
-        self.assertIsInstance(object.__init__, types.SlotWrapperType)
-        self.assertIsInstance(object.__str__, types.SlotWrapperType)
-        self.assertIsInstance(object.__lt__, types.SlotWrapperType)
-        self.assertIsInstance(int.__lt__, types.SlotWrapperType)
+        self.assertIsInstance(object.__init__, types.WrapperDescriptorType)
+        self.assertIsInstance(object.__str__, types.WrapperDescriptorType)
+        self.assertIsInstance(object.__lt__, types.WrapperDescriptorType)
+        self.assertIsInstance(int.__lt__, types.WrapperDescriptorType)
 
     def test_method_wrapper_types(self):
         self.assertIsInstance(object().__init__, types.MethodWrapperType)
index 1b7859e73a19b9811483a670aecec7842c9934c0..929cba223aa9057bede9ce9fec209a9a10497b5c 100644 (file)
@@ -36,7 +36,7 @@ MethodType = type(_C()._m)
 BuiltinFunctionType = type(len)
 BuiltinMethodType = type([].append)     # Same as BuiltinFunctionType
 
-SlotWrapperType = type(object.__init__)
+WrapperDescriptorType = type(object.__init__)
 MethodWrapperType = type(object().__str__)
 MethodDescriptorType = type(str.join)
 
index bf0c015eeb54c9d53cc163998317fc61947452ca..d9b13c7c9835f448fcd59c847d1670a31ed12b0e 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -512,7 +512,7 @@ Library
 - Issue #29444: Fixed out-of-bounds buffer access in the group() method of
   the match object.  Based on patch by WGH.
 
-- Issue #29377: Add SlotWrapperType, MethodWrapperType, and
+- Issue #29377: Add WrapperDescriptorType, MethodWrapperType, and
   MethodDescriptorType built-in types to types module.
   Original patch by Manuel Krebber.