Page MenuHomeSoftware Heritage

pypi.loader: Fix PyPILoader._last_snapshot implementation
ClosedPublic

Authored by anlambert on Nov 26 2018, 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

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 '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.