Registry / pyobjc-framework-preferencepanes

pyobjc-framework-preferencepanes

JSON →
library12.2pypypiunverified

This library provides Python wrappers for Apple's `PreferencePanes.framework` on macOS, allowing Python applications to interact with or create System Preference panes. It's part of the larger PyObjC project, which offers Python bindings for many macOS frameworks. The current version is 12.1, with releases closely following macOS SDK updates and Python version support cycles.

pip install pyobjc-framework-preferencepanes
INSTALL
IMPORT
SIG · PYOBJC-FRAMEWORK-P
P
pyobjc-framework-preferencepanes
pythonv12.2
Install
Import
Disk
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.920 runs
build_error
glibc
py 3.103.920 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

NSPreferencePane
from PreferencePanes import NSPreferencePane
The primary class for creating or interacting with Preference Panes.

This quickstart attempts to import the main class from the `PreferencePanes` framework. It includes a critical warning about the framework's deprecation by Apple, which impacts its usability on modern macOS versions. It then demonstrates basic interaction by getting the main application bundle ID, a common pattern in macOS development.

import sys import platform from Foundation import NSBundle # Check macOS version as PreferencePanes.framework is deprecated macos_version_tuple = tuple(map(int, platform.mac_ver()[0].split('.'))) if macos_version_tuple >= (13, 0): print("Warning: PreferencePanes.framework is deprecated in macOS 13+ (Ventura) and removed from the SDK in macOS 14+ (Sonoma).") print("This library's functionality is highly platform-dependent and may not work on recent macOS versions or with recent Xcode SDKs.") print("For modern macOS, consider using the Settings.framework or ServiceManagement.framework if applicable.") try: from PreferencePanes import NSPreferencePane print(f"Successfully imported NSPreferencePane: {NSPreferencePane}") # Example: Trying to access a system bundle to demonstrate framework interaction # Note: Creating a functional preference pane requires more complex setup (e.g., bundle structure, Info.plist) bundle = NSBundle.mainBundle() print(f"Main application bundle ID: {bundle.bundleIdentifier()}") except ImportError: print("Failed to import PreferencePanes. This usually means the framework is not available on your macOS version or SDK.") print("Ensure you are running on macOS 12 (Monterey) or earlier for full PreferencePanes functionality, or have an older SDK installed.") except Exception as e: print(f"An unexpected error occurred: {e}")
Debug
Known issues
breakingApple officially deprecated `PreferencePanes.framework` in macOS 13 (Ventura) and removed it from the SDK in macOS 14 (Sonoma). This PyObjC binding will likely not function correctly or be buildable on recent macOS versions or with modern Xcode SDKs. Consider alternative frameworks like `Settings.framework` (macOS 13+) or `ServiceManagement.framework` for modern macOS system settings interaction.
fix
Target older macOS versions or consider migrating to modern Apple APIs for system settings interaction.
affects: macOS 13+ (runtime), macOS 14+ (SDK/build)
breakingPyObjC 12.0 dropped support for Python 3.9. PyObjC 11.0 dropped support for Python 3.8. Ensure your Python version meets the `pyobjc-core` requirements for the installed PyObjC version.
fix
Upgrade Python to 3.10 or newer for PyObjC 12.x, or to 3.9 or newer for PyObjC 11.x.
affects: 11.0+
gotchaChanges in PyObjC 10.3 affected how `__init__` and `__new__` work for Python subclasses of Objective-C classes. While partially fixed in 10.3.1 for user-implemented `__new__`, code relying on PyObjC's provided `__new__` might still not be able to use `__init__`.
fix
Review Python subclass `__init__` and `__new__` implementations, especially if migrating from older PyObjC versions. Refer to PyObjC 10.3.1 release notes for details.
affects: 10.3 - 10.3.1
gotchaPyObjC 11.1 aligned its behavior with Clang's ARC documentation for initializer methods (those in the 'init' family). This means PyObjC now correctly models that 'init' methods steal a reference to `self` and return a new reference, potentially changing reference counting behavior for existing code that relied on the prior model.
fix
Review code that interacts with Objective-C initializer methods, particularly if manual reference counting or unusual object lifecycle management is involved.
affects: 11.1+
gotchaPyObjC does not fully support the experimental free-threading (PEP 703) introduced in Python 3.13. While experimental support was added in PyObjC 11.0, using PyObjC in a free-threaded Python environment might lead to unexpected behavior.
fix
Avoid using PyObjC with Python 3.13's experimental free-threading feature enabled. Monitor PyObjC releases for full free-threading compatibility.
affects: 10.3+, Python 3.13+
Upgrade
Version history
12.2latest on PyPI · released May 30, 2026
Audit
Dependencies
pyobjc-corerequiredProvides the core bridge between Python and Objective-C, required for all PyObjC framework bindings.
pyobjc-framework-FoundationoptionalOften implicitly required as Foundation is a base framework for many macOS APIs, including bundle management.
Agent activity
4 hits · last 30 days
node
4
Resources
pyobjc-framework-preferencepanes — pip install pyobjc-framework-preferencepanes · libregistry