pypa / installer

A low-level library for installing from a Python wheel distribution.
https://installer.readthedocs.io/
MIT License
123 stars 51 forks source link

Validate RECORD file using streams instead of reading in-memory #186

Closed pradyunsg closed 1 year ago

pradyunsg commented 1 year ago

Supercedes and closes #183 Fixes #185

This ensures that the validation can be performed without loading the entire file in-memory.

ralbertazzi commented 1 year ago

Thank you @pradyunsg , your solution is cleaner :)

Another optimization that we can bring is performing hash validation just once, as we currently perform it during 1. wheel validation 2. wheel installation. I tried hacking it away in https://github.com/python-poetry/poetry/pull/8027 but it would be clearly better to see this natively supported by installer. I first want to get a better understanding at the performance benefit and, if any, I will open an issue.