Skip to content

Commit

Permalink
Drop c.bitswap.unwant since support for it has been permanently dro…
Browse files Browse the repository at this point in the history
…pped by go-IPFS

Source: ipfs/kubo#5308
  • Loading branch information
ntninja committed Jan 29, 2019
1 parent 2bb10a2 commit 168d3a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 24 deletions.
15 changes: 1 addition & 14 deletions ipfshttpclient/client/bitswap.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,4 @@ def stat(self, **kwargs):
-------
dict : Statistics, peers and wanted blocks
"""
return self._client.request('/bitswap/stat', decoder='json', **kwargs)


def unwant(self, key, **kwargs):
"""
Remove a given block from wantlist.
Parameters
----------
key : str
Key to remove from wantlist.
"""
args = (key,)
return self._client.request('/bitswap/unwant', args, **kwargs)
return self._client.request('/bitswap/stat', decoder='json', **kwargs)
11 changes: 1 addition & 10 deletions test/functional/test_bitswap.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,4 @@ def test_wantlist(client):
def test_stat(client):
result = client.bitswap.stat()
assert type(result) is dict
assert "Wantlist" in result


def test_unwant(client):
"""
Cannot ensure what is present in the wantlist prior to execution, so just ensure
something comes back.
"""
result = client.bitswap.unwant(key="QmZTR5bcpQD7cFgTorqxZDYaew1Wqgfbd2ud9QqGPAkK2V")
assert result is not None
assert "Wantlist" in result

0 comments on commit 168d3a1

Please # to comment.