Skip to content

Remove use of deprecated function from test synchronizer #1203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

seifertm
Copy link
Contributor

The function wrap_in_sync makes use of of _get_event_loop_no_warn which uses deprecated asyncio functionality.

This PR removes the use of _get_event_loop_no_warn inside wrap_in_sync by hoisting the decision logic for determining the current event loop one level higher. PytestAsyncTest now determines the applicable runner fixture and passes it to wrap_in_sync.

Lastly, the PR renames wrap_in_sync to _synchronize_coroutine.

@seifertm
Copy link
Contributor Author

Degrading this PR to draft state, because the changes cause a warning to be emitted twice.

@seifertm seifertm marked this pull request as draft August 24, 2025 15:13
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.

1 participant