Three Wrappers One Interface

All three of these expose the same read(key) -> bytes method that the rest of the codebase calls. The team calls all three "our decorators".

class W1:
    def __init__(self, legacy):
        self.legacy = legacy
    def read(self, key: str) -> bytes:
        rec = self.legacy.GetBlobRecord(key.encode("ascii"))
        return rec.payload_bytes()

class W2:
    def __init__(self, dsn: str):
        self.dsn = dsn
        self.inner = None
    def read(self, key: str) -> bytes:
        if self.inner is None:
            self.inner = BlobStore(self.dsn)     # opens 40 sockets, ~300 ms
        return self.inner.read(key)

class W3:
    def __init__(self, inner):
        self.inner = inner
    def read(self, key: str) -> bytes:
        return gzip.decompress(self.inner.read(key))

Which labelling is right?

A

W1 Facade, W2 Proxy, W3 Decorator

B

W1 Adapter, W2 Proxy, W3 Decorator

C

W1 Adapter, W2 Decorator, W3 Proxy

D

All three are Decorators: each one holds a collaborator and forwards to it