Page MenuHomeSoftware Heritage

pypi.loader: Fix PyPILoader._last_snapshot implementation
ClosedPublic

Authored by anlambert on Mon, Nov 26, 12:22 PM.

Details

Summary

While reading the PyPI loader implementation for getting inspiration
for the npm one, I stumbled across that piece of code that feels wrong
to me.

Prior to that fix, last snapshot of a PyPI project was returned only if it
contains more than 1000 branches/releases, which is pretty rare.

Based on my understanding, this means that each time a PyPI project is visited
again, already ingested releases are processed again but this should not happen.

Diff Detail

Repository
rDLDPY PyPI loader
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

anlambert created this revision.Mon, Nov 26, 12:22 PM
ardumont accepted this revision.Mon, Nov 26, 3:21 PM

Right!

This revision is now accepted and ready to land.Mon, Nov 26, 3:21 PM

Seems I don't have the rights to push on that repo:

✔ ~/swh/swh-environment/swh-loader-pypi [master ↑·1|✔] 
15:24 $ git push origin master
fatal: unable to access 'https://forge.softwareheritage.org/source/swh-loader-pypi.git/': The requested URL returned error: 403
This revision was automatically updated to reflect the committed changes.