summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Fasarakis-Hilliard <d.f.hilliard@gmail.com>2017-04-25 21:26:36 +0300
committerBerker Peksag <berker.peksag@gmail.com>2017-04-25 21:26:36 +0300
commit08c16016e2a2d1368d001ddebfe9ca92465773c4 (patch)
tree587af7612410fa638a420e845e16be2521a9552f
parent97bf722fcd1de1236824377e052369dc7686b644 (diff)
downloadcpython-git-08c16016e2a2d1368d001ddebfe9ca92465773c4.tar.gz
bpo:29950: Rename SlotWrapperType to WrapperDescriptorType (GH-926)
-rw-r--r--Doc/library/types.rst2
-rw-r--r--Lib/test/test_types.py8
-rw-r--r--Lib/types.py2
-rw-r--r--Misc/NEWS2
4 files changed, 7 insertions, 7 deletions
diff --git a/Doc/library/types.rst b/Doc/library/types.rst
index 2602e3cf76..89aca9c9df 100644
--- a/Doc/library/types.rst
+++ b/Doc/library/types.rst
@@ -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__`.
diff --git a/Lib/test/test_types.py b/Lib/test/test_types.py
index 67d3281f3e..3fd66dbc70 100644
--- a/Lib/test/test_types.py
+++ b/Lib/test/test_types.py
@@ -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)
diff --git a/Lib/types.py b/Lib/types.py
index 1b7859e73a..929cba223a 100644
--- a/Lib/types.py
+++ b/Lib/types.py
@@ -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)
diff --git a/Misc/NEWS b/Misc/NEWS
index bf0c015eeb..d9b13c7c98 100644
--- 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.