bpo-36348: IMAP4.logout() doesn't ignore exc#12411
Merged
vstinner merged 1 commit intopython:masterfrom Apr 15, 2019
vstinner:imaplib_logout
Merged
bpo-36348: IMAP4.logout() doesn't ignore exc#12411vstinner merged 1 commit intopython:masterfrom vstinner:imaplib_logout
vstinner merged 1 commit intopython:masterfrom
vstinner:imaplib_logout
Conversation
matrixise
reviewed
Mar 18, 2019
Lib/imaplib.py
Outdated
Member
|
title: "does not ignore"? |
The imap.IMAP4.logout() method no longer ignores silently arbitrary exceptions. Changes: * The IMAP4.logout() method now expects a "BYE" untagged response, rather than relying on _check_bye() which raises a self.abort() exception. * IMAP4.__exit__() now does nothing if the client already logged out. * Add more debug info if test_logout() tests fail.
Member
Author
|
I'm not sure if this change will fix the random failures on buildbot, since _command() wraps socket exceptions into self.abort(). Example if you revert my |
Member
Author
|
I tried but failed to reproduce the buildbot failure: https://bugs.python.org/issue36348#msg338233 I ran "./python -u -m test -u all -m test_logout -v test_imaplib" 4 times in parallel and I modified the tests to remove transient_internet(). |
Member
Author
|
I plan to merge this PR at the end of the week. @bitdancer, @warsaw: Would you mind to have a look? |
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.
The imap.IMAP4.logout() method no longer ignores silently arbitrary
exceptions.
Changes:
rather than relying on _check_bye() which raises a self.abort()
exception.
https://bugs.python.org/issue36348