Skip to content

Commit

Permalink
Fix httpx Request deprecation warning
Browse files Browse the repository at this point in the history
Raw and text data should be passed using ``content`` and not ``data``.
  • Loading branch information
aris-aiven committed Nov 4, 2024
1 parent 44520ef commit 9903996
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion astacus/coordinator/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ async def request_from_nodes(

# Now 'reqs' + 'urls' contains all we need to actually perform
# requests we want to.
aws = [utils.httpx_request(url, caller=caller, data=msgspec.json.encode(req), **kw) for req, url in zip(reqs, urls)]
aws = [
utils.httpx_request(url, caller=caller, content=msgspec.json.encode(req), **kw) for req, url in zip(reqs, urls)
]
results = await asyncio.gather(*aws, return_exceptions=True)

logger.info("request_from_nodes %r to %r => %r", reqs, urls, results)
Expand Down

0 comments on commit 9903996

Please sign in to comment.