Fix asyncio SSL unclosed warning#210
Merged
fantix merged 2 commits intogeldata:masterfrom Aug 6, 2021
Merged
Conversation
elprans
approved these changes
Aug 6, 2021
1st1
reviewed
Aug 6, 2021
| # properly, leading to false ResourceWarning. Let's fix that by | ||
| # closing the transport again. | ||
| if not self._transport.is_closing(): | ||
| self._transport.close() |
Member
There was a problem hiding this comment.
Should this be copied to terminate()?
Member
Author
There was a problem hiding this comment.
I think _AsyncIOConnectionImpl.terminate() is fine, because it calls AsyncIOProtocol.abort() which closes the transport.
Member
Author
There was a problem hiding this comment.
But maybe moving this logic to AsyncIOProtocol.connection_lost() is a better idea - so that the transport is always marked as closed as far as connection_lost() is called.
elprans
added a commit
that referenced
this pull request
Aug 7, 2021
Fixes ===== * Fix failing tests regarding --help (#207) (by @fantix in 956a2ca for #207) * Fix confusing error when no arguments are passed to a query with named params (#208) (by @elprans in 8e0b334 for #208) * Add Python 3.10 compatibility (#209) (by @elprans in 3472f17 for #209) * Fix asyncio SSL unclosed warning (#210) (by @fantix in d718839 for #210) * More reliable transport double-closing (by @fantix in 337b779) * Rename `query_one` to `query_single` (by @fmoor in f6900b0)
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sample test run: https://github.com/fantix/edgedb/runs/3244328000