Skip to content

Commit e975451

Browse files
committed
Make ipfshhtpclient an optional library / backend for ethpm
- 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.
1 parent 8f9065c commit e975451

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

docs/ethpm.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,16 @@ BaseURIBackend
169169
IPFS
170170
~~~~
171171

172-
``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``.
172+
``Py-EthPM`` has multiple backends available to fetch/pin files to IPFS.
173+
The IPFS backends rely on the now-unmaintained ``ipfshttpclient`` library. Because of
174+
this, they are opt-in and may be installed via the ``ipfs`` web3 install extra.
175+
176+
.. code-block:: bash
177+
178+
$ pip install "web3[ipfs]"
179+
180+
181+
The desired backend can be set via the environment variable: ``ETHPM_IPFS_BACKEND_CLASS``.
173182

174183
- ``InfuraIPFSBackend`` (default)
175184
- `https://ipfs.infura.io`

newsfragments/2730.breaking.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Make the ``ipfshttpclient`` library opt-in via a web3 install extra. This only affects the ``ethpm`` ``ipfs`` backends, which rely on the library.

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,16 @@
5151
"pluggy==0.13.1",
5252
"when-changed>=0.3.0",
5353
],
54+
"ipfs": [
55+
"ipfshttpclient==0.8.0a2",
56+
],
5457
}
5558

5659
extras_require["dev"] = (
5760
extras_require["tester"]
5861
+ extras_require["linter"]
5962
+ extras_require["docs"]
63+
+ extras_require["ipfs"]
6064
+ extras_require["dev"]
6165
)
6266

@@ -82,7 +86,6 @@
8286
"eth-typing>=3.0.0",
8387
"eth-utils>=2.0.0",
8488
"hexbytes>=0.1.0",
85-
"ipfshttpclient==0.8.0a2",
8689
"jsonschema>=4.0.0",
8790
"lru-dict>=1.1.6",
8891
"protobuf>=4.21.6",

0 commit comments

Comments
 (0)