-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
gh-91099: fix[imaplib]: call Exception with string instance #31823
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
base: main
Are you sure you want to change the base?
gh-91099: fix[imaplib]: call Exception with string instance #31823
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
@spaceone Could you sign the new CLA by clicking |
I tried but get a white screen with |
No worries, your click was accepted. The displayed error is a known although yet untracked problem. |
@python/email-team |
Adjust the behavior similar to `authenticate()` where self.error is called with a str() instance. Especially for Python3 with strict bytes mode (-bb) this is helpful and prevents: Traceback (most recent call last): in "<stdin>" self.login(email, password) File "/usr/lib/python3.7/imaplib.py", line 598, in login raise self.error(dat[-1]) imaplib.error: <exception str() failed> During handling of the above exception, another exception occurred: Traceback (most recent call last): in "<stdin>" str(exc) BytesWarning: str() on a bytes instance
300787f
to
4b7fa1c
Compare
rebased :-) |
4b7fa1c
to
0a9dc07
Compare
Adjust the behavior of
login()
similar toauthenticate()
whereself.error
is called with astr
instance.Especially for Python3 with strict bytes mode (-bb) this is helpful and prevents:
https://bugs.python.org/issue46943