diff --git a/aiohttp/client_reqrep.py b/aiohttp/client_reqrep.py index b75988ab1aa..c26a57355eb 100644 --- a/aiohttp/client_reqrep.py +++ b/aiohttp/client_reqrep.py @@ -39,14 +39,14 @@ __all__ = ('ClientRequest', 'ClientResponse', 'RequestInfo', 'Fingerprint') -@attr.s(frozen=True) +@attr.s(frozen=True, slots=True) class ContentDisposition: type = attr.ib(type=str) parameters = attr.ib(type=MappingProxyType) filename = attr.ib(type=str) -@attr.s(frozen=True) +@attr.s(frozen=True, slots=True) class RequestInfo: url = attr.ib(type=URL) method = attr.ib(type=str) diff --git a/aiohttp/helpers.py b/aiohttp/helpers.py index 839452b491a..4ab93ff2800 100644 --- a/aiohttp/helpers.py +++ b/aiohttp/helpers.py @@ -143,7 +143,7 @@ def netrc_from_env(): return netrc_obj -@attr.s(frozen=True) +@attr.s(frozen=True, slots=True) class ProxyInfo: proxy = attr.ib(type=str) proxy_auth = attr.ib(type=BasicAuth) @@ -192,7 +192,7 @@ def isasyncgenfunction(obj): return False -@attr.s(frozen=True) +@attr.s(frozen=True, slots=True) class MimeType: type = attr.ib(type=str) subtype = attr.ib(type=str) diff --git a/aiohttp/web_request.py b/aiohttp/web_request.py index 9eee747bdcf..91f5832ad9b 100644 --- a/aiohttp/web_request.py +++ b/aiohttp/web_request.py @@ -27,7 +27,7 @@ __all__ = ('BaseRequest', 'FileField', 'Request') -@attr.s(frozen=True) +@attr.s(frozen=True, slots=True) class FileField: name = attr.ib(type=str) filename = attr.ib(type=str) diff --git a/aiohttp/web_urldispatcher.py b/aiohttp/web_urldispatcher.py index 784dbb81d0b..4f8def2e7f1 100644 --- a/aiohttp/web_urldispatcher.py +++ b/aiohttp/web_urldispatcher.py @@ -37,7 +37,7 @@ PATH_SEP = re.escape('/') -@attr.s(frozen=True, repr=False) +@attr.s(frozen=True, repr=False, slots=True) class RouteDef: method = attr.ib(type=str) path = attr.ib(type=str) diff --git a/aiohttp/web_ws.py b/aiohttp/web_ws.py index e31ab2e2ba0..66dc88f7098 100644 --- a/aiohttp/web_ws.py +++ b/aiohttp/web_ws.py @@ -28,7 +28,7 @@ MsgType = WSMsgType -@attr.s(frozen=True) +@attr.s(frozen=True, slots=True) class WebSocketReady: ok = attr.ib(type=bool) protocol = attr.ib(type=str)