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
When a source distribution contains a PKG-INFO file at the top level with Metadata-Version: 2.2 or Metadata-Version: 2.3 and neither Dynamic: Requires-Dist nor Dynamic: Provides-Extra, we can use the information in PKG-INFO as reliable metadata without calling any PEP 517 hooks or even setting up the build env. While the PEP has been accepted for some time, this is now supported by at pypi (pypi/warehouse#13606).
After downloading and unpacking1, we can read PKG-INFO with the same utils as METADATA and given the preconditions perform no build in uv pip compile. This should provide a significant speedup as more package are published with metadata 2.2+.
Update: no sorry, version can be dynamic in pyproject.toml (PEP 621). but not in PKG-INFO 2.2+. PEP 643 says "The fields Name and Version MUST NOT be marked as Dynamic."
## Summary
PyPI now supports Metadata 2.2, which means distributions with Metadata
2.2-compliant metadata will start to appear. The upside is that if a
source distribution includes a `PKG-INFO` file with (1) a metadata
version of 2.2 or greater, and (2) no dynamic fields (at least, of the
fields we rely on), we can read the metadata from the `PKG-INFO` file
directly rather than running _any_ of the PEP 517 build hooks.
Closes#2009.
When a source distribution contains a PKG-INFO file at the top level with
Metadata-Version: 2.2
orMetadata-Version: 2.3
and neitherDynamic: Requires-Dist
norDynamic: Provides-Extra
, we can use the information in PKG-INFO as reliable metadata without calling any PEP 517 hooks or even setting up the build env. While the PEP has been accepted for some time, this is now supported by at pypi (pypi/warehouse#13606).After downloading and unpacking1, we can read
PKG-INFO
with the same utils asMETADATA
and given the preconditions perform no build inuv pip compile
. This should provide a significant speedup as more package are published with metadata 2.2+.pyo3-mixed 2.1.5
Footnotes
I don't think .tar.gz has a central directory we could use for the same remote partial reading trick as for zips, but i can't find a good source. ↩
The text was updated successfully, but these errors were encountered: