Skip to content

Commit f2029b1

Browse files
Accommodate FrameLocalsProxy introduction Python 3.13
The `frame.f_locals` is now a write-through proxy object of type `FrameLocalsProxy`; see PEP 667. This fix is based on zopefoundation/zope.interface#294 and specifically on zopefoundation/zope.interface#294 (comment). Fixes #91.
1 parent 966cce8 commit f2029b1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/test_advice.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ def testCallInfo(self):
9393
sys._getframe()
9494
)
9595
self.assertEqual(kind, "function call")
96-
self.assertTrue(f_locals is locals()) # ???
96+
frame = sys._getframe()
97+
self.assertEqual(f_locals, frame.f_locals)
98+
self.assertEqual(f_locals, locals())
9799
for d in module.__dict__, f_globals:
98100
self.assertTrue(d is globals())
99101
self.assertEqual(len(codeinfo), 4)

0 commit comments

Comments
 (0)