Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow passing external SSL context #655

Merged
merged 1 commit into from
Sep 1, 2024

Conversation

rikroe
Copy link
Member

@rikroe rikroe commented Sep 1, 2024

Proposed change

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

  • 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

Additional information

Checklist

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works. No idea how to test this inside our lib.

@rikroe rikroe requested a review from gerard33 September 1, 2024 09:52
@rikroe rikroe merged commit a1c80ca into bimmerconnected:master Sep 1, 2024
11 checks passed
@rikroe rikroe removed the request for review from gerard33 September 1, 2024 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BMW Connected Drive - Detected blocking call warning during HASS startup with 2024.9.0b2
1 participant