Support marshalling OS_dispatch_queue on macOS 10.10 and 10.11.

Issue #220 new
WayneK
created an issue

Using PyObjC 4.0.1 on macOs 10.10.3 we're seeing an error below that doesn't occur on macOS 10.12.6:

initWithDelegate_queue_options_(self, queue_ptr, None)
ValueError: depythonifying 'pointer', got 'OS_dispatch_queue'

A standalone testcase is here: https://gist.github.com/WayneKeenan/8ce4d841158909ad441dc7312637a064

I would be interested to know if it can be worked around when using PyObjC 4.0.1 on macOS 10.10.x ?

Perhaps the upcoming PyObjC 4.1's added dispatch support means the workaround will go away and I wonder that because the Python/ObjC conversion isn't needed all will be ok on 10.10 as it is on 10.12 (?)

thanks Wayne

Comments (16)

  1. Ronald Oussoren repo owner

    That's the plan. I have VM's running various macOS releases and intent to do a full test run on 10.9 and later before releasing 4.1.

    I'm currently working on bindings for the Security framework, I'll start the test run after that.

  2. WayneK reporter

    The error is still occurring in 4.1:

     Uninstalling pyobjc-4.0.1:
          Successfully uninstalled pyobjc-4.0.1
    Successfully installed pyobjc-4.1 pyobjc-core-4.1 pyobjc-framework-AVFoundation-4.1 pyobjc-framework-AVKit-4.1 pyobjc-framework-Accounts-4.1 pyobjc-framework-AddressBook-4.1 pyobjc-framework-AppleScriptKit-4.1 pyobjc-framework-AppleScriptObjC-4.1 pyobjc-framework-ApplicationServices-4.1 pyobjc-framework-Automator-4.1 pyobjc-framework-CFNetwork-4.1 pyobjc-framework-CalendarStore-4.1 pyobjc-framework-CloudKit-4.1 pyobjc-framework-Cocoa-4.1 pyobjc-framework-Collaboration-4.1 pyobjc-framework-CoreBluetooth-4.1 pyobjc-framework-CoreData-4.1 pyobjc-framework-CoreLocation-4.1 pyobjc-framework-CoreServices-4.1 pyobjc-framework-CoreText-4.1 pyobjc-framework-CoreWLAN-4.1 pyobjc-framework-CryptoTokenKit-4.1 pyobjc-framework-DictionaryServices-4.1 pyobjc-framework-DiskArbitration-4.1 pyobjc-framework-EventKit-4.1 pyobjc-framework-ExceptionHandling-4.1 pyobjc-framework-FSEvents-4.1 pyobjc-framework-FinderSync-4.1 pyobjc-framework-GameCenter-4.1 pyobjc-framework-GameController-4.1 pyobjc-framework-GameKit-4.1 pyobjc-framework-IMServicePlugIn-4.1 pyobjc-framework-IOSurface-4.1 pyobjc-framework-ImageCaptureCore-4.1 pyobjc-framework-InputMethodKit-4.1 pyobjc-framework-InstallerPlugins-4.1 pyobjc-framework-InstantMessage-4.1 pyobjc-framework-LatentSemanticMapping-4.1 pyobjc-framework-LaunchServices-4.1 pyobjc-framework-LocalAuthentication-4.1 pyobjc-framework-MapKit-4.1 pyobjc-framework-MediaAccessibility-4.1 pyobjc-framework-MediaLibrary-4.1 pyobjc-framework-MultipeerConnectivity-4.1 pyobjc-framework-NetFS-4.1 pyobjc-framework-NotificationCenter-4.1 pyobjc-framework-OpenDirectory-4.1 pyobjc-framework-PreferencePanes-4.1 pyobjc-framework-PubSub-4.1 pyobjc-framework-QTKit-4.1 pyobjc-framework-Quartz-4.1 pyobjc-framework-SceneKit-4.1 pyobjc-framework-ScreenSaver-4.1 pyobjc-framework-ScriptingBridge-4.1 pyobjc-framework-SearchKit-4.1 pyobjc-framework-Security-4.1 pyobjc-framework-SecurityFoundation-4.1 pyobjc-framework-SecurityInterface-4.1 pyobjc-framework-ServiceManagement-4.1 pyobjc-framework-Social-4.1 pyobjc-framework-SpriteKit-4.1 pyobjc-framework-StoreKit-4.1 pyobjc-framework-SyncServices-4.1 pyobjc-framework-SystemConfiguration-4.1 pyobjc-framework-WebKit-4.1 pyobjc-framework-iTunesLibrary-4.1 pyobjc-framework-libdispatch-4.1
    (my-venv) eddies-computer:my-venv barry$ python3 -m bleson --observer
    2017-12-11 21:02:23,052  ERROR -         macos_adapter.py:132 -          _runloop_thread(): depythonifying 'pointer', got 'OS_dispatch_queue'
    Traceback (most recent call last):
      File "/Users/barry/development/my-venv/lib/python3.6/site-packages/bleson/providers/macos/macos_adapter.py", line 125, in _runloop_thread
        self._manager.initWithDelegate_queue_options_(self, queue_ptr, None)
    ValueError: depythonifying 'pointer', got 'OS_dispatch_queue'
    2017-12-11 21:02:23,086   INFO -         macos_adapter.py:133 -          _runloop_thread(): Exiting runloop
    
  3. Log in to comment