GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Revert "Prefer the greater metadata directory when a path supplies several" by jaraco · Pull Request #552 · python/importlib_metadata

Conversation

@jaraco

@jaraco jaraco commented Oct 23, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Reverts #550.

That change had Lookup.__init__ consider a path's children in reverse lexicographic order so that, where an unclean upgrade left more than one metadata directory for a distribution, the greater one was found first.

The ordering is lexicographic on the directory name rather than on the parsed version, so it only approximates a preference for the newer version — foo-1.9.0 still sorts above foo-1.13.1 — and so does not resolve every instance of python/cpython#100666.

The behavior shipped in v9.1.0, so the revert gets a news fragment.

Tests

The reverted MultipleVersionsTests included test_validity_preferred_to_version, a guard for #489. That condition is already covered independently by test_valid_dists_preferred, which is untouched, so the revert drops no unique coverage.

tox passes: 257 passed, 1 skipped, 41 subtests; mypy and ruff clean; perf within noise.

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jaraco @claude
Revert "Prefer the greater metadata directory when a path supplies se…
7e162d8
…veral."

The ordering was lexicographic on the directory name and not on the parsed
version, so it only approximated a preference for the newer version and did
not resolve every instance of the reported condition.

This reverts commit 6a8b861.

Ref python/cpython#100666.

Co-Authored-By: Claude Opus 5 <[email protected]>
@jaraco
jaraco force-pushed the debt/revert-prefer-greater-version branch from b03103e to 7e162d8 Compare October 23, 2026 21:43
@jaraco
jaraco merged commit 60bbaca into main Oct 23, 2026
30 of 32 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@jaraco
jaraco deleted the debt/revert-prefer-greater-version branch October 23, 2026 21:43
@jaraco jaraco mentioned this pull request Oct 23, 2026
Prefer valid distributions when collecting entry points #553
Merged
@jaraco jaraco mentioned this pull request Oct 31, 2026
gh-160386: Apply changes from importlib_metadata 9.1 python/cpython#160387
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@jaraco
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.