Skip to content

Fix blocking API on Python 3.14 (no implicit event loop) - #43

Merged
cpr-mab merged 2 commits into
CommonplaceRobotics:masterfrom
kyeshmz:fix/python-3.14-event-loop
Sep 24, 2026
Merged

cpr-mab merged 2 commits into
CommonplaceRobotics:masterfrom
kyeshmz:fix/python-3.14-event-loop

Conversation

@kyeshmz

@kyeshmz kyeshmz commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

asyncio.get_event_loop() no longer creates an event loop when none is set, so every blocking wrapper raised "There is no current event loop". Run the coroutines through a per-thread loop managed by _run_sync().

kyeshmz and others added 2 commits September 23, 2026 11:13
asyncio.get_event_loop() no longer creates an event loop when none is
set, so every blocking wrapper raised "There is no current event loop".
Run the coroutines through a per-thread loop managed by _run_sync().

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The example called the blocking wrappers from inside a running event
loop, which raises "Cannot run the event loop while another loop is
running". Use the *_async methods with await instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyeshmz

kyeshmz commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

This solves #42 btw

@cpr-mab
cpr-mab merged commit 844b03a into CommonplaceRobotics:master Sep 24, 2026
4 of 5 checks passed
@cpr-mab

cpr-mab commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Thank you for the quick fix!

@kyeshmz
kyeshmz deleted the fix/python-3.14-event-loop branch September 24, 2026 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants