Skip to content
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

Attempt to clean up asyncio.ClientSession objects #10

Closed
wants to merge 1 commit into from

Conversation

gsmecher
Copy link
Owner

@gsmecher gsmecher commented Apr 6, 2024

The global cache (with WeakKeyDictionary) is not sufficient for ipython, for some reason. This change is a little simplistic (for example, we do see closed event loops and are hence unable to trigger close() calls on captive ClientSessions).

@arahlin's more complete option can be found in pone-software/perseus, and is a little longer, a little more intrusive, but doesn't cut corners. We may end up adopting it if this doesn't survive a little testing.

The global cache (with WeakKeyDictionary) is not sufficient for ipython,
for some reason. This change is a little simplistic (for example, we do
see closed event loops and are hence unable to trigger close() calls on
captive ClientSessions).

arahlin's more complete option can be found in pone-software/perseus,
and is a little longer, a little more intrusive, but doesn't cut
corners. We may end up adopting it if this doesn't survive a little
testing.
@gsmecher
Copy link
Owner Author

gsmecher commented Apr 8, 2024

Supplanted by #11

@gsmecher gsmecher closed this Apr 8, 2024
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