-
Notifications
You must be signed in to change notification settings - Fork 62
Description
Describe the bug
Because the distribution/package metadata still targets python >= 3.9, and sdist are provided, package managers may still try to install pyobjc==12 and its dependencies from source on Python 3.9 (causing a slow build from source that eventually fails).
Platform information
- Python version: 3.9
- How was python installed (python.org, anaconda, homebrew, ...):
pip install - macOS version:
macos-latest(GitHub action)
To Reproduce
Steps to reproduce the behavior.
jobs:
test:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
- run: pip install pyobjcDemo: https://github.com/Avasam/pyobjc-12-python-3.9-metadata-install-issue/blob/main/.github/workflows/demo.yml
Action run: https://github.com/Avasam/pyobjc-12-python-3.9-metadata-install-issue/actions/runs/18951231666/job/54116122428#step:4:1364

Expected behavior
Distribution metadata should correctly identify pyobjc (and its dependencies) as Python >=3.10
or in other words: pip install pyobjc on python 3.9 should install pyobjc==11.1
Additional context
This is even worst when pyobjc is actually a transitive dependency, as setting https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-prefer-binary doesn't seem to work (I think pip's resolver isn't sophisticated enough to walk back to the pyobjc dependency to try a lower bound to avoid pyobjc-*==12). Meaning users now have to resort to explicitly overriding a transitive dependency.
See:
- [CI] Indirect dependency
pyobjc-framework-Metal12.0 (viajaraco.path) crashes CI for Python 3.9 on macOS pypa/setuptools#5105 - [CI] Set
PIP_PREFER_BINARYin tox as a workaround for problems in macOS pypa/setuptools#5106 - [CI] Constraint transient test dependency on
pyobjcpypa/setuptools#5107
I'm not sure whether it's possible to update a release's metadata without yanking? In which case it's a bit too late and the damage is already done, so I at least thought I'd let you know.
Edit, from dj on the PyPA Discord, a post-release could be used:
no, once it's published it's published. you can yank the release and make a post release instead: https://packaging.python.org/en/latest/specifications/version-specifiers/#post-releases