Conversation
- Relax pyobjc version pins from ==9.0.1 to >=9.0.1; the pinned version fails to build on Python 3.12 due to a missing pkg_resources dependency in setup.py - Fix keyring.backends.OS_X import removed in keyring 24.x; fall back to keyring.backends.macOS with try/except for backward compatibility Tested on MacBook Pro M4 Max, macOS Tahoe 26.4.1, Python 3.12
There was a problem hiding this comment.
Code Review
This pull request relaxes the version constraints for pyobjc dependencies in requirements.txt from exact versions to >= 9.0.1 and updates keyring_utils.py to support importing from macOS keyrings with a fallback to OS_X. The reviewer recommends pinning the pyobjc dependencies to a specific newer version (such as 10.3) instead of using minimum version bounds to ensure reproducible builds and avoid potential breaking changes.
| pyobjc-core >= 9.0.1 | ||
| pyobjc-framework-AppleScriptKit >= 9.0.1 | ||
| pyobjc-framework-AppleScriptObjC >= 9.0.1 |
There was a problem hiding this comment.
For applications, it is a best practice to pin dependencies to exact versions in requirements.txt to ensure reproducible builds and prevent unexpected breakages from future dependency updates.
Using >= 9.0.1 without an upper bound might install a much newer version of pyobjc (e.g., a future major release) that could introduce breaking changes.
Consider pinning to a specific newer version of pyobjc that supports Python 3.12 and Apple Silicon (such as 10.3).
pyobjc-core == 10.3
pyobjc-framework-AppleScriptKit == 10.3
pyobjc-framework-AppleScriptObjC == 10.3
Description:
This PR fixes three cascading failures that prevent Zowie 1.3.0 from installing or running on Apple Silicon Macs with Python 3.12.
Failure 1: pyobjc circular import (Issue #19)
The shiv binary bundles
pyobjc-core 9.0.1, compiled for Intel. On Apple Silicon with Python 3.12, it raises:Failure 2: pyobjc-core will not build from source under Python 3.12
Installing Zowie via
pipxorpiptriggers a build ofpyobjc-core 9.0.1from source, which fails because the pinned version'ssetup.pycallspkg_resources, a module removed from Python 3.12's default environment:Failure 3: keyring.backends.OS_X removed in keyring ≥ 24
Once pyobjc is resolved by installing a newer version first, a third failure surfaces.
keyring_utils.pyimports directly fromkeyring.backends.OS_X, a backend removed in keyring 24.x:Changes in this PR
pyobjc-coreand related pyobjc framework version pins from==9.0.1to>=9.0.1, allowing pip to install a current, native ARM build that compiles cleanly against Python 3.12keyring.backends.OS_Ximport inkeyring_utils.pywith a try/except fallback tokeyring.backends.macOS, preserving backward compatibility with older keyring versionsTested environment