mvantellingen / python-zeep

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

Consider passing in an SSLContext when creating the httpx client if you need ssl #1366

Open bdraco opened 1 year ago

bdraco commented 1 year ago

https://github.com/mvantellingen/python-zeep/blob/377d9313b1b4807a31a5ee42227f1dc7e7e0471e/src/zeep/transports.py#L193

We recently discovered httpx does not perform well without passing in an ssl context (https://github.com/home-assistant/core/pull/89932)

see https://github.com/encode/httpx/pull/2609 https://github.com/encode/httpx/issues/838#issuecomment-1289927214

The shared helper will be updated for this issue as well so it can be used and passed the library if you are using this Home Assistant

from homeassistant.helpers.httpx_client import get_async_client to get the shared client

from homeassistant.helpers.httpx_client import create_async_httpx_client to create a new one (if you need to recreate or need you own)