-
-
Notifications
You must be signed in to change notification settings - Fork 58
Closed
Labels
bugA crash or error in behavior.A crash or error in behavior.
Description
Describe the bug
As of Python3.13.0a6, the ctypes patch used to allow struct return values no longer works.
Steps to reproduce
Run the test suite on Python 3.13.0a6.
There will be 7 test failures, all of the form:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/unittest/case.py", line 58, in testPartExecutor
yield
File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/unittest/case.py", line 651, in run
self._callTestMethod(testMethod)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/unittest/case.py", line 606, in _callTestMethod
if method() is not None:
~~~~~~^^
File "/Users/runner/work/rubicon-objc/rubicon-objc/tests/test_ctypes_patch.py", line 96, in test_patch_idempotent
ctypes_patch.make_callback_returnable(TestStruct)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
File "/Users/runner/work/rubicon-objc/rubicon-objc/.tox/py/lib/python3.13/site-packages/rubicon/objc/ctypes_patch.py", line 197, in make_callback_returnable
stgdict = get_stgdict_of_type(ctype)
~~~~~~~~~~~~~~~~~~~^^^^^^^
File "/Users/runner/work/rubicon-objc/rubicon-objc/.tox/py/lib/python3.13/site-packages/rubicon/objc/ctypes_patch.py", line 175, in get_stgdict_of_type
raise TypeError(
f"The given type's dict must be a StgDict, not {type(stgdict).__module__}.{type(stgdict).__qualname__}"
)
TypeError: The given type's dict must be a StgDict, not builtins.dict
Expected behavior
Test suite should pass.
Screenshots
No response
Environment
- Operating System: macOS
- Python version: 3.13.0a6
Logs
No response
Additional context
Test suite passes with 3.13.0a5.
Metadata
Metadata
Assignees
Labels
bugA crash or error in behavior.A crash or error in behavior.