Allows passing in an external httpx.VerifyType (Union[str, bool, ssl.SSLContext]) via the MyBMWAccount constructor.
This is required to stop httpx from loading SSL certificates from disk when initializing a client, as this creates warnings since 2024.9 beta.
2024-09-01 11:35:33.553 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to load_verify_locations with args (<ssl.SSLContext object at 0x7f507d8c46d0>,) inside the event loop by integration 'bmw_connected_drive' at homeassistant/components/bmw_connected_drive/coordinator.py, line 61: await self.account.get_vehicles() (offender: /home/richard/home-assistant-core/venv/lib/python3.12/site-packages/httpx/_config.py, line 147: context.load_verify_locations(cafile=cafile)), please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+bmw_connected_drive%22
For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#load_verify_locations
We're unable to use the HA helper function due to too many adjustments to our client.
Type of change
[x] Bugfix (non-breaking change which fixes an issue)
[ ] New feature (which adds functionality to this library)
[ ] Breaking change (fix/feature causing existing functionality to break)
[ ] Code quality improvements to existing code or addition of tests
Proposed change
Allows passing in an external
httpx.VerifyType
(Union[str, bool, ssl.SSLContext]
) via theMyBMWAccount
constructor. This is required to stop httpx from loading SSL certificates from disk when initializing a client, as this creates warnings since 2024.9 beta.We're unable to use the HA helper function due to too many adjustments to our client.
Type of change
Additional information
Checklist
Tests have been added to verify that the new code works.No idea how to test this inside our lib.