-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
gh-136492: Add FrameLocalsProxyType
to types
#136546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 14 commits
78b842c
e2ddcbe
22e056d
b8fd733
abbe1d3
753c9bc
b087d9b
1971a14
fdeb2d0
c8600b9
70cc4db
fee5256
a110148
929f81e
fb710eb
5923263
22c2bbe
9bca253
58e8577
bdabeaf
7a649c2
e0f674d
faa4cf4
ca05198
0463c30
59daace
349374d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,6 +58,7 @@ def test_names(self): | |
'MethodDescriptorType', 'MethodType', 'MethodWrapperType', | ||
'ModuleType', 'NoneType', 'NotImplementedType', 'SimpleNamespace', | ||
'TracebackType', 'UnionType', 'WrapperDescriptorType', | ||
'FrameLocalsProxyType' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please keep the list sorted (GH doesn't let me add a suggestion) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had that originally but @picnixz had reservations about it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's better to keep the list sorted rather than attempt to minimise 3-4 lines of diff here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My suggestion was to keep it sorted but by just adding the export on its own line. |
||
} | ||
self.assertEqual(all_names, set(c_types.__all__)) | ||
self.assertEqual(all_names - c_only_names, set(py_types.__all__)) | ||
|
@@ -711,6 +712,11 @@ def call(part): | |
""" | ||
assert_python_ok("-c", code) | ||
|
||
def test_frame_locals_proxy(self): | ||
frame = inspect.currentframe() | ||
self.assertIsNotNone(frame) | ||
self.assertIsInstance(frame.f_locals, types.FrameLocalsProxyType) | ||
ZeroIntensity marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
||
class UnionTests(unittest.TestCase): | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add :data:`~types.FrameLocalsProxyType` to the :mod:`types` module. | ||
ZeroIntensity marked this conversation as resolved.
Show resolved
Hide resolved
|
Uh oh!
There was an error while loading. Please reload this page.