You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PLAN aborts on a dist-info METADATA which is not UTF-8 #89
The PLAN script reads distribution.metadata["Name"] of every distribution in the dependency directory,
and a METADATA file which is not valid UTF-8 aborts the whole plan with a UnicodeDecodeError —
so one damaged dist-info makes every later install into that directory fail,
on the base of #79 as well as with it.
Expected: such a distribution is treated like one with unreadable metadata
(not satisfying any requirement, not constrained), and the plan goes on.
Status of the automated fix run: blocked after 3 review rounds (the cap), on branch issue-89-metadata-not-utf8 (stacked on #92), no PR.
The branch fixes the crash: a METADATA which is not UTF-8 (or missing, or a directory, or unreadable) no longer aborts the plan, in the dependency directory or the base environment, on Python 3.10, 3.12 and 3.14; with well-formed dist-infos the plan output equals the base for 19 real wheels and 12 scenarios; pip and uv converge after one install in all probed cases. Design (round 3): an unreadable distribution of the environment is skipped (as before); one of the dependency directory is identified by its dist-info directory name (validated as a PEP 508 name and PEP 440 version, highest wins); one shared, cached lookup_distribution serves the requirement checks and the constraints.
The last review found one remaining regression:
Without packaging (e.g. a uv venv without pip, uv as the installer), a dependency-directory dist-info without METADATA cannot be validated, so it counts as not installed: the plan says install six on every run, and uv fails each time with Failed to read metadata … METADATA: No such file or directory — the base treated it as installed.
Direction: when Version is unavailable, keep the raw version from the directory name (as accepts_version already tolerates a non-PEP 440 version); the name regex needs no packaging.
And a minor one:
A distribution whose dist-info directory name does not normalize to its Name (a legacy dotted-name .egg, a renamed dist-info) loses its constraint, and such an egg is no longer found for a requirement (installed once into the dependency directory).
Direction: fill the lookup in one pass over metadata.distributions() keyed by the normalized Name, instead of looking up by name.
Polish: a non-UTF-8 METADATA could be decoded leniently to keep its (ASCII) Requires-Dist for the #81 check; a METADATA lacking only Version drops its Requires-Dist; the imported_version comment and one test name are out of date.
Activity
Tell a distribution of unreadable METADATA by its dist-info name (#89)
Tell only dist-info of the dependency directory by its valid name (#89)
morisil commentedon Nov 13, 2026
Status of the automated fix run: blocked after 3 review rounds (the cap), on branch
issue-89-metadata-not-utf8(stacked on #92), no PR.The branch fixes the crash: a
METADATAwhich is not UTF-8 (or missing, or a directory, or unreadable) no longer aborts the plan, in the dependency directory or the base environment, on Python 3.10, 3.12 and 3.14; with well-formed dist-infos the plan output equals the base for 19 real wheels and 12 scenarios; pip and uv converge after one install in all probed cases. Design (round 3): an unreadable distribution of the environment is skipped (as before); one of the dependency directory is identified by its dist-info directory name (validated as a PEP 508 name and PEP 440 version, highest wins); one shared, cachedlookup_distributionserves the requirement checks and the constraints.The last review found one remaining regression:
packaging(e.g. auv venvwithout pip, uv as the installer), a dependency-directory dist-info withoutMETADATAcannot be validated, so it counts as not installed: the plan saysinstall sixon every run, and uv fails each time withFailed to read metadata … METADATA: No such file or directory— the base treated it as installed.Direction: when
Versionis unavailable, keep the raw version from the directory name (asaccepts_versionalready tolerates a non-PEP 440 version); the name regex needs nopackaging.And a minor one:
Name(a legacy dotted-name.egg, a renamed dist-info) loses its constraint, and such an egg is no longer found for a requirement (installed once into the dependency directory).Direction: fill the lookup in one pass over
metadata.distributions()keyed by the normalizedName, instead of looking up by name.Polish: a non-UTF-8
METADATAcould be decoded leniently to keep its (ASCII)Requires-Distfor the #81 check; aMETADATAlacking onlyVersiondrops itsRequires-Dist; theimported_versioncomment and one test name are out of date.