Page MenuHomeSoftware Heritage

pypi.loader: Fix PyPILoader._last_snapshot implementation

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



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

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

Event Timeline

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


This revision is now accepted and ready to land.Nov 26 2018, 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 '': The requested URL returned error: 403
This revision was automatically updated to reflect the committed changes.