Registry / aws / pyobjc-framework-phase

pyobjc-framework-phase

JSON →
library12.2pypypiunverified

`pyobjc-framework-phase` provides Python wrappers for Apple's PHASE (Physical Audio Spatialization Engine) framework on macOS. It is part of the larger PyObjC project, allowing Python applications to interact with Objective-C APIs and leverage native macOS functionalities. The current version is 12.1, with releases typically aligning with macOS SDK updates and Python version support changes.

pip install pyobjc-framework-phase
INSTALL
IMPORT
SIG · PYOBJC-FRAMEWORK-P
P
pyobjc-framework-phase
awspythonv12.2
Install
—
Import
—
Disk
—
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.9–3.13
musl
3.9–3.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.10–3.920 runs
build_error
glibc
py 3.10–3.920 runs
build_error
Code
Verified usage

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

PHASEEngine
✓ from PHASE import PHASEEngine
Specific classes from the PHASE framework are imported directly from the 'PHASE' package.
objc
✓ import objc
The core PyObjC bridge is often needed for low-level interactions or type conversions.

This quickstart demonstrates how to import a class from the `PHASE` framework and attempt to instantiate a `PHASEEngine`. While a complete audio application using PHASE is complex, this example verifies that the framework bindings are correctly installed and accessible from Python. Output will appear in the macOS system log (viewable via Console.app) due to `NSLog` usage.

import objc from Foundation import NSObject, NSLog from PHASE import PHASEEngine, PHASE_ENGINE_SOUND_EVENT_TYPE_NONE def quick_phase_check(): NSLog("Attempting to create a PHASEEngine instance...") try: # PHASEEngine requires an identifier for instantiation engine = PHASEEngine.alloc().initWithIdentifier_("MyPythonPHASEEngine") if engine: NSLog("Successfully created PHASEEngine instance: %@", engine) # A real PHASE application would continue with configuration and playback. # This example only verifies the binding's accessibility. else: NSLog("Failed to create PHASEEngine instance.") except Exception as e: NSLog("Error creating PHASEEngine: %@", str(e)) if __name__ == "__main__": quick_phase_check()
Debug
Known issues
breakingPyObjC 12.0, which includes `pyobjc-framework-phase`, dropped support for Python 3.9. Projects targeting Python 3.9 must use `pyobjc` versions prior to 12.0.
fix
Upgrade to Python 3.10 or later, or pin `pyobjc-framework-phase` to a version less than 12.0 (e.g., `pip install 'pyobjc-framework-phase<12.0'`).
affects: >=12.0
breakingPyObjC 11.0, which includes `pyobjc-framework-phase`, dropped support for Python 3.8. Projects targeting Python 3.8 must use `pyobjc` versions prior to 11.0.
fix
Upgrade to Python 3.9 or later, or pin `pyobjc-framework-phase` to a version less than 11.0 (e.g., `pip install 'pyobjc-framework-phase<11.0'`).
affects: >=11.0
gotchaFrom PyObjC 11.1, the core bridge aligns with `clang`'s documentation for Automatic Reference Counting (ARC) in Objective-C initializer methods. Methods in the 'init' family now correctly model stealing a reference to `self` and returning a new one. This might subtly affect custom Objective-C classes exposed to Python or complex memory management if your code relied on older PyObjC reference counting behavior for initializers.
fix
Review any custom Objective-C classes wrapped with PyObjC, especially `init` methods, to ensure they correctly handle reference counting under the new ARC alignment. Most pure Python usage should be unaffected.
affects: >=11.1
gotchaChanges in PyObjC 10.3 and 10.3.1 affect how Python's `__init__` and `__new__` methods interact with bridged Objective-C classes. While 10.3.1 partially reverted 10.3's stricter behavior, if a class or its superclass defines a custom `__new__` in Python, its `__init__` can be called. However, `__init__` cannot be used if relying on the `__new__` provided by PyObjC directly for class instantiation.
fix
If bridging Python classes with custom `__new__` implementations, thoroughly test initialization. Avoid using `__init__` when instantiating through PyObjC's default class factory for new Objective-C objects if `__new__` isn't explicitly overridden in Python.
affects: >=10.3
Upgrade
Version history
12.2latest on PyPI · released May 30, 2026
Audit
Dependencies
pyobjc-corerequiredRequired base for all PyObjC framework bindings.
pyobjc-framework-FoundationoptionalProvides core macOS types and objects; typically a transitive dependency for most frameworks.
Agent activity
14 hits · last 30 days
node
14
Resources