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
799 stars 43 forks source link

Move asyncio.get_event_loop() into coroutine #454

Closed jacobtomlinson closed 2 months ago

jacobtomlinson commented 2 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.