-
-
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
Python 3.12.0b1 appears to have introduced something that breaks Rubicon; from rubicon.objc import NSObject
raises a TypeError.
Steps to reproduce
from rubicon.objc import NSObject
- See error
Traceback (most recent call last):
File "/Users/rkm/beeware/rubicon/objc/testbed.py", line 3, in <module>
from rubicon.objc import NSObject, objc_method
File "/Users/rkm/beeware/rubicon/objc/src/rubicon/objc/__init__.py", line 33, in <module>
from . import api, collections, runtime, types
File "/Users/rkm/beeware/rubicon/objc/src/rubicon/objc/api.py", line 1694, in <module>
NSNumber = ObjCClass("NSNumber")
^^^^^^^^^^^^^^^^^^^^^
File "/Users/rkm/beeware/rubicon/objc/src/rubicon/objc/api.py", line 1402, in __new__
self = super().__new__(cls, ptr, objc_class_name, (ObjCInstance,), new_attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/rkm/beeware/rubicon/objc/src/rubicon/objc/api.py", line 927, in __new__
super(ObjCInstance, type(self)).__setattr__(self, "ptr", object_ptr)
TypeError: expected 2 arguments, got 3
Expected behavior
The import should succeed.
Screenshots
No response
Environment
- Operating System: macOS Ventura 13.3.1
- Python version: 3.12.0b1
- Software versions:
- Rubicon-Objc: 35b6fc8
Logs
No response
Additional context
There was no problem with 3.12.0a7; I haven't narrowed down the change that has caused the problem, and the Python 3.12 release notes don't have anything that is an obvious candidate (to me, anyway).
Metadata
Metadata
Assignees
Labels
bugA crash or error in behavior.A crash or error in behavior.