Skip to content

Commit

Permalink
Make ipfshhtpclient an optional library / backend for ethpm
Browse files Browse the repository at this point in the history
- This change affects the different ipfs backends of ethpm.
- Update docs to reference how to install the optional web3 install extra to utilize the ipfs backends.
  • Loading branch information
fselmo committed Nov 22, 2022
1 parent 92325e2 commit fb733b5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
11 changes: 10 additions & 1 deletion docs/ethpm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,16 @@ BaseURIBackend
IPFS
~~~~

``Py-EthPM`` has multiple backends available to fetch/pin files to IPFS. The desired backend can be set via the environment variable: ``ETHPM_IPFS_BACKEND_CLASS``.
``Py-EthPM`` has multiple backends available to fetch/pin files to IPFS.
The IPFS backends rely on the now-unmaintained ``ipfshttpclient`` library. Because of
this, they are opt-in and may be installed via the ``ipfs`` web3 install extra.

.. code-block:: bash
$ pip install "web3[ipfs]"
The desired backend can be set via the environment variable: ``ETHPM_IPFS_BACKEND_CLASS``.

- ``InfuraIPFSBackend`` (default)
- `https://ipfs.infura.io`
Expand Down
1 change: 1 addition & 0 deletions newsfragments/2730.breaking.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Make the ``ipfshttpclient`` library opt-in via a web3 install extra. This only affects the ``ethpm`` ``ipfs`` backends, which rely on the library.
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,16 @@
"pluggy==0.13.1",
"when-changed>=0.3.0",
],
"ipfs": [
"ipfshttpclient==0.8.0a2",
],
}

extras_require["dev"] = (
extras_require["tester"]
+ extras_require["linter"]
+ extras_require["docs"]
+ extras_require["ipfs"]
+ extras_require["dev"]
)

Expand All @@ -82,7 +86,6 @@
"eth-typing>=3.0.0",
"eth-utils>=2.0.0",
"hexbytes>=0.1.0",
"ipfshttpclient==0.8.0a2",
"jsonschema>=4.0.0",
"lru-dict>=1.1.6",
"protobuf>=4.21.6",
Expand Down

0 comments on commit fb733b5

Please sign in to comment.