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

Fix ResourceWarning due to unclosed http object during download #150

Conversation

DerDreschner
Copy link
Contributor

When running the tests, I get the following warning in the console:

/IdeaProjects/icalevents/icalevents/icalevents.py:82: ResourceWarning: unclosed <ssl.SSLSocket fd=3, family=2, type=1, proto=6, laddr=('172.17.0.2', 46590), raddr=('185.199.111.133', 443)>
  data += events(
ResourceWarning: Enable tracemalloc to get the object allocation traceback

This happens as the HTTP object isn't closed after the request. It may be closed by the garbage collector during longer runtimes, but in my opinion, it's cleaner to do it manually when the connection isn't needed anymore.

@DerDreschner
Copy link
Contributor Author

This change is obsolete by #154 as it doesn't happen with urllib3 anymore.

@DerDreschner DerDreschner deleted the fix/unclosed-http-connection branch January 17, 2025 09:35
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