mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-07 10:56:49 +00:00
These objects get stored in a context where they need to be hashed, sometimes.
This commit is contained in:
parent
1294baa82e
commit
ea1d248611
@ -276,7 +276,7 @@ class _StorageClientHTTPSPolicy:
|
||||
)
|
||||
|
||||
|
||||
@define
|
||||
@define(hash=True)
|
||||
class StorageClient(object):
|
||||
"""
|
||||
Low-level HTTP client that talks to the HTTP storage server.
|
||||
@ -286,7 +286,7 @@ class StorageClient(object):
|
||||
# ``StorageClient.from_nurl()``.
|
||||
_base_url: DecodedURL
|
||||
_swissnum: bytes
|
||||
_treq: Union[treq, StubTreq, HTTPClient]
|
||||
_treq: Union[treq, StubTreq, HTTPClient] = field(eq=False)
|
||||
|
||||
@classmethod
|
||||
def from_nurl(
|
||||
@ -379,13 +379,12 @@ class StorageClient(object):
|
||||
return self._treq.request(method, url, headers=headers, **kwargs)
|
||||
|
||||
|
||||
@define(hash=True)
|
||||
class StorageClientGeneral(object):
|
||||
"""
|
||||
High-level HTTP APIs that aren't immutable- or mutable-specific.
|
||||
"""
|
||||
|
||||
def __init__(self, client): # type: (StorageClient) -> None
|
||||
self._client = client
|
||||
_client : StorageClient
|
||||
|
||||
@inlineCallbacks
|
||||
def get_version(self):
|
||||
@ -534,7 +533,7 @@ async def advise_corrupt_share(
|
||||
)
|
||||
|
||||
|
||||
@define
|
||||
@define(hash=True)
|
||||
class StorageClientImmutables(object):
|
||||
"""
|
||||
APIs for interacting with immutables.
|
||||
|
@ -1187,7 +1187,7 @@ class _StorageServer(object):
|
||||
|
||||
|
||||
|
||||
@attr.s
|
||||
@attr.s(hash=True)
|
||||
class _FakeRemoteReference(object):
|
||||
"""
|
||||
Emulate a Foolscap RemoteReference, calling a local object instead.
|
||||
@ -1203,7 +1203,6 @@ class _FakeRemoteReference(object):
|
||||
raise RemoteException(e.args)
|
||||
|
||||
|
||||
@attr.s
|
||||
class _HTTPBucketWriter(object):
|
||||
"""
|
||||
Emulate a ``RIBucketWriter``, but use HTTP protocol underneath.
|
||||
@ -1234,7 +1233,7 @@ class _HTTPBucketWriter(object):
|
||||
|
||||
|
||||
|
||||
@attr.s
|
||||
@attr.s(hash=True)
|
||||
class _HTTPBucketReader(object):
|
||||
"""
|
||||
Emulate a ``RIBucketReader``, but use HTTP protocol underneath.
|
||||
|
Loading…
x
Reference in New Issue
Block a user