bleak
bleak copied to clipboard
leaking an uninitialized object of type CBCentralManager
Mac OS 10.11 Python 3.11 bleak 0.22.3 pyobjc 10.3.2
When calling
await BleakScanner.discover(5.0, return_adv=True)
I get the following error
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/bleak/backends/corebluetooth/CentralManagerDelegate.py:76: UninitializedDeallocWarning: leaking an uninitialized object of type CBCentralManager
self.central_manager = CBCentralManager.alloc().initWithDelegate_queue_(
Traceback (most recent call last):
[...]
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/bleak/backends/corebluetooth/CentralManagerDelegate.py", line 76, in init
self.central_manager = CBCentralManager.alloc().initWithDelegate_queue_(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: depythonifying 'pointer', got 'OS_dispatch_queue'
Mac OS 10.11
Hmm... this could be the issue. I'm not able to test Bleak on older versions of macOS.
Looks like similar reports here: https://github.com/ronaldoussoren/pyobjc/issues/220