Description
PyObjC is a bridge between Python and Objective-C. It allows full featured Cocoa applications to be written in pure Python. It is also easy to use other frameworks containing Objective-C class libraries from Python and to mix in Objective-C, C and C++ source. Python is a highly dynamic programming language with a shallow learning curve. It combines remarkable power with very clear syntax. PyObjC also supports full introspection of Objective-C classes and direct invocation of Objective-C APIs from the interactive interpreter. Project links ------------- * `Documentation <https://pyobjc.readthedocs.io/en/latest/>`_ * `Issue Tracker <https://github.com/ronaldoussoren/pyobjc/issues>`_ * `Repository <https://github.com/ronaldoussoren/pyobjc/>`_
Release History
| Version | Changes | Urgency | Date |
|---|---|---|---|
| 12.1 | Imported from PyPI (12.1) | Low | 4/21/2026 |
| v12.1 | * #661: 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 who | Low | 11/14/2025 |
| v12.0 | * Drop support for Python 3.9, which will go out of support before PyObjC 3.12 is released. * Added ``AVFAudio`` as a separate toplevel package, instead of keeping it merged in into ``AVFoundation``. The package is included in the ``pyobjc-framework-AVFoundation`` distribution. * Updated metadata for the macOS 26 SDK. As part of this introduce bindings for the following new framework bindings: - ARKit - CompositorServices - GameSave There are no bindings for | Low | 10/21/2025 |
| v11.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. In previous version of PyObjC the proxy for ``[NSObject alloc]`` would be marked as 'partially initialized' and would be cleared when the | Low | 6/14/2025 |
| v11.0 | Version 11.0 ------------ The major change in this release is experimental support for free-threading (`PEP 703 <https://peps.python.org/pep-0703/>`_) 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 | Low | 6/14/2025 |
| v10.3.2 | * Fix a number of test failures on macOS 15 These are all documentation and test updates. * #593: PyObjCTools.AppHelper.runConsoleEventLoop no longer exits the process on macOS 14 or later when stopping the event loop. * #613: Actually expose protocols ``KHTTPCookieStoreObserver``, ``WKURLSchemeTask``, and ``WKURLSchemeHandler`` in the WebKit bindings. * Remove workaround for a linker problem in early versions of Xcode 15, which restores support for building with Xcode Command Line to | Low | 11/30/2024 |
| v10.3.1 | * #610: 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. | Low | 6/11/2024 |
| v10.3 | * The release contains binary wheels for Python 3.13 PyObjC does at this time not support the experimental free threading support in Python 3.13. * #569: Removed the workaround for a bug in Xcode 15.0 The workaround is no longer necessary, and caused problems when building with the Command Line Tools development tools from Apple. * Updated SDK bindings for macOS 14.5 * A minor change in the (currently private) tooling I use for collecting the raw metadata resulted in | Low | 5/28/2024 |
| v10.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 res | Low | 5/28/2024 |
| v10.1 | * Upgrade framework bindings for the macOS 14.2 SDK * #579: Make sure the ``install.py`` and ``develop.py`` scripts in the repository work when run out of tree. * #577: ``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. * #572: Fix compilation issue when building on macOS 1 | Low | 12/9/2023 |
| v10.0 | * Update bindings for macOS 14 Symbols newly introduced in macOS 14 were added to the existing bindings, and the following new bindings were introduced: * Cinematic * MediaExtension * SensitiveContentAnalysis * Symbols * The "IMServicePlugIn" bindings are no longer available The entire framework was deprecated in macOS 10.13 and removed in macOS 14. The bindings can not be build using the latest SDK, and had (at best) limited use. * #542: PyObjC 10 re | Low | 12/9/2023 |
| v9.2 | * #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: ```python3 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 ``` | Low | 6/7/2023 |
| v8.5.1 | This release contains a small number of bug fixes, most import of which is support for Python 3.11 | Low | 9/24/2022 |
| v8.5 | This release continues the work on test coverage in pyobjc-core, resulting in a number of minor bug fixes. * Added two options to the ``build_ext`` command in the ``setup.py`` of pyobjc-core: - ``--no-lto``: Disable link time optimization - ``--no-warnings-as-errors``: Disable ``-Werror`` * For struct bindings in frameworks the "in" operator no longer swallows exceptions raised by the ``__eq__`` method. * Improved handing of invalid type encodings for struct types. * | Low | 4/19/2022 |
| v8.4.1 | This is a bug fix release. * #455: ``pip install pyobjc`` on a macOS 12.2 machine tried to install ``pyobjc-framework-ScreenCaptureKit``, which is only can be installed on macOS 12.3 or later. * #456: Fix bad metadata for ``HIServices.AXIsProcessTrustedWithOptions`` * Wheels were build with Xcode 13.3 RC There are no changes in framework bindings relative to PyObjC 8.4 because there are no relevant API changes in Xcode 13.3 RC. | Low | 3/15/2022 |
| v8.4 | * The bindings for the Message and ServerNotification frameworks, which were removed in macOS 10.9, will be removed in PyObjC 9. * Added bindings for ScreenCaptureKit (new in macOS 12.3) * Updated framework bindings for the macOS 12.3 SDK. Based on Xcode 13.3 beta 3 * Reverted a change in 8.3: It is once again not possible to use the "is" operator to check if two proxies for an NSString refer to the same Cocoa object. The change in 8.3 changed long standng behaviour | Low | 3/7/2022 |
| v8.0 | ## Backward incompatible changes * In PyObjC 7 and earlier it was possible to leave out "output" arguments when calling a method with a Python implementation: .. sourcecode:: python class MyClass(NSObject): @objc.typedSelector(b"@@:o^@") def methodWithOutput_(self, a): return 1, 2 o = MyClass.alloc().init() print(o.methodWithOutput_()) This no longer works, it is always necessary to pass in all arguments, which | Low | 2/24/2022 |
| v8.2 | This release contains a lot of little fixes due to improving test coverage of the C code in pyobjc-core. These are mostly fixes for edge cases that don't happen in normal programs. * Reintroduce binary wheels for Python 3.6 PyObjC 8.x still supports Python 3.6, but I didn't ship binary wheels until now. I plan to explicitly remove support for Python 3.6 in PyObjC 9, which will include updating package metadata to ensure that users of Python 3.6 will keep using PyObjC 8.x. | Low | 2/24/2022 |
| v8.3 | This release contains a lot of small fixes dueo to the continued improvement of test coverage for the C code in pyobjc-core. * Backward incompatible change: ``-[OC_PythonDictionary setObject:value forKey:[NSNull null]]`` now sets key :data:`None` in the Python dictionary instead of ``NSNull.null()``. This is for consistency with ``-[OC_PythonDictionary objectForKey:]`` and other collection classes. Getting and setting key ``[NSNull null]`` now actually works. * Backward | Low | 2/24/2022 |
| v7.3 | With WWDC and beta of a new major release of macOS approaching fast it is high time to push out a new release for PyObjC. PyObjC 7.3 is primarily a bugfix release, with one minor feature. I expect this to be the last release for PyObjC 7.x and will start working on PyObjC 8 soon. - issue 356: Explicitly error out when building for unsupported architectures "python setup.py build" will now fail with a clear error when trying to build PyObjC for a CPU architecture that is n | Low | 6/7/2021 |
| v6.2.2 | * #311: Build for the Metal bindings failed on macOS 10.14 * #309: Fix incompatibility with macOS 11 in framework loader * Another attempt at giving a nice error message when trying to install on platforms other than macOS. * The classifiers now correctly identify supported Python versions | Low | 7/8/2020 |
| v6.2.1 | * Issue #299: Ensure package 'pyobjc' won't try to build the PubSub bindings on macOS 10.15 Reported by Thomas Buchberger * Minor tweaks to build and pass tests on macOS 10.14 with the latest Xcode that can be installed on that version of macOS. * Issue #300: Fix SystemError in block edge case PyObjC raised a SystemError when converting a callable into an ObjC block when the callable is a bound method without positional arguments. * Issue #275: Fix crash on catalina c | Low | 6/14/2020 |
| v6.2 | * The project has moved from Bitbucket to Github * Remove most remnants of Python 2 support * Clean up code quality issues found using flake8 * Add pre-commit hook to run black on all Python code. * #290: Fix protocol conformance testing when explicitly implementing a protocol Before this bugfix a class explicitly conforming to a protocol could not implement any method that wasn't declared in the protocol, the bridge would erroneously raise an exception when checking the a | Low | 3/25/2020 |
| v3.0 | * Issue #50: Accessing Objective-C methods on "magic cookie" variables, like ``LaunchServices.kLSSharedFileListItemLast`` would crash the interpreter. This affected code like:: from LaunchServices import kLSSharedFileListItemLast kLSSharedFileListItemLast == kLSSharedFileListItemLast dir(kLSSharedFileListItemLast) kLSSharedFileListItemLast.compare_ * Added a decorator "python_method" than can be used to decorate methods that should not be registered | Low | 2/29/2020 |
| v3.0.1 | * Issue #86: Fix installation issue with setuptools 3.6. * Issue #85: Remove debug output from the wrapper for ``NSApplicationMain``. * Issue #82: NSArray.__iter__ was accedently removed in PyObjC 3.0 * PyObjCTools.Debugging didn't work properly on recent OSX versions (at least OSX 10.9) because ``/usr/bin/atos`` no longer worked. | Low | 2/29/2020 |
| v3.0.3 | * Fix a number of OSX 10.10 support issues. | Low | 2/29/2020 |
| v3.0.4 | * Fix installation on OSX 10.10 when using "pip install pyobjc". Issues #102, #103. * Fix crash when ``sys.modules`` contains an object that is not a string. Issue #95. * Fix crash on OSX 10.8 or later when using a 32-bit build and accessing an instance of "Object" (that is, pre-Nextstep classes). * Fix a crash when using blocks without metadata, but with a block signature from the block runtime. Issue #106 * ``PyObjCTools.MachSignals`` likely hasn't worked at al | Low | 2/29/2020 |
| v3.1 | * Fix value of ``FLT_MAX`` and ``FLT_MIN`` in framework bindings. * Fix for the functions in ``PyObjCTools.AppHelper``: those functions didn't work correctly when the calling thread didn't have a runloop. Patch by Max Bélanger. * Issue #126: Load the LaunchServices definitions through the CoreServices umbrella framework to avoid problems on OSX 10.11. * Issue #124: Sporadic crash at program shutdown due to a race condition between Python interpreter shutdown and Cocoa clea | Low | 2/29/2020 |
| v3.2 | **Backward compatibility note:** Due to a change in the way the default method signature is calculated PyObjC is now more strict in enforcing the Python<->Objective-C mapping for selectors and a number of code patterns that were allowed before are no longer allowed, in particular the following method definitions raise ``objc.BadPrototypeError``:: class MyObject (NSObject): def mymethod(self, a, b): ... def method_arg_(self, a, b, c): ... If these methods are only used | Low | 2/29/2020 |
| v3.2.1 | Updates: * Small change to the shared setup.py code for framework wrappers to allow building wheels for wrappers without a C exention on any system. This was mostly done to make it easier to provide wheels in future releases. Bugfixes: * Avoid build error with Python 2.7 when using the OSX 10.12 SDK, triggered when Python was build using MacPython support. * Compatibility definitions for MAC_OS_X_VERSION_10_10, MAC_OS_X_VERSION_10_11 and MAC_OS_X_VERSION_10_12 were wr | Low | 2/29/2020 |
| v4.0b1 | * Removed PyObjCTools.TestSupport.filterWarnings, use warnings.catch_warnings instead. * Building pyobjc-core using "python setup.py develop" will use 'ccache' when available. * Building pyobjc-core will compile the source files from new to old files, to speed up feedback while working on the source code. * Legacy BridgeSupport files on macOS 10.13 (which aren't used by default by PyObjC) can contain junk data in typestring data. Cleanup that data before using it. * De | Low | 2/29/2020 |
| v4.0 | * Issue #204: Metadata for CGPDFDictionaryGetObject was wrong Reported by Nickolas Pohilets. * Updated metadata for Xcode 9 GM. * Fix #202: Add bindings for ``CGPDFDictionaryRef``, ``CGPDFScannerRef`` ``CGPDFStreamRef`` and ``CGPDFStringRef`` to the Quartz bindings (including some minor updates to function metadata) Reported by Nickolas Pohilets. * Issue #205: Add ability to read bytes from ``objc.varlist`` Instances of ``objc.varlist`` now have a method to return a | Low | 2/29/2020 |
| v4.0.1 | * Issue #213: Fix signature for ```-[NSObject forwardInvocation:]``` Reported by user "pyrocat" * Updated metadata for Xcode 9.1 * Changes to PyObjCTools.TestSupport to be able to include/exclude tests based on the minor release of macOS. * Some tweaks to fix test failures when running on OSX 10.5, 10.6, 10.9. NOTE: The stacktrace formatting of in ``PyObjCTools.Debugging`` (from the ExceptionHandling bindings) don't work for PPC binaries because symbol resolutio | Low | 2/29/2020 |
| v4.1 | * Protection agains buffer overflow and negative indexes in ``__getitem__`` and ``__setitem__`` for ``objc.varlist`` instances. * Fix incorrect metadata for ``+[NSEvent addLocalMonitorForEventsMatchingMask:handler:]`` * Fix incorrect and misleading error message in the exception that is raised when return a value from a block that should not return a value. * Issue #223: Fix hard crash when executing ``help(Cocoa)`` Fetching the help for PyObjC framework wrappers isn't ver | Low | 2/29/2020 |
| v4.2 | * Add bindings to the BusinessChat framework introduced in macOS 10.13.4 * Update metadata for Xcode 9.3 * Issue #233 Fix crash in Security.AuthorizationCopyRights() wrapper * Issue #234 Fix crash in AuthorizationExecuteWithPrivileges() wrapper Reported by Vangelis Koukis * Ensure doctest can work with modules containing subclasses of NSObject Reported by Just van Rossum * Issue #236 : Importing can sometimes fail in multi-threaded scenarios Fix by Max Bélanger * | Low | 2/29/2020 |
| v4.2.1 | * Update metadata for Xcode 9.4 beta 2 (no changes) * Restore autodetection of --with-system-ffi, but ignore this python setting for /usr/bin/python because Apple doesn't ship libffi headers. | Low | 2/29/2020 |
| v4.2.2 | * Update metadata for Xcode 9.4 * The binary release now includes wheels for both variants for the Python.org installer for python 3.6 and 3.7: 32- and 64-bit for macOS 10.6 or later, and 64-bit only for macOS 10.9 or later. * Ensure the context manager for ``NSAnimationContext`` defined in ``PyObjCTools.AppCategories`` actually works. * Fix convenience wrappers for ``Foundation.NSCache``. * Fix convenience wrappers for ``Foundation.NSHashTable``. | Low | 2/29/2020 |
| v5.0a1 | * Adds support for macOS 10.14 (Mojave) This release updates the framework wrappers with support for new APIs in macOS 10.14 and adds bindings for the following new frameworks: - AdSupport - CoreAudio (new in macOS 10.0) - CoreAudioKit (new in macOS 10.4) - CoreMedia (new in macOS 10.7) - CoreMediaIO (new in macOS 10.7) - DiscRecording (new in macOS 10.2) - DiscRecordingUI (new in macOS 10.2) - DVDPlayback (new in macOS 10.3) - MediaToolbox - NaturalLan | Low | 2/29/2020 |
| v5.0b1 | * Bindings updated for Xcode 10 beta 6. * Add a custom binding for a number of structure types in CoreAudio: - AudioBuffer - AudioBufferList - AudioChannelDescription - AudioChannelLayout - AudioValueTranslation With this patch using APIs with these types should actually work. * PR19: Fix deprecation warning in bridgesupport support module Patch by: Mickaël Schoentgen * Creating objc.ObjCPointer instances now results in a Python warning, instead of an | Low | 2/29/2020 |
| v5.0 | Version 5.0 of PyObjC primarily adds support for macOS 10.14 (mojave), and also adds support for a couple of older frameworks that weren't supported before. | Low | 2/29/2020 |
| v5.1 | * Xcode 10 "GM" contains one difference from the last beta: the constant MLComputeUnitsCPUAndGPU in the CoreML bindings. * #222: Add a proxy for C's "FILE*" type on Python 3. This is not necessary on Python 2 because the default IO stack on Python 2 already uses FILE* internally. This proxy type is very minimal and shouldn't not be used for general I/O. * Bindings are up-to-date w.r.t. Xcode 10.1 (beta) * Updated the support code for framework wrappers to be able to emit depr | Low | 2/29/2020 |
| v5.1.1 | * Update metadata for Xcode 10.1 | Low | 2/29/2020 |
| v5.1.2 | * #254: Fix compile error on macOS 10.9 or earlier * #255: Calling completion handler failed due to incomplete runtime info PyObjC's metadata system didn't automaticly set the call signature for blocks passed into a method implemented in Python. This causes problems when the ObjC or Swift block does not have signature information in the ObjC/blocks runtime. * Use MAP_JIT when allocating memory for the executable stubs for Python methods. With the "restricted" runtime | Low | 2/29/2020 |
| v5.2 | * Updated metadata for Xcode 10.2 * #252: ``objc.registerStructAlias`` no longer emits a deprecation warning because it is still used by the framework wrappers. The function is still deprecated though, the deprecation will reappear once the metadata has been updatd. * #75: The core bridge now uses :func:`PyDict_GetItemWithError`, which may result in exceptions being raised that were previously swallowed. * #247: Partially switch to the new buffer API instead of the older | Low | 2/29/2020 |
| v5.3 | * PR 21: Switch xcodebuild invocation to xcrun for sdk path Patch by Clément Bouvier * #271: Fix crash when creating NSData objects on macOS 10.15 * Fix compile error on macOS 10.15 | Low | 2/29/2020 |
| v6.0 | * Removed Python 2 support from the C extension in pyobjc-core * Reformatted code in pyobjc-core: - Use "black" for Python code - Use "clang-format" for Objective-C code As a side-effect of this all usage of "NS_DURING" and "PyObjC_DURING" has been replaced by the expansion of those macros, mostly because "clang-format" doesn't understand these kinds of blocks. Replacing "PyObjC_DURING" by its expansion also reduces the knowledge needed to understand what' | Low | 2/29/2020 |
| v6.0.1 | * #277: Remove debug print accidently left in production * #278: Surpress "-Wunguarded-availability" warnings in the extension AppKit._inlines | Low | 2/29/2020 |
| v6.1 | * Updated for the macOS 10.15.1 SDK (Xcode 11.2) * Fix reference counting in -[OC_PythonData length], which resulted in use-after-free. * #281: Fix problems found in pyobjc-core by the clang static analyser | Low | 2/29/2020 |
