Repository navigation
Conversation
… 3.10 (#79) packages_distributions of Python 3.10 tells the modules of a distribution only by top_level.txt, which e.g. hatchling and flit do not write, so the top-level packages and single-file modules are told by RECORD. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FJmHQ3jHRbVdpwUiNUkApG
…RD too (#79) The imported distributions are told by their top-level modules the same way on every Python, not by packages_distributions, which tells them only by top_level.txt on Python 3.10, only of the .py files on 3.11, and fails on a malformed RECORD: by top_level.txt, otherwise, also when it is empty, by the recorded files, and none of a malformed RECORD. imported_files tells the top-level module of a recorded path by the same rule, with the module suffixes sorted once, the longest first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FJmHQ3jHRbVdpwUiNUkApG
…pendency directory (#79) Distribution.files fails with TypeError on a RECORD with a blank line or an extra column, and with ValueError on a size which is not a number, so the top-level modules of a distribution without top_level.txt are told by the csv rows of RECORD, like imported_files does, and a top_level.txt not in UTF-8 counts as missing. A directory with a dot in its name, like demo.libs/, is no top-level module of it, while imported_files still counts its files as of demo. They are told only of the distributions in the dependency directory, so that one of the base environment cannot fail the plan. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FJmHQ3jHRbVdpwUiNUkApG
This was referenced Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #79
Stacked on #82 (fix of #59) → #70 (fix of #25) — merge #70, then #82, then this one (bottom-up, see CLAUDE.md).
On Python 3.10,
importlib.metadata.packages_distributions()reads onlytop_level.txt,so an imported distribution built without it (hatchling, flit, … — e.g.
idna,typing_extensions) got noname==versionconstraint and could be upgraded under the running interpreter.The PLAN script no longer uses
packages_distributions()at all — it tells the top-level modules of a distribution of the dependency directory itself, the same way on every Python version:top_level.txt, or — when it is missing, empty or not UTF-8 — from the raw rows ofRECORD;x.cpython-310-x86_64-linux-gnu.soisx), a directory only when its name is an identifier (X.libs/is no module);RECORD(blank line, extra column, non-integer size, bad quoting, non-UTF-8) never crashes the plan —Distribution.filesraisedTypeErrorfor some of these, andpackages_distributions()crashed on 3.12+ for several;RECORDof the base environment is read.imported_files(#59) shares the same top-level-name rule (still countingdemo.libs/as files ofdemo).Verified with real wheels: 3.10 now constrains
idna,typing_extensions,attrs,numpy,google(protobuf); on 3.12–3.14 the selected constraints equal those of the base.Review
3 rounds:
top_level.txt, malformedRECORD, extension-suffix test) applied.RECORDcrashed the plan withTypeError→RECORDread as raw csv rows; examining only the dependency directory; non-UTF-8top_level.txthandled.Follow-ups
METADATAwhich is not UTF-8 aborts the plan (pre-existing).🤖 Generated with Claude Code
https://claude.ai/code/session_01FJmHQ3jHRbVdpwUiNUkApG