Skip to content

Commit ca05198

Browse files
committed
Merge branch 'frameslocalsproxy-types' of https://github.com/zerointensity/cpython into frameslocalsproxy-types
2 parents faa4cf4 + 7a649c2 commit ca05198

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

Doc/library/types.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,7 @@ Standard names are defined for the following types:
340340

341341
.. versionadded:: next
342342

343-
.. seealso::
344-
:pep:`667`
343+
.. seealso:: :pep:`667`
345344

346345

347346
.. data:: GetSetDescriptorType

Doc/whatsnew/3.15.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,10 @@ tarfile
281281
types
282282
------
283283

284-
* Added :data:`types.FrameLocalsProxyType` for representing the type of
285-
the :attr:`frame.f_locals` attribute, as described in :pep:`667`.
284+
* Expose the write-through :func:`locals` proxy type
285+
as :data:`types.FrameLocalsProxyType`.
286+
This represents the type of the :attr:`frame.f_locals` attribute,
287+
as described in :pep:`667`.
286288

287289

288290
unittest

Lib/test/test_types.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,11 @@ def call(part):
712712
"""
713713
assert_python_ok("-c", code)
714714

715-
def test_frame_locals_proxy(self):
715+
def test_frame_locals_proxy_type(self):
716+
self.assertIsInstance(types.FrameLocalsProxyType, type)
717+
self.assertIsInstance(types.FrameLocalsProxyType.__doc__, str)
718+
self.assertEqual(types.FrameLocalsProxyType.__module__, 'types')
719+
716720
frame = inspect.currentframe()
717721
self.assertIsNotNone(frame)
718722
self.assertIsInstance(frame.f_locals, types.FrameLocalsProxyType)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Add :data:`~types.FrameLocalsProxyType` to the :mod:`types` module.
1+
Expose :pep:`667`'s :data:`~types.FrameLocalsProxyType` in the :mod:`types` module.

0 commit comments

Comments
 (0)