Update the tool to use more modern dependencies #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #1
As mentioned there, the dependencies were outdated and archived. Since they are no longer maintained, their dependencies are pinned to outdated versions and this causes conflicts when this package is used in more complex projects where transitive dependencies also need the same ones and can't solve the dependency resolution.
The solution is simple. Update to more modern packages.
After looking around a bit it seems that the proper package to use here is https://github.com/hashberg-io/multiformats
It contains everything needed for the content hash EIP, plus I added some more dependencies to do small stuff like base58 encode/decode and use keccak.
Have a small constraint I added temporarily due to hashberg-io/multiformats#10 but this can be removed soon.
I checked that all tests pass with the changes, so I am at least sure that the functionality is the same. Only thing I had to change was the
-ns
suffix for some protocols as this is not understood/supported in multiformats package.Since we want to use this in production in rotki: https://github.com/rotki/rotki/ and I am not sure if this repo is still maintained I went ahead and made a fork and uploaded it to pypi with those changes in this PR so we and others can use it easily.
But if the changes make it into the upstream we can just keep using this package and retire the fork.