Skip to content

Commit 5b398eb

Browse files
committed
Drop c.bitswap.unwant since support for it has been permanently dropped by go-IPFS
Source: ipfs/kubo#5308
1 parent 26d3b23 commit 5b398eb

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

ipfsapi/client/network.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -154,19 +154,6 @@ def stat(self, **kwargs):
154154
return self._client.request('/bitswap/stat', decoder='json', **kwargs)
155155

156156

157-
def unwant(self, key, **kwargs):
158-
"""
159-
Remove a given block from wantlist.
160-
161-
Parameters
162-
----------
163-
key : str
164-
Key to remove from wantlist.
165-
"""
166-
args = (key,)
167-
return self._client.request('/bitswap/unwant', args, **kwargs)
168-
169-
170157

171158
class DHTSection(base.SectionBase):
172159
def findpeer(self, peer_id, *peer_ids, **kwargs):
@@ -770,7 +757,6 @@ class NetworkBase(base.ClientBase):
770757

771758
bitswap_stat = base.DeprecatedMethodProperty("bitswap", "stat")
772759
bitswap_wantlist = base.DeprecatedMethodProperty("bitswap", "wantlist")
773-
bitswap_unwant = base.DeprecatedMethodProperty("bitswap", "unwant")
774760

775761
dht_findpeer = base.DeprecatedMethodProperty("dht", "findpeer")
776762
dht_findprovs = base.DeprecatedMethodProperty("dht", "findproves")

test/functional/tests.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -833,15 +833,6 @@ def test_bitswap_stat(self):
833833
result = self.api.bitswap_stat()
834834
self.assertTrue(result and type(result) is dict and 'Wantlist' in result)
835835

836-
def test_bitswap_unwant(self):
837-
"""
838-
Cannot ensure what is present in the wantlist prior to execution, so just ensure
839-
something comes back.
840-
"""
841-
842-
result = self.api.bitswap_unwant(key='QmZTR5bcpQD7cFgTorqxZDYaew1Wqgfbd2ud9QqGPAkK2V')
843-
self.assertTrue(result is not None)
844-
845836
@skipIfOffline()
846837
class IpfsApiPubSubTest(unittest.TestCase):
847838

0 commit comments

Comments
 (0)