{"id":6100,"library":"pyobjc-framework-dvdplayback","title":"PyObjC DVDPlayback Framework","description":"The `pyobjc-framework-dvdplayback` library provides Python bindings for the macOS DVDPlayback framework, allowing Python applications to interact with DVD playback functionalities. As part of the broader PyObjC project (current version 12.1), which bridges Python and Objective-C, this specific framework wrapper is now deprecated by Apple. PyObjC generally follows a regular release cadence, updating bindings for new macOS SDKs and Python versions.","status":"maintenance","version":"12.1","language":"en","source_language":"en","source_url":"https://github.com/ronaldoussoren/pyobjc","tags":["macOS","PyObjC","Objective-C","bindings","deprecated"],"install":[{"cmd":"pip install pyobjc-framework-dvdplayback","lang":"bash","label":"Install PyObjC DVDPlayback"}],"dependencies":[{"reason":"Required for the underlying Python-Objective-C bridge.","package":"pyobjc-core","optional":false},{"reason":"Often a foundational dependency for macOS framework bindings.","package":"pyobjc-framework-Cocoa","optional":false}],"imports":[{"symbol":"DVDGetScanRate","correct":"from DVDPlayback import DVDGetScanRate"}],"quickstart":{"code":"from Foundation import NSLog\nfrom DVDPlayback import DVDGetScanRate\n\n# Note: The DVDPlayback framework and its APIs are deprecated by Apple.\n# This example is illustrative and may not function on recent macOS versions or \n# without a DVD drive/mounted DVD image.\n\ntry:\n    scan_rate = DVDGetScanRate()\n    NSLog(f\"Current DVD scan rate: %{{float}}\", scan_rate)\nexcept Exception as e:\n    NSLog(f\"Failed to get DVD scan rate: %{{@}}\", str(e))","lang":"python","description":"This quickstart demonstrates importing and attempting to use a function from the `DVDPlayback` framework. Due to the framework's deprecation by Apple, this example primarily serves to illustrate the import pattern, and its functionality may be limited or non-existent on modern macOS systems or without specific hardware/media. It explicitly notes the deprecation."},"warnings":[{"fix":"Avoid using the DVDPlayback framework. Consult Apple's developer documentation for alternative media playback technologies.","message":"The DVDPlayback framework itself is deprecated by Apple and marked as such in PyObjC documentation. Its functionality may be limited or unavailable on recent macOS versions and it should not be used for new development.","severity":"deprecated","affected_versions":"All versions, due to Apple's deprecation."},{"fix":"Ensure your Python environment meets the minimum requirement for the PyObjC version you are using (currently Python 3.10 or later for PyObjC 12.1).","message":"PyObjC versions periodically drop support for older Python versions. For instance, PyObjC 11 dropped Python 3.8 support, and PyObjC 12.0 dropped Python 3.9 support.","severity":"breaking","affected_versions":"PyObjC 11.0+, PyObjC 12.0+"},{"fix":"Review custom Objective-C classes subclassed in Python, especially `init` methods, for potential reference count issues. Consult PyObjC's changelog and ARC documentation.","message":"PyObjC 11.1 aligned its behavior with clang's Automatic Reference Counting (ARC) for initializer methods, meaning methods in the 'init' family now correctly steal a reference to `self` and return a new reference. This is a significant change in reference counting.","severity":"breaking","affected_versions":"PyObjC 11.1+"},{"fix":"If experiencing issues with `__init__` and `__new__`, upgrade to 10.3.1 or later. Ensure `__init__` is only used when `__new__` is explicitly user-implemented, or when not relying on PyObjC's default `__new__` behavior.","message":"Changes in PyObjC 10.3 affected how `__init__` is handled when a user-defined `__new__` method is present. While 10.3 initially removed support for calling `__init__` in such cases, 10.3.1 reintroduced it if the class (or a superclass) explicitly implements `__new__`. Code relying on PyObjC's `__new__` still cannot use `__init__`.","severity":"gotcha","affected_versions":"PyObjC 10.3.x"},{"fix":"Run `xcode-select --install` in your terminal to install the necessary command-line tools before attempting to install PyObjC packages.","message":"Installation of PyObjC (and its framework wrappers) typically requires the Xcode Command Line Tools to be installed on macOS. Without them, compilation errors may occur.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Relying on deprecated frameworks carries the risk of their bindings being removed in future PyObjC versions. Migrate to supported Apple APIs.","message":"Older, deprecated macOS frameworks may be entirely removed from PyObjC bindings when Apple removes them from the SDK. For example, the 'IMServicePlugIn' bindings were removed in PyObjC 10.0 because the framework was deprecated in macOS 10.13 and removed in macOS 14. This is a general policy that applies to deprecated frameworks like DVDPlayback.","severity":"breaking","affected_versions":"PyObjC 10.0+"}],"env_vars":null,"last_verified":"2026-04-14T00:00:00.000Z","next_check":"2026-07-13T00:00:00.000Z","problems":[]}