Changes between Initial Version and Version 3 of Ticket #36872
- Timestamp:
- Jan 21, 2026, 6:49:48 AM (3 weeks ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #36872 – Description
initial v3 65 65 # My proposal begins 66 66 if asyncio.iscoroutine(obj): 67 try: 68 loop = asyncio.get_event_loop() 69 except RuntimeError: 70 loop = asyncio.new_event_loop() 71 asyncio.set_event_loop(loop) 72 73 if loop.is_running(): 74 obj = loop.run_until_complete(obj) 75 else: 76 obj = asyncio.run(obj) 67 obj = async_to_sync(lambda: obj)() 77 68 # My proposal ends 78 69