Path to this page:
./
devel/py-pyobjc-framework-Vision,
Wrappers for the framework Vision on macOS
Branch: CURRENT,
Version: 12.2,
Package name: py313-pyobjc-framework-Vision-12.2,
Maintainer: pkgsrc-usersThe 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.
This package contains wrappers for framework 'Vision'.
Required to run:[
devel/py-setuptools] [
devel/py-pyobjc-core] [
devel/py-pyobjc-framework-Cocoa] [
devel/py-pyobjc-framework-Quartz] [
devel/py-pyobjc-framework-CoreML] [
lang/python37]
Required to build:[
pkgtools/cwrappers]
Master sites:
Filesize: 70.881 KB
Version history: (Expand)
- (2026-06-03) Updated to version: py313-pyobjc-framework-Vision-12.2
- (2025-12-30) Updated to version: py313-pyobjc-framework-Vision-12.1
- (2025-10-24) Updated to version: py313-pyobjc-framework-Vision-11.1
- (2025-10-24) Package has been reborn
- (2025-10-24) Package deleted from pkgsrc
- (2025-07-15) Package has been reborn
CVS history: (Expand)
2026-06-03 13:44:18 by Adam Ciarcinski | Files touched by this commit (153) |  |
Log message:
py-pyobjc: updated to 12.2
12.2
Update framework bindings for macOS 26.5 SDK
The following code failed at the last line in previous versions:
class MyObject(NSObject):
pass
obj = MyObject()
obj.alloc = MyObject.alloc
print(obj.alloc) # Raised AttributeError
Backward incompatible changes: CFBagCreate and CFBagCreateMutable now match the \
API in Objective-C, that is, a value for the callbacks argument must be passed \
(must be kCFTypeBagCallBacks).
* Fix retain count management for the callbacks registered with \
DARegisterDiskEjectApprovalCallback, DARegisterDiskMountApprovalCallback, and \
DARegisterDiskUnmountApprovalCallback in DiskArbitration bindings.
“Hidden” instance methods were not hidden when looking them up as an \
attribute on the class, but found an unbound method as if the method was not \
hidden.
“Hidden” instance methods were visible in dir(SomeClass).
* Fix anObject.methodForSelector_(some_selector) resolving to a class method IMP \
when a bound selector object for some_selector is a class attribute.
Fixed some memory leaks on unlikely error paths.
* numbers.Number values are proxies as an NSNumber value.
* the new of Objective-C classes now also support keyword arguments derived from \
class selectors of the form valueWithKey1:key2: (with an arbitrary prefix \
instead of value).
The following calls are now possible (as examples):
Foundation.NSHost(address="www.python.org"), returns \
Foundation.NSHost.hostWithAddress_("www.python.org").
AppKit.NSImage(systemSymbolName="multiply.circle.fill", \
accessibilityDescription="multiply icon"), returns \
AppKit.NSColor.colorWithSystemSymbolName_accessibilityDescription_("multiply.circle.fill", \
"multiply icon").
Add NSMutableData.take_bytes on Python 3.15 to mirror the new bytearray method \
of the same name.
Rewrite the construction of objects representing method and function metadata, \
this should result in (slightly) less memory usage.
This release gets the testsuite for pyobjc-core to a point where there is \
comprehensive test coverage for the entire bridge. All extension modules now \
have 100% test coverage according to lcov, although with use for exclusion \
comments to ignore code blocks that cannot be reached for various reasons (e.g. \
PyDict_New can fail, but that only happens when running out of memory and it not \
preproducable during testing).
This enables refactoring the code in pyobjc-core with more confidence that this \
won’t result in unexpected changes in behaviour.
Fix error message for invalid argument to a callable with a variable length \
output buffer argument.
Fix error handlign for incomplete struct encodings.
Raise better error when specifying a negative array size for (Objective-)C \
arguments where the size of a buffer is passed as one of the arguments to a \
method or function.
A side effect of this is that a number of manual bindings no longer support \
passing -1 as the size of a buffer to derive the size from the Python sequence.
A Python implementation for a method that returns void and has a single output \
parameter used to leak a reference to the return value.
Fix crash when a Python implementation with a pass-by-reference output argument \
or return value returns an Objective-C instance that is no longer referenced in \
Python when the function returns, e.g.:
@objc.objc_method(signature=b"@@:o^@")
def myOutput_(self, a):
return (1, NSObject.alloc().init())
The bridge could pass a null pointer for a function pointer argument in some \
(unlikely) edge cases instead of raising an error.
Fix various crashes related to edge cases in pass-by-reference argument handling \
(none of which happen are used in bindings for Cocoa frameworks)
Metadata with a tuple as the value for c_array_length_in_arg for an output \
argument is now honored for methods implemented in Python.
Fix crash when c_array_length_in_arg metadata refers to an non-existing argument.
Fix handling of transient proxy value, such as when Objective-C calls a Python \
method when the object is kept alive from Objective-C (no active reference in \
Python).
Edge case found while debugging an unexpected crash in the free-threaded build \
which uncovered a bug that also affected the regular build (but was not \
triggered there in the test suite).
aValue.methodForSelector_ now works when the selector is implemented in Python, \
the result will be the Python callable (not wrapped in an objc.IMP value).
* A number of constants in the CoreAudio bindings evaluated to byte strings, \
while the framework expects regular strings.
Foundation.NSDecimalNumber can no longer be subclassed in Python.
Subclasses was possible in older versions, but this is something that isn’t \
supported in Objective-C and has unexpected behaviour.
The cobject and c_void_p arguments for opaque pointer types and objc.objc_object \
are now keyword only.
This should not affect user code because passing these values by value isn’t \
useful (esp. because the c_void_p argument is the only one that’s useful for \
interop with 3th-party code).
* “frozendict” is supported with Python 3.15a7 and later.
Instances roundtrip to Objective-C objects similarly as the dict type, including \
for keyed archiving. For non-keyed archiving a frozendict value is read back as \
a plain dict.
The metadata method on objc.function, objc.selector, and objc.IMP now returns a \
frozendict instead of a regular dict to indicate that changing the value has no \
effect.
* Drop GIL when sending KVO notifications
PR by github user Tim Clem.
* Drop dependency on dis.dis
PR by github user Max Bélanger.Update framework bindings for macOS 26.5 SDK
|
2025-12-30 15:18:30 by Adam Ciarcinski | Files touched by this commit (155) |  |
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) |  |
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-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) |  |
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-06-11 18:10:28 by Adam Ciarcinski | Files touched by this commit (150) |  |
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) |  |
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.
|
2024-01-23 23:15:03 by Adam Ciarcinski | Files touched by this commit (154) |  |
Log message:
py-pyobjc*: updated to 10.1
Version 10.1
Upgrade framework bindings for the macOS 14.2 SDK
Make sure the install.py and develop.py scripts in the repository work when run \
out of tree.
os.fspath(someURL) will not work with Cocoa URLs (NSURL, CFURLRef) that refer to \
local filesystem paths. TypeError will be raised for other URLs.
This enables using regular Python filesystem APIs with URLs that refer to local \
filesystem paths.
Fix compilation issue when building on macOS 13 or earlier
Fix build error on ancient macOS versions where clang doesn’t support -flto=thin.
Add a workaround for a crash in pyobjc-core when running the testsuite on macOS \
10.14.
Fix some issues found while running the testsuite on macOS 10.9 to macOS 13, \
instead of only testing on the latest macOS version. Most issues found where \
problems in the testsuite itself, but not all.
Some of the changes skip tests on older macOS versions (10.12, 10.13 and 10.14) \
due to running into what appears to be crashing platform bugs.
Fix dependencies between framework binding packages
Fix build error with the current Python 3.13 alpha release (3.13a2).
|