-
Notifications
You must be signed in to change notification settings - Fork 2
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
Bump all dependencies to the latest for testing #92
Conversation
This required some test changes to keep pytest-asyncio 0.23 happy.
For whatever reason, version upgrades now cause an "unclosed transport" ResourceWarning to be emitted if a client is not closed before the event loop. Suppress it.
Python 3.11+ changed the warning for an unclosed transport when the event loop is closed.
loop = async_solipsism.EventLoop() | ||
yield loop | ||
loop.close() | ||
def event_loop_policy(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this magically picked up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's a fixture provided by pytest-asyncio>=0.23 for you to override.
@@ -39,10 +39,8 @@ | |||
|
|||
|
|||
@pytest.fixture | |||
def event_loop(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about the owner
fixture down below that uses event_loop
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pytest-asyncio provides the event_loop
fixture. It just doesn't want you to override it any more as of 0.23 (doing so is deprecated). It also doesn't want you to directly depend on the fixture in async tests, but it's okay in synchronous fixtures.
This required some test changes to keep pytest-asyncio 0.23 happy.