./devel/py-pyobjc, Bridge between Python and Objective-C

[ Image CVSweb ] [ Image Homepage ] [ Image RSS ] [ Image Required by ] [ Image Add to tracker ]


Branch: CURRENT, Version: 12.1, Package name: py313-pyobjc-12.1, Maintainer: pkgsrc-users

The PyObjC project aims to provide a bridge between the Python and Objective-C
programming languages. The bridge is intended to be fully bidirectional,
allowing the Python programmer to take full advantage of the power provided by
various Objective-C based toolkits and the Objective-C programmer transparent
access to Python based functionality.


Required to run:
[devel/py-pyobjc-framework-InstantMessage] [devel/py-pyobjc-framework-CoreWLAN] [devel/py-pyobjc-framework-WebKit] [devel/py-pyobjc-framework-LaunchServices] [devel/py-pyobjc-framework-Automator] [devel/py-pyobjc-framework-AddressBook] [devel/py-pyobjc-framework-DiskArbitration] [devel/py-pyobjc-framework-DictionaryServices] [devel/py-pyobjc-framework-PreferencePanes] [devel/py-pyobjc-framework-AppleScriptObjC] [devel/py-pyobjc-core] [devel/py-pyobjc-framework-ServiceManagement] [devel/py-pyobjc-framework-Accounts] [devel/py-pyobjc-framework-CFNetwork] [devel/py-pyobjc-framework-CalendarStore] [devel/py-pyobjc-framework-Cocoa] [devel/py-pyobjc-framework-CoreData] [devel/py-pyobjc-framework-CoreLocation] [devel/py-pyobjc-framework-ExceptionHandling] [devel/py-pyobjc-framework-FSEvents] [devel/py-pyobjc-framework-InputMethodKit] [devel/py-pyobjc-framework-QTKit] [devel/py-pyobjc-framework-Quartz] [devel/py-pyobjc-framework-ScreenSaver] [devel/py-pyobjc-framework-SearchKit] [devel/py-pyobjc-framework-Social] [devel/py-pyobjc-framework-StoreKit] [devel/py-pyobjc-framework-Collaboration] [devel/py-pyobjc-framework-SystemConfiguration] [devel/py-pyobjc-framework-CoreText] [devel/py-pyobjc-framework-SyncServices] [devel/py-pyobjc-framework-LatentSemanticMapping] [devel/py-pyobjc-framework-InstallerPlugins] [devel/py-pyobjc-framework-PubSub] [devel/py-pyobjc-framework-EventKit] [devel/py-pyobjc-framework-OpenDirectory] [devel/py-pyobjc-framework-AppleScriptKit] [devel/py-pyobjc-framework-ScriptingBridge] [devel/py-pyobjc-framework-ImageCaptureCore] [devel/py-pyobjc-framework-MediaPlayer] [devel/py-pyobjc-framework-GameCenter] [devel/py-pyobjc-framework-MediaAccessibility] [devel/py-pyobjc-framework-Intents] [devel/py-pyobjc-framework-NetFS] [devel/py-pyobjc-framework-Photos] [devel/py-pyobjc-framework-AVKit] [devel/py-pyobjc-framework-MultipeerConnectivity] [devel/py-pyobjc-framework-ApplicationServices] [devel/py-pyobjc-framework-ModelIO] [devel/py-pyobjc-framework-CoreBluetooth] [devel/py-pyobjc-framework-SafariServices] [devel/py-pyobjc-framework-AVFoundation] [devel/py-pyobjc-framework-CloudKit] [devel/py-pyobjc-framework-CoreML] [devel/py-pyobjc-framework-CoreSpotlight] [devel/py-pyobjc-framework-ExternalAccessory] [devel/py-pyobjc-framework-MapKit] [devel/py-pyobjc-framework-MediaLibrary] [devel/py-pyobjc-framework-PhotosUI] [devel/py-pyobjc-framework-SecurityInterface] [devel/py-pyobjc-framework-SpriteKit] [devel/py-pyobjc-framework-iTunesLibrary] [devel/py-pyobjc-framework-IOSurface] [devel/py-pyobjc-framework-NotificationCenter] [devel/py-pyobjc-framework-FinderSync] [devel/py-pyobjc-framework-Vision] [devel/py-pyobjc-framework-SceneKit] [devel/py-pyobjc-framework-LocalAuthentication] [devel/py-pyobjc-framework-GameController] [devel/py-pyobjc-framework-libdispatch] [devel/py-pyobjc-framework-Contacts] [devel/py-pyobjc-framework-ContactsUI] [devel/py-pyobjc-framework-Security] [devel/py-pyobjc-framework-GameKit] [devel/py-pyobjc-framework-CryptoTokenKit] [devel/py-pyobjc-framework-ColorSync] [devel/py-pyobjc-framework-GameplayKit] [devel/py-pyobjc-framework-NetworkExtension] [lang/python37] [devel/py-pyobjc-framework-CoreServices] [devel/py-pyobjc-framework-CoreAudio]

Required to build:
[pkgtools/cwrappers]

Version history: (Expand)


CVS history: (Expand)


   2025-12-30 15:18:30 by Adam Ciarcinski | Files touched by this commit (155) | Package updated
Log message:
py-pyobjc: updated to 12.1

12.1

12.0 incorrectly has support for Python 3.9 in
packaging metadata.

Update framework bindings for the macOS 26.1 SDK

Instances of :type:bytearray can be used as the argument for
a function or selector that expects a null-terminated C char array.

Automatically disable KVO usage for subclasses of NSProxy defined
in Python.

Fix SystemError when calling objc.propertiesForClass(objc.objc_object).

objc.classAddMethods no longer supports callable's whose __name__
attribute is a byte string.

Clearer error messages when an entry in the methods added with
objc.classAddMethod is invalid.

Using objc.classAddMethods to add a method for which a custom
IMP helper has been registered now works correctly (previously
the default libffi IMP implementation was used in these cases),
and likewise for using :funcsetattr to assign methods.

It is no longer possible to use :func:objc.classAddMethods to
override an existing method with an incompatible Objective-C signature,
and likewise for using :func:setattr to do the same.

It was already not possible to override a method from a super class
with an incompatible Objective-C signature.

It is now possible to use an :class:objc.objc_method instance
in the method list argument for :func:objc.classAddMethod.

-[OC_PythonObject copy] now actually copies the value if the
value is not known to be immutable (such as subclasses of the
builtin number types).
   2025-07-11 11:04:11 by Adam Ciarcinski | Files touched by this commit (302) | Package updated
Log message:
py-pyobjc*: updated to 11.1

11.1

The major change in this release is aligning behaviour of the core bridge
with clang's documentation for automatic reference counting \ 
<https://clang.llvm.org/docs/AutomaticReferenceCounting.html>_
for initializer methods. In particular, PyObjC now correctly models
that methods in the "init" family steal a reference to self and return
a new reference.
   2025-06-18 17:24:47 by Adam Ciarcinski | Files touched by this commit (2)
Log message:
py-pyobjc-core: fix build with older Clang
   2025-04-23 14:45:25 by Adam Ciarcinski | Files touched by this commit (192)
Log message:
py-pyobjc*: fix for setuptools>=78; bump revisions
   2025-02-05 09:05:44 by Adam Ciarcinski | Files touched by this commit (303) | Package updated
Log message:
py-pyobjc: updated to 11.0

Version 11.0
The major change in this release is experimental support for free-threading (PEP \ 
703) which was introduced as an experimental feature in Python 3.13.

This required fairly significant changes in the core of PyObjC to change C \ 
Python API use and PyObjC internal APIs (mostly related to the use of borrowed \ 
references).

Dropped support for Python 3.8. PyObjC 11 supports Python 3.9 and later.

Updated metadata for the macOS 15.2 SDK, including bindings for the following \ 
frameworks:

MediaExtension
DeviceDiscoveryExtension
Added minimal bindings to the Carbon framework.

At this time only some functions and constants related to hotkeys are available. \ 
Please file an issue if you have a usecase for other APIs.

Struct wrappers now support a number of functions from copy: copy.replace() (new \ 
in Python 3.13), copy.copy() and copy.deepcopy().

The __pyobjc_copy__ method has been removed from struct wrappers. This was never \ 
a public API. Use copy.deepcopy() instead.

objc.FSRef.from_path`() now supports os.PathLike values as its arguments (as \ 
well as strings).

Experimental support for the free-threading mode introduced in Python 3.13.

The core bridge and framework bindings claim compatibility with free-threading \ 
as introduced as an experimental feature in Python 3.13.

The support in PyObjC is also an experimental feature: I’ve reviewed code for \ 
free-threading issues and adjusted it where needed, but the code has seen only \ 
light testing w.r.t. concurrency.

Some functionality that’s explicitly not thread-safe:

Defining an Objective-C class with the same name in multiple threads concurrently.

Splitting calls to alloc and init and calling init multiple times concurrently. E.g.:

import threading
from Cocoa import NSObject

v = NSObject.alloc()

t_list = []
for _ in range(2):
    t = threading.Thread(target=lambda: v.init())
    t_list.append(t)
    t.start()

for t in t_list:
    t.join()
The internal mapping from Python values to their active Objective-C proxy value \ 
now uses weak references. This should not affect user code, other than being a \ 
bit more efficient.

The internal interfaces for updating this mapping, and the reverse mapping from \ 
Objective-C values to their active Python proxy was changed to remove a small \ 
race condition. This was required for free threading support, but could in \ 
theory also bit hit when using the GIL.

The data structure for mapping Python values to their Objective-C proxy has been \ 
rewritten to support free threading. This also simplifies the code, and should \ 
be small performance improvement for the regular build of Python.

The TypeError raised when passing a non-sequence value to some APIs implemented \ 
in C now has a __cause__ with more detailed information.

This is a side effect of dropping the use of PySequence_Fast in the \ 
implementation of PyObjC.

Removed objc.options._nscoding_version, a private option that is no longer used.

Changing the __block_signature__ of a block value when the current value of the \ 
signature is not None is no longer possible.

Please file an issue if you have a use case for changing the signature of a block.

Fix compatibility with Python 3.14 (alpha 3)

Removed private function objc._sizeOfType because its unused.

Fix memory leak when using Python callables as blocks.

The memory leak also resulted in leaking a reference to the callable (and hence \ 
anything kept alive by that reference).

The generic __new__ implementation now works as intended when registering \ 
methods that other than init... methods.

Dropped ‘%n’ support in handling printf-format strings for variadic \ 
functions and methods.

Two reasons for that: 1) supporting this properly should return the value \ 
writing to the %n location (requiring significant changes) and 2) Apple’s \ 
libraries require using static strings for ‘%n’ to work (at least on some \ 
platforms and versions of the OS)

Fix manual bindings for AVAudioPCMBuffer methods for getting channel data \ 
(floatChannelData, int16ChannelData and int32ChannelData)

fix broken bindings for CGWindowListCreateImageFromArray.

The private __is_magic attribute on objc.objc_object has been renamed to \ 
__pyobjc_magic_coookie__.

Various fixes to edge case behaviour that were found while improving test coverage.
   2024-11-11 08:29:31 by Thomas Klausner | Files touched by this commit (862)
Log message:
py-*: remove unused tool dependency

py-setuptools includes the py-wheel functionality nowadays
   2024-06-11 18:10:28 by Adam Ciarcinski | Files touched by this commit (150) | Package updated
Log message:
py-pyobjc*: updated to 10.3.1

Version 10.3.1

Ensure __init__ can be used when user implements __new__.

Version 10.3 dropped support for calling __init__, but that breaks a number of \ 
popular projects. Reintroduce the ability to use __init__ when a class or one of \ 
its super classes contains a user implemenentation of __new__.

Code relying on the __new__ provided by PyObjC still cannot use __init__ for the \ 
reason explained in the 10.3 release notes.
   2024-04-02 19:26:02 by Adam Ciarcinski | Files touched by this commit (150) | Package updated
Log message:
py-pyobjc*: updated to 10.2

Version 10.2
Fix a number of warnings found by adding -Wpendantic to the CFLAGS for pyobjc-core

Fix undefined behaviour warnings:

Suppress the undefined behaviour warning about out of range values in double to \ 
(unsigned) long long in the OC_PythonNumber implementation as these are \ 
unavoidable when matching NSNumber behaviour.
Switch to using memcpy instead of direct assignment in converting plain C values \ 
to/from Python because “packed” structs might result in accessing values \ 
through unaligned pointers.
Updated bindings for the macOS 14.4 SDK (Xcode 15.3)

Added bindings for the “BrowserEngineKit” framework on macOS 14.4 or later.

Add obj.registerPathType() to register a Python type as a path like type with \ 
PyObjC. By default only pathlib.Path is registered as such.

A minor backward compatibility issue is that instances of the registered types \ 
will be written to NSArchive and NSKeyArchive archives as instances of NSURL and \ 
won’t roundtrip back to the original Python type. This might change in future \ 
versions of PyObjC, at least for pathlib.Path.

Instances of pathlib.Path (and other types registered with \ 
objc.registerPathType) are bridged into Objective-C as instances of NSURL.

This means that these types can be used as values passed to APIs expecting a \ 
filesystem URL, e.g.:

```python

path = pathlib.Path(“/Applications/Numbers.app”) bundle = \ 
NSBundle.bundleWithURL_(path) ```

Fix some warnings in pyobjc-core when testing with Python 3.13a4.

Add support for NSBezierPathElementQuadraticCurveTo in \ 
NSBezierPath.elementAtIndex_associatedPoints_.

Fix compilation error in pyobjc-framework-Cocoa with a recent deployment target.