Skip to content

Commit

Permalink
Fix CI failures on Github (#94)
Browse files Browse the repository at this point in the history
* Accommodate FrameLocalsProxy introduction in 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.

* add 3.13 to checked ci

* use macos-12 to test macos (later versions dont seem to build python correctly) 

---------

Co-authored-by: Benjamin A. Beasley <[email protected]>
  • Loading branch information
mcdonc and musicinmybrain authored Dec 2, 2024
1 parent 966cce8 commit d4ab706
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ jobs:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "pypy-3.8"
os:
- "ubuntu-latest"
- "windows-latest"
- "macos-latest"
- "macos-12" # (later seem to fail building python)
architecture:
- x64
- x86
Expand All @@ -35,7 +36,7 @@ jobs:
# Linux and macOS don't have x86 python
- os: "ubuntu-latest"
architecture: x86
- os: "macos-latest"
- os: "macos-12"
architecture: x86

name: "Python: ${{ matrix.py }}-${{ matrix.architecture }} on ${{ matrix.os }}"
Expand Down
7 changes: 7 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Unreleased
----------

- Add support for Python 3.13 (thanks to musicinmybrain).

- Fix GitHub test actions.

3.1.0 (2023-11-06)
------------------

Expand Down
4 changes: 3 additions & 1 deletion tests/test_advice.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ def testCallInfo(self):
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())
self.assertEqual(len(codeinfo), 4)

0 comments on commit d4ab706

Please sign in to comment.