Skip to content

Any advice for tracking down the source of the unclosed event loop warning? #541

Answered by seifertm
alcarney asked this question in Q&A
Discussion options

You must be logged in to vote

So perhaps my issue isn't that I'm not closing the loops correctly... but I'm instead running into 2. Your code does not modify the event loop in async fixtures or tests? What would count as modification?

Sorry for the bad wording. Creating tasks should not cause any issues. Modification here essentially means replacing the current event loop within an async test or an async fixture.

I had a brief look at the pytest plugins you're using and none of them seem to do anything like this.

If you're willing to hack a bit, you can try replacing the DeprecationWarning with a ResourceWarning. Originally, the warning was intended as a ResourceWarning, because it allows users to track down the sou…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@alcarney
Comment options

Answer selected by alcarney
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants