File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -276,6 +276,12 @@ async def alog_response(*args, **kwargs):
276276 self ._limiter = _Limiter (rate_limit = RATE_LIMIT , max_workers = MAX_ACTIVE )
277277 self .outcomes : Counter [str ] = Counter ()
278278
279+ self ._loop : asyncio .AbstractEventLoop = None # type: ignore
280+
281+ def _init_loop (self ):
282+ if self ._loop :
283+ return
284+
279285 # create a dedicated event loop for this httpx session.
280286 def _start_background_loop (loop ):
281287 asyncio .set_event_loop (loop )
@@ -288,6 +294,7 @@ def _start_background_loop(loop):
288294 self ._loop_thread .start ()
289295
290296 def _call_sync (self , f : Awaitable [T ]) -> T :
297+ self ._init_loop ()
291298 return asyncio .run_coroutine_threadsafe (f , self ._loop ).result ()
292299
293300 @classmethod
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ name = "planet"
77authors = [{ name = " Planet" , email = " python-sdk-contributors@planet.com" }]
88description = " Planet SDK for Python"
99dependencies = [
10- " click>=8.0" ,
10+ " click ( >=8.0,!=8.2.1) " ,
1111 " geojson" ,
1212 " httpx>=0.28.0" ,
1313 " jsonschema" ,
You can’t perform that action at this time.
0 commit comments