Skip to content

Commit 08c1601

Browse files
DimitrisJimberkerpeksag
authored andcommitted
bpo:29950: Rename SlotWrapperType to WrapperDescriptorType (pythonGH-926)
1 parent 97bf722 commit 08c1601

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

Doc/library/types.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ Standard names are defined for the following types:
132132
C".)
133133

134134

135-
.. data:: SlotWrapperType
135+
.. data:: WrapperDescriptorType
136136

137137
The type of methods of some built-in data types and base classes such as
138138
:meth:`object.__init__` or :meth:`object.__lt__`.

Lib/test/test_types.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -577,10 +577,10 @@ def test_internal_sizes(self):
577577
self.assertGreater(tuple.__itemsize__, 0)
578578

579579
def test_slot_wrapper_types(self):
580-
self.assertIsInstance(object.__init__, types.SlotWrapperType)
581-
self.assertIsInstance(object.__str__, types.SlotWrapperType)
582-
self.assertIsInstance(object.__lt__, types.SlotWrapperType)
583-
self.assertIsInstance(int.__lt__, types.SlotWrapperType)
580+
self.assertIsInstance(object.__init__, types.WrapperDescriptorType)
581+
self.assertIsInstance(object.__str__, types.WrapperDescriptorType)
582+
self.assertIsInstance(object.__lt__, types.WrapperDescriptorType)
583+
self.assertIsInstance(int.__lt__, types.WrapperDescriptorType)
584584

585585
def test_method_wrapper_types(self):
586586
self.assertIsInstance(object().__init__, types.MethodWrapperType)

Lib/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def _m(self): pass
3636
BuiltinFunctionType = type(len)
3737
BuiltinMethodType = type([].append) # Same as BuiltinFunctionType
3838

39-
SlotWrapperType = type(object.__init__)
39+
WrapperDescriptorType = type(object.__init__)
4040
MethodWrapperType = type(object().__str__)
4141
MethodDescriptorType = type(str.join)
4242

Misc/NEWS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ Library
512512
- Issue #29444: Fixed out-of-bounds buffer access in the group() method of
513513
the match object. Based on patch by WGH.
514514

515-
- Issue #29377: Add SlotWrapperType, MethodWrapperType, and
515+
- Issue #29377: Add WrapperDescriptorType, MethodWrapperType, and
516516
MethodDescriptorType built-in types to types module.
517517
Original patch by Manuel Krebber.
518518

0 commit comments

Comments
 (0)