mvantellingen / python-zeep

A Python SOAP client
http://docs.python-zeep.org
Other
1.87k stars 578 forks source link

httpx: DeprecationWarning: Use 'content=<...>' to upload raw bytes/text content. #1404

Open buhln opened 5 months ago

buhln commented 5 months ago

I am using httpx for asynchronous and SSL protected requests to an SOAP server.

httpx_ssl_verify = httpx.create_ssl_context(verify="cert.pem")
httpx_client = httpx.AsyncClient(auth=(user, password), verify=httpx_ssl_verify, timeout=15)

An example for the request itself in an async function is:

client = zeep.AsyncClient(wsdl, transport=AsyncTransport(client=httpx_client))

This requests are working fine but results in a deprecation warning, too:

python3.10/site-packages/httpx/_content.py:204: DeprecationWarning: Use 'content=<...>' to upload raw bytes/text content.

I am not quiet sure if this is an issue of httpx itself or zeep, but I see no possibility to follow the recommendation of the warning message from my understanding.

Used versions:

zeep==4.2.1
httpx==0.26.0