Skip to content

Commit

Permalink
Switch to multiformats-cid
Browse files Browse the repository at this point in the history
Since py-cid is deprecated and archived, use a library that is still
maintained.
Addresses: filips123#1
  • Loading branch information
LefterisJP committed Jun 15, 2023
1 parent f9768b7 commit 61f3b9f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion content_hash/decodes/b58_multi_hash.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Decode module for B58 multi hash."""

from cid import make_cid
import multihash
from multiformats_cid import make_cid


def decode(value):
Expand Down
2 changes: 1 addition & 1 deletion content_hash/decodes/hex_multi_hash.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Decode module for HEX multi hash."""

from cid import make_cid
import multihash
from multiformats_cid import make_cid


def decode(value):
Expand Down
3 changes: 2 additions & 1 deletion content_hash/encodes/ipfs.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
"""Encode module for IPFS."""

from cid import make_cid
import multihash
from multiformats_cid import make_cid


def encode(value):
"""
Expand Down
3 changes: 2 additions & 1 deletion content_hash/encodes/swarm.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
"""Encode module for Swarm."""

from cid import make_cid
import multihash
from multiformats_cid import make_cid


def encode(value):
"""
Expand Down
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from setuptools import setup


def readme():
with open('README.md') as f:
return f.read()
Expand All @@ -21,7 +22,7 @@ def readme():
},

install_requires = [
'py-cid>=0.3.0,<0.4.0',
'py-multiformats-cid',
'py-multicodec>=0.2.1,<0.3.0',
'py-multihash>=0.2.3,<0.3.0',
],
Expand Down Expand Up @@ -49,6 +50,4 @@ def readme():
'Topic :: Software Development :: Libraries',
'Topic :: Utilities',
],

include_package_data = True,
)

0 comments on commit 61f3b9f

Please sign in to comment.