Skip to content

Drop support for EOL Python 3.9 - #1263

Closed
hugovk wants to merge 0 commit into
pypa:mainfrom
hugovk:main
Closed

Drop support for EOL Python 3.9#1263
hugovk wants to merge 0 commit into
pypa:mainfrom
hugovk:main

Conversation

@hugovk

@hugovk hugovk commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

pip 26.1 already dropped support: pypa/pip#13905.

@henryiii

Copy link
Copy Markdown
Contributor

I'd like to wait on this a bit, I don't want to drop two Python versions in one release (we just dropped 3.8).

@henryiii

henryiii commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

However, this was a perfect example to compare my drop Python skill against a traditional manual drop. I triggered this and then did a diff comparison with Claude:

🤖 AI text below 🤖

Both diffs are the same "Drop EOL Python 3.9" change, and the shared core is byte-for-byte identical. The differences are at the edges:

What's identical

Both make exactly the same edits to: perf.yml, test.yml, asv.conf.json, getting-started.rst, pyproject.toml (requires-python/classifier/mypy), noxfile.py (pypy3.9 removal), _parser.py, _ranges.py, markers.py, metadata.py, pylock.py, specifiers.py, utils.py, version.py, tasks/pickle_compat.py, tests/test_dependency_groups.py, tests/test_specifiers.py. That's the version-matrix drops plus the Union[...]| / typing.Callablecollections.abc.Callable / drop sys.version_info TypeGuard/TypeAlias conditionals / zip(..., strict=False) cleanup.

Where they differ

1. docs.yml Python version

(Both drop 3.9; they disagree on the replacement. PR picks the newest, current picks the new floor.)

2. PR #1263 also simplifies Generator[X, None, None]Generator[X] — current does NOT touch these. Files only PR #1263 changes:

  • src/packaging/_tokenizer.py
  • src/packaging/errors.py (two signatures)
  • tests/test_manylinux.py
  • tests/test_musllinux.py
  • noxfile.py second hunk (_replace_file return type)
  • _manylinux.py: PR simplifies the _parse_elf Generator return type

3. _manylinux.py comment — opposite handling

  • Current removes the stale # os.PathLike not a generic type until Python 3.9... comment but leaves the Generator[ELFFile | None, None, None] signature untouched.
  • PR Drop support for EOL Python 3.9 #1263 keeps that (now-stale) comment but simplifies the signature to Generator[ELFFile | None].

4. CHANGELOG.rst — PR #1263 adds the "Drop support for EOL Python 3.9. (:pull:1263)" removal entry. Current has no changelog change.

5. src/packaging/licenses/_spdx.py — PR #1263 strips a leading blank line; current doesn't touch the file.

Net

PR #1263 is the more complete version: it also does the Generator[…, None, None] annotation simplification across the codebase, adds the changelog entry, and a stray _spdx.py cleanup. Your working tree is missing those, picks 3.10 instead of 3.14 for the docs build, and uniquely removes the stale os.PathLike comment (which PR #1263 left behind — arguably a small thing the PR should adopt).

@brettcannon brettcannon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's some merge conflicts to fix.

Comment thread tests/test_specifiers.py Outdated
@hugovk

hugovk commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Conflicts resolved!

@henryiii

henryiii commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Thanks! But I would still like to save this till after a release, we should probably try to push for a release soon.

@henryiii

Copy link
Copy Markdown
Contributor

Hopefully, we'll release very soon, then this will be ready to merge a couple of days after that.

@hugovk

hugovk commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

Sorry, didn't mean to close this!

I'd made the PR on main because this repo prevents testing feature branches:

push:
branches:
- main

And I want to make sure CI passes before opening a PR and pinging all the maintainers.

Then I forgot, and reset my main to upstream/main so GitHub closed it. Will try again :)

@hugovk

hugovk commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

Take two: #1354.

@henryiii

Copy link
Copy Markdown
Contributor

You can also make a PR to your fork to get CI.

@hugovk

hugovk commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

Indeed, but that's also adding extra friction to contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants