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
Include version and checksum validation when updating packages (#27)
This PR closes#24. Here, we now check against two conditions when
updating the package
- whether the version is up to date plus valid, and
- whether the SHA-256 checksum matches the one present in the recipe
file.
Therefore, updating the package has three scenarios, and here is a
summary of what happens:
- local version updated manually to the newest available PyPI version ➡️
checksums will be updated, too
- both version and checksum are out of date ➡️ both of them will be
updated (as it was before these changes)
- the checksum is correct and the version is out of date ➡️ this is
enough information for us to proceed with updating the version
Additionally, there's now a case where one manually updates the version
(in error, for example), to a version that is not released or available
on PyPI (yet), which means that the metadata for the version won't exist
either. We raise an exception early here, asking the user so that they
can check the version while updating. This is a rare situation, so it's
more about raising a helpful error that aids the user in debugging the
problem. I have skipped adding a test for such a case, but I can add one
if needed. Please let me know your thoughts!
0 commit comments