Skip to content

PyObC 9.2 with some bugfixes

Compare
Choose a tag to compare
@ronaldoussoren ronaldoussoren released this 07 Jun 07:24
· 330 commits to master since this release
  • #549: Added warning objc.ObjCSuperWarning that is used
    to warn about classes that use argument-less super without binding that
    name to objc.super.

    The correct code pattern is:

    from Foundation import NSObject
    from objc import super
    
    
    class MyObject(NSObject):
        def init(self):
            self = super().init()
            if self is None:
                return None
    
            ...
            return self
  • #549: Document that objc.super must be used instead of
    builtin.super when calling superclass methods in a Cocoa subclass.

    See the documentation <(https://pyobjc.readthedocs.io/core/super.html>_
    for more details.

  • #550: Add minimal pyproject.toml to all subprojects

    Recent versions of pip give a deprecation warning for projects without
    a pyproject.toml, and version 23.1 enabled the pyproject.toml
    backend by default. Add a minimal pyproject.toml to get a consistent
    build regardless of the version of pip

  • #551: Fix crash in pyobjc-core when using Python 3.12a7.

  • #449: Added explicit tests for dealing with Objective-C categories
    that are loaded while using classes from Python.

  • #552: Fix the version of macOS where the SafariServices framework is
    present.

  • #552: Fixed some issues found by testing on a macOS 10.11 system

  • Trying to implement a method with SIMD types as arguments or return value
    will now give a more useful error when the bridge does not support the
    signature.

  • #554: Fix incomplete metadata for CoreMediaIO.CMIOObjectSetPropertyData

  • Fix incorrect metadata for
    xpc.xpc_uuid_create,
    xpc.xpc_dictionary_set_uuid ,
    xpc.xpc_array_set_uuid,
    JavaScriptCore.JSObjectMakeDeferredPromise,
    JavaScriptCore.JSValueIsEqual,
    JavaScriptCore.JSValueIsInstanceOfConstructor,
    JavaScriptCore.JSValueCreateJSONString,
    JavaScriptCore.JSValueToNumber,
    JavaScriptCore.JSValueToStringCopy,
    JavaScriptCore.JSValueToObject,
    Quartz.CGImageCreateWithJPEGDataProvider,
    Quartz.CGImageCreateWithPNGDataProvider,
    Quartz.CGImageMaskCreate,
    Quartz.CVBufferCopyAttachment,
    Quartz.CVMetalTextureCacheCreate,
    Quartz.CVMetalTextureCacheCreateFromImage,
    Quartz.CVOpenGLTextureCacheCreate,
    CoreMedia.CMAudioClockCreate,
    CoreMedia.CMAudioFormatDescriptionCreate,
    CoreMedia.CMBlockBufferGetDataPointer,
    CoreMedia.CMBlockBufferAccessDataBytes,
    CoreMedia.CMBlockBufferGetDataPointer,
    CoreMedia.CMAudioFormatDescriptionGetMostCompatibleFormat,
    CoreMedia.CMAudioFormatDescriptionGetRichestDecodableFormat,
    CoreMedia.CMSampleBufferCreateWithMakeDataReadyHandler,
    CoreMedia.CMSampleBufferCreateForImageBufferWithMakeDataReadyHandler,
    CFNetwork.CFNetServiceBrowserSearchForDomains,
    CFNetwork.CFNetServiceBrowserStopSearch,
    CFNetwork.CFNetServiceMonitorStop,
    CFNetwork.CFNetServiceRegister,
    CFNetwork.CFNetServiceResolve,
    CoreText.CTFontCreateCopyWithSymbolicTraits,
    CoreText.CTFontCreateCopyWithFamily,
    CoreText.CTFontCreateCopyWithAttributes,
    CoreMIDI.MIDISourceCreateWithProtocol,
    CoreMIDI.MIDISourceCreate,
    CoreMIDI.MIDISetupCreate,
    CoreMIDI.MIDIDestinationCreate,
    CoreMIDI.MIDIClientCreate,
    CoreMIDI.MIDIClientCreateWithBlock,
    CoreMIDI.MIDIOutputPortCreate,
    CoreMIDI.MIDIObjectGetStringProperty,
    CoreMIDI.MIDIObjectGetProperties,
    CoreMIDI.MIDIObjectGetIntegerProperty,
    CoreMIDI.MIDIObjectGetDictionaryProperty,
    CoreMIDI.MIDIObjectGetDataProperty,
    CoreMIDI.MIDIObjectFindByUniqueID,
    CoreMIDI.MIDIDestinationCreateWithProtocol,
    CoreMIDI.MIDIEndpointGetEntity,
    CoreMIDI.MIDIEntityGetDevice,
    CoreMIDI.MIDIEntityGetRefCons,
    CoreMIDI.MIDIEntitySetRefCons,
    DVDPlayback.DVDRegisterEventCallBack,
    DiskArbitration.DADiskMountWithArguments,
    GameController.NSDataFromGCExtendedGamepadSnapShotDataV100,
    HealthKit.HKAppleWalkingSteadinessClassificationForQuantity,
    IOSurface.IOSurfaceSetPurgeable,
    Network.nw_ethernet_channel_send,

  • Removed Quartz.CGColorConversionInfoCreateFromListWithArguments. This function
    was already documented as unsupported, but was still present in the framework
    wrapper.

  • Removed Quartz.CVPixelBufferCreateWithPlanarBytes. This function requires a
    manual binding, but was still present with a generic (and non-working) binding.

  • Removed CoreMedia.CMBufferQueueCreate, CoreMedia.CMBufferQueueGetCallbacksForSampleBuffersSortedByOutputPTS,
    CoreMedia.CMBufferQueueGetCallbacksForUnsortedSampleBuffers, CoreMedia.CMVideoFormatDescriptionGetH264ParameterSetAtIndex,
    CoreMedia.CMVideoFormatDescriptionGetHVECParameterSetAtIndex,
    These functions require a manual binding, but were still present with a generic (and non-working) binding.

  • Explicitly exclude definitions from CMIOHardwarePlugIn.h from the CoreMediaIO
    bindings.

  • Added deref_result_pointer key to the metadata for a return value. Use this
    when a callable returns a pointer to a single value (for example CMAudioFormatDescriptionGetMostCompatibleFormat)

  • Removed unsupported functions from the ApplicationServices bindings (not named individually
    due to the size of the list). Also fixed annotations for other ApplicationServices bindings.

  • Add manual binding for CFNetwork.CFNetServiceBrowserCreate, CFNetwork.CFNetServiceSetClient,
    and CFNetwork.CFNetServiceMonitorCreate.

  • Fix incompatibility with Python 3.12 beta 1.

    warning:

    Due to changes to the bytecode compiler the bridge will (incorrectly)
    deduce that a method does not return a value (void return in Objective-C)
    when a method only contains return None statements and no return
    statements that return some other value (expressions or constants).

    That is the following method is implied to return id for Python 3.11 or
    earlier, but is implied to return void in Python 3.12.

        def mymethod(self):
            return None