Skip to content

Conversation

@haraldschilly
Copy link
Contributor

The _retry_with_backoff function in jupyter.py was using time.sleep, which blocks the event loop when called from the async jupyter_execute function.

This commit replaces the synchronous _retry_with_backoff with an asynchronous version that uses asyncio.sleep to prevent blocking the event loop. The jupyter_execute function has been updated to be async and use the new retry logic.

I also fixed a bug where newline characters were being escaped in f-strings.

The `_retry_with_backoff` function in `jupyter.py` was using `time.sleep`, which blocks the event loop when called from the async `jupyter_execute` function.

This commit replaces the synchronous `_retry_with_backoff` with an asynchronous version that uses `asyncio.sleep` to prevent blocking the event loop. The `jupyter_execute` function has been updated to be async and use the new retry logic.

I also fixed a bug where newline characters were being escaped in f-strings.
@haraldschilly haraldschilly added PR-needs testing work done, only testing left to do PR-TODO-cocalc2 merge/migrate this PR into CoCalc2 in the future labels Jan 16, 2026
@haraldschilly
Copy link
Contributor Author

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Nice work!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR-needs testing work done, only testing left to do PR-TODO-cocalc2 merge/migrate this PR into CoCalc2 in the future

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant