PyObjC-framework-carbon provides Python bindings for the Carbon framework on macOS. Carbon is an older API set largely deprecated by Apple in favor of Cocoa. This library is part of the larger PyObjC project, which offers comprehensive Objective-C-Python bridging and wrappers for numerous macOS frameworks. The current version is 12.1, and PyObjC typically releases new versions in sync with major macOS SDK updates and Python version support changes.
pip install pyobjc-framework-carbonVerified import paths — ran on the pinned version, not inferred.
This quickstart attempts to retrieve a reference to the current Carbon Event Loop using a direct Carbon C API call wrapped by PyObjC. It includes error handling to acknowledge that Carbon APIs are deprecated on modern macOS and might not always succeed.
Migrate your application logic to use Cocoa (AppKit/Foundation) frameworks instead of Carbon. Consult Apple's documentation for equivalent Cocoa APIs.
Upgrade your Python environment to version 3.10 or newer. PyObjC generally follows Python's end-of-life cycle.
Review custom `objc` class initializers and `alloc`/`init` patterns for potential memory management changes when upgrading from `pyobjc-core < 11.1`. Ensure references are managed as expected under the new ARC rules.
Thoroughly test custom `objc` class implementations, especially those overriding both `__init__` and `__new__`, when upgrading PyObjC. Consult the 10.3.x release notes for precise behavior changes.