Registry / serialization / pyobjc-framework-diskarbitration

pyobjc-framework-diskarbitration

JSON →
library12.2pypypiunverified

This library provides Python wrappers for Apple's DiskArbitration framework on macOS, enabling programmatic interaction with disk management, mount/unmount events, and disk information. It is part of the larger PyObjC project, currently at version 12.1, with a release cadence often synchronized with macOS SDK updates and Python version support.

pip install pyobjc-framework-diskarbitration
INSTALL
IMPORT
SIG · PYOBJC-FRAMEWORK-D
P
pyobjc-framework-diskarbitration
serializationpythonv12.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.940 runs
build_error
glibc
py 3.103.940 runs
build_error
Code
Verified usage

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

DiskArbitration
import DiskArbitration

This quickstart demonstrates how to import the DiskArbitration framework and create a basic session. It verifies that the framework is correctly loaded and accessible, releasing the session immediately as a full-fledged DiskArbitration application typically involves event loops and callbacks.

import DiskArbitration import CoreFoundation # Create a DiskArbitration session session = DiskArbitration.DASessionCreate(CoreFoundation.kCFAllocatorDefault) if session: print("DiskArbitration session created successfully.") # In a real application, you would register callbacks, e.g., using DASessionScheduleWithRunLoop # For a quick demo, we just verify session creation and release it. CoreFoundation.CFRelease(session) else: print("Failed to create DiskArbitration session.")
Debug
Known issues
breakingPyObjC 12.0 dropped support for Python 3.9, and PyObjC 11.0 dropped support for Python 3.8. Users on these older Python versions must use an earlier PyObjC version.
fix
Upgrade Python to 3.10 or later, or pin pyobjc-framework-diskarbitration to a compatible version (e.g., `<12.0` for Python 3.9 users, `<11.0` for Python 3.8 users).
affects: >=12.0 (Python 3.9), >=11.0 (Python 3.8)
breakingPyObjC 11.1 introduced significant changes in how initializer methods (`init` family) are handled for Automatic Reference Counting (ARC), aligning with clang's documentation. This can alter reference counting behavior for custom Objective-C classes or Python subclasses.
fix
Carefully review custom `__new__` and `__init__` implementations in Python subclasses of Objective-C objects, especially those involving memory management, to ensure they comply with the new ARC semantics.
affects: >=11.1
gotchaThe interaction between Objective-C object initialization (`alloc`/`init`) and Python's `__new__`/`__init__` can be complex. PyObjC 10.3 temporarily broke the ability to call `__init__` after `__new__` for some cases, which was partially reverted in 10.3.1. Code relying on custom `__new__` might behave unexpectedly.
fix
For subclasses implementing `__new__`, ensure `__init__` is called correctly. If encountering issues, test on 10.3.1 or later. Avoid directly calling `super().__init__` on `objc.objc_object` when using PyObjC's provided `__new__`.
affects: 10.3, 10.3.1
gotchaWhile Python 3.13 introduces experimental free-threading (PEP 703), PyObjC 10.3 explicitly stated it did not support it. PyObjC 11.0 added *experimental* free-threading support. Using PyObjC in a free-threaded environment before full, stable support could lead to instability or incorrect behavior.
fix
If working with Python 3.13 or newer, be aware that free-threading support in PyObjC is still experimental. Avoid using PyObjC in a free-threaded context unless absolutely necessary and with thorough testing, or wait for a stable release with full free-threading guarantees.
affects: >=10.3, <12.0 (with Python 3.13+)
Upgrade
Version history
12.2latest on PyPI · released May 30, 2026
Audit
Dependencies
pyobjc-corerequiredCore bridge functionality for Objective-C and Python interaction.
Agent activity
6 hits · last 30 days
node
6
Resources
pyobjc-framework-diskarbitration — pip install pyobjc-framework-diskarbitration · libregistry