kr8s-org / kr8s

A batteries-included Python client library for Kubernetes that feels familiar for folks who already know how to use kubectl
https://kr8s.org
BSD 3-Clause "New" or "Revised" License
839 stars 45 forks source link

Move asyncio.get_event_loop() into coroutine #454

Closed jacobtomlinson closed 3 months ago

jacobtomlinson commented 3 months ago

Fixes #285

When calling asyncio.get_event_loop() in an __init__() was causing problems in IPython. This PR moves that call into a coroutine so that is run via the anyio portal where there is guaranteed to be an event loop.

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.03%. Comparing base (87063fc) to head (8f1eaf0). Report is 126 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #454 +/- ## ========================================== + Coverage 94.61% 95.03% +0.41% ========================================== Files 29 30 +1 Lines 3141 3884 +743 ========================================== + Hits 2972 3691 +719 - Misses 169 193 +24 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.