Skip to content

Commit

Permalink
Merge pull request #294 from zopefoundation/dataflake/pep667
Browse files Browse the repository at this point in the history
Adjust for incompatible changes in Python 3.13b1
  • Loading branch information
dataflake committed May 15, 2024
2 parents 998214b + 753daca commit e613355
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
6.4 (unreleased)
================

- Adjust for incompatible changes in Python 3.13b1.
(`#292 <https://github.com/zopefoundation/zope.interface/issues/292>`)

- Build windows wheels on GHA.

6.3 (2024-04-12)
Expand Down
3 changes: 3 additions & 0 deletions src/zope/interface/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,9 @@ def update_value(aname, aval):
# __static_attributes__: Python 3.13a6+
# https://github.com/python/cpython/pull/115913
'__static_attributes__',
# __firstlineno__: Python 3.13b1+
# https://github.com/python/cpython/pull/118475
'__firstlineno__',
)
and aval is not _decorator_non_return
}
Expand Down
6 changes: 5 additions & 1 deletion src/zope/interface/tests/test_advice.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ def test_inside_function_call(self):
from zope.interface.advice import getFrameInfo
kind, module, f_locals, f_globals = getFrameInfo(sys._getframe())
self.assertEqual(kind, "function call")
self.assertTrue(f_locals is locals()) # ???

frame = sys._getframe()
self.assertEqual(f_locals, frame.f_locals)
self.assertEqual(f_locals, locals())

for d in module.__dict__, f_globals:
self.assertTrue(d is globals())

Expand Down

0 comments on commit e613355

Please sign in to comment.