Skip to content

Commit 9d14fad

Browse files
authored
Fix test_frame() on Python 3.13 beta 1 (#98)
1 parent ffba538 commit 9d14fad

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ jobs:
2929
- "3.12"
3030
# CPython 3.13 final is scheduled for October 2024:
3131
# https://peps.python.org/pep-0719/
32-
# TODO: Reenable 3.13 once fixed.
33-
#- "3.13"
32+
- "3.13"
3433

3534
# PyPy versions:
3635
# - https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md

tests/test_pythoncapi_compat_cext.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,10 @@ test_frame(PyObject *Py_UNUSED(module), PyObject* Py_UNUSED(ignored))
255255
// test PyFrame_GetLocals()
256256
PyObject *locals = PyFrame_GetLocals(frame);
257257
assert(locals != _Py_NULL);
258+
// Python 3.13 creates a local proxy
259+
#if PY_VERSION_HEX < 0x030D0000
258260
assert(PyDict_Check(locals));
261+
#endif
259262

260263
// test PyFrame_GetGlobals()
261264
PyObject *globals = PyFrame_GetGlobals(frame);

0 commit comments

Comments
 (0)