Skip to content

Create event loop when client constructor needs one#19

Draft
Mirochill wants to merge 1 commit into
joernio:masterfrom
Mirochill:fix-18-python314-event-loop
Draft

Create event loop when client constructor needs one#19
Mirochill wants to merge 1 commit into
joernio:masterfrom
Mirochill:fix-18-python314-event-loop

Conversation

@Mirochill

Copy link
Copy Markdown

Fixes #18.

Summary:

  • Add a small event-loop helper for the default CPGQLSClient constructor path.
  • Preserve supplied event_loop instances, while creating and installing a new loop when the current thread has none.
  • Add a regression covering construction with no current event loop.

Validation:

  • git diff --check HEAD~1..HEAD
  • Not run locally: pytest suite, package build, import/runtime check

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RuntimeError: There is no current event loop in thread 'MainThread' with Python > 3.10

1 participant