PYTHON-5297 - AsyncMongoClient connection error causes UnboundLocalError#2273
Merged
NoahStapp merged 3 commits intomongodb:masterfrom Apr 10, 2025
Merged
PYTHON-5297 - AsyncMongoClient connection error causes UnboundLocalError#2273NoahStapp merged 3 commits intomongodb:masterfrom
NoahStapp merged 3 commits intomongodb:masterfrom
Conversation
ShaneHarvey
reviewed
Apr 9, 2025
| # Raise _CertificateError directly like we do after match_hostname | ||
| # below. | ||
| raise | ||
| except (OSError, SSLError) as exc: |
Member
There was a problem hiding this comment.
We still call transport.abort() when match_hostname fails below. What happens after abort is called? Don't we need to reap the background tasks somehow to avoid "Task was never awaited" warnings??
Contributor
Author
There was a problem hiding this comment.
There aren't any background tasks associated with the transport, protocol pair here. Are you referring to the monitor background tasks?
Member
There was a problem hiding this comment.
Oh right, I forgot it's callback based.
ShaneHarvey
previously approved these changes
Apr 9, 2025
Member
|
Good to add a changelog entry here referencing the UnboundLocalError bugfix. |
ShaneHarvey
previously approved these changes
Apr 9, 2025
Member
|
drivers-pr-bot please backport to v4.12 |
blink1073
pushed a commit
to blink1073/mongo-python-driver
that referenced
this pull request
Apr 10, 2025
…ror (mongodb#2273) (cherry picked from commit 5b0862e)
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.
No description provided.