You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey there. I'm using atlassian_jwt_auth in an ayncio context; specifically using pytest-asyncio for the event loop creation. By default this library creates a new event loop for each test. (This is my desired behavior.)
However when running two tests that both utilize the HTTPSPublicKeyRetriever, the second test fails because the cached HTTPSPublicKeyRetriever._class_session is used with a now-shutdown event loop.
However this feels sort of wacky. Ideally I'd like the library to detect this and invalidate the _class_session either when the loop is shut down or when the session is gotten.
Adding a conditional here of client.loop != self.loop fixes the issue, but client.loop is deprecated in aiohttp and actually has been removed in the newest master branch.
The text was updated successfully, but these errors were encountered:
Hey there. I'm using
atlassian_jwt_auth
in an ayncio context; specifically using pytest-asyncio for the event loop creation. By default this library creates a new event loop for each test. (This is my desired behavior.)However when running two tests that both utilize the HTTPSPublicKeyRetriever, the second test fails because the cached
HTTPSPublicKeyRetriever._class_session
is used with a now-shutdown event loop.I've gotten around this with a fixture like so:
However this feels sort of wacky. Ideally I'd like the library to detect this and invalidate the _class_session either when the loop is shut down or when the session is gotten.
Adding a conditional here of
client.loop != self.loop
fixes the issue, butclient.loop
is deprecated in aiohttp and actually has been removed in the newest master branch.The text was updated successfully, but these errors were encountered: