Registry /
type-stubs / pyobjc-framework-colorsync
Install & Compatibility
Where this runs
tested against v? · pip install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.920 runs
build_error
glibcpy 3.10–3.920 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
ColorSync
✓ import ColorSync
✗ from pyobjc_framework_colorsync import ColorSync
PyObjC frameworks are imported directly by their framework name (e.g., `ColorSync`), not from the PyPI package name.
This example demonstrates how to import the ColorSync framework and use a common C-level function, `ColorSyncGetDefaultProfileID`, to retrieve the default color profile identifier for the primary display. This illustrates basic interaction with the framework's C APIs.
import ColorSync
import objc # Recommended for general PyObjC interaction as it sets up the bridge
# ColorSync interactions often involve C functions or Core Foundation types.
# Get the default profile ID for the primary display.
# The domain argument expects a byte string (e.g., b"display", b"output").
# The function returns a CFStringRef, which PyObjC automatically bridges to a Python string.
try:
display_profile_id = ColorSync.ColorSyncGetDefaultProfileID(b"display")
print(f"Successfully retrieved default display profile ID: {display_profile_id}")
except AttributeError:
print("Error: ColorSyncGetDefaultProfileID not found. Ensure the ColorSync framework is available and PyObjC is correctly installed on macOS.")
except Exception as e:
print(f"An unexpected error occurred while accessing ColorSync: {e}")
# This quickstart demonstrates importing the framework and calling a basic C-level function,
# which is a common pattern for interacting with some parts of PyObjC-wrapped frameworks.
Debug
Known issues
breakingPyObjC frequently drops support for older Python versions. Version 12.0 dropped Python 3.9, and version 11.0 dropped Python 3.8. Always check the `requires_python` metadata for compatibility.fixUpgrade to a supported Python version (e.g., 3.10+ for PyObjC 12.x) before upgrading `pyobjc-framework-colorsync` to avoid installation or runtime errors.
affects: >=11.0
breakingThe behavior of Objective-C initializer methods (methods in the 'init' family) was changed in PyObjC v11.1 to align with `clang`'s automatic reference counting (ARC) documentation. These methods now correctly 'steal' a reference to `self` and return a new one.fixCode that manually managed reference counts or made specific assumptions about initializer behavior at a low level (e.g., directly with `CFTypeRef` or `objc.object` instances) might need review. Most Python-level usage should remain unaffected.
affects: >=11.1
gotchaWhen implementing `__new__` in Python subclasses of Objective-C classes, the ability to call `__init__` on the created object was temporarily broken in v10.3 and partially restored in v10.3.1. However, code relying on the PyObjC-provided `__new__` still cannot use `__init__` for custom initialization.fixIf implementing `__new__`, ensure `__init__` is correctly invoked on the returned object if your class hierarchy supports it. For classes where PyObjC provides `__new__`, shift initialization logic to `__new__` or use alternative setup methods.
affects: 10.3, 10.3.1
breakingSpecific macOS frameworks or APIs may be deprecated or entirely removed in newer macOS versions. PyObjC bindings will also cease to be available or function for these removed frameworks. For example, 'IMServicePlugIn' bindings were removed in PyObjC 10.0 due to the framework's removal in macOS 14.fixConsult Apple's developer documentation for framework deprecations and target appropriate APIs. When migrating to a newer macOS and PyObjC version, be prepared to refactor code relying on removed frameworks.
affects: >=10.0
gotchaPyObjC 11 introduced experimental support for PEP 703 (free-threading) in Python 3.13, which required significant internal changes. While the library aims for compatibility, complex multi-threaded Objective-C interactions might behave unexpectedly.fixExercise caution when using PyObjC with free-threading enabled in Python 3.13+. Thoroughly test existing multi-threaded code and report any issues to the PyObjC project to aid in stabilization.
affects: >=11.0 (with Python 3.13+)
Upgrade
Version history
12.2latest on PyPI · released May 30, 2026
Audit
Dependencies
pyobjc-corerequiredThis package wraps a macOS framework and requires the core PyObjC bridge for Objective-C runtime interaction.