Skip to content

Python 3.9 support dropped without updating python_requires #661

@Avasam

Description

@Avasam

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).

Image

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 pyobjc

Demo: 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
Image

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:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions