Skip to content

Commit 05ff71c

Browse files
committed
make functions async
1 parent 0d171ae commit 05ff71c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/confluent_kafka/schema_registry/_async/schema_registry_client.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -321,16 +321,16 @@ def __init__(self, conf: dict):
321321
raise ValueError("Unrecognized properties: {}"
322322
.format(", ".join(conf_copy.keys())))
323323

324-
def get(self, url: str, query: Optional[dict] = None) -> Any:
324+
async def get(self, url: str, query: Optional[dict] = None) -> Any:
325325
raise NotImplementedError()
326326

327-
def post(self, url: str, body: Optional[dict], **kwargs) -> Any:
327+
async def post(self, url: str, body: Optional[dict], **kwargs) -> Any:
328328
raise NotImplementedError()
329329

330-
def delete(self, url: str) -> Any:
330+
async def delete(self, url: str) -> Any:
331331
raise NotImplementedError()
332332

333-
def put(self, url: str, body: Optional[dict] = None) -> Any:
333+
async def put(self, url: str, body: Optional[dict] = None) -> Any:
334334
raise NotImplementedError()
335335

336336

@@ -560,9 +560,9 @@ class AsyncSchemaRegistryClient(object):
560560
`Confluent Schema Registry documentation <http://confluent.io/docs/current/schema-registry/docs/intro.html>`_
561561
""" # noqa: E501
562562

563-
def __init__(self, conf: dict):
563+
def __init__(self, conf: dict, rest_client: _AsyncRestClient = None):
564564
self._conf = conf
565-
self._rest_client = _AsyncRestClient(conf)
565+
self._rest_client = rest_client or _AsyncRestClient(conf)
566566
self._cache = _SchemaCache()
567567
cache_capacity = self._rest_client.cache_capacity
568568
cache_ttl = self._rest_client.cache_latest_ttl_sec

0 commit comments

Comments
 (0)