Skip to content

Make ipfshhtpclient an optional library / backend for ethpm #2730

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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