This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author david__
Recipients JustAnother1, barry, david__, giampaolo.rodola, r.david.murray, taleinat
Date 2018-06-17.19:11:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CA+UPfZ5GdSwChafJyZje4zQ-EmKxg+AtfmGW6saJZk+WFmqs1A@mail.gmail.com>
In-reply-to <1529262209.73.0.56676864532.issue29750@psf.upfronthosting.co.za>
Content
I would like to see the second option (allow both, warning on non-ascii)

On 17 June 2018 at 21:03, Tal Einat <report@bugs.python.org> wrote:

>
> Tal Einat <taleinat@gmail.com> added the comment:
>
> > And yes, by binary passwords I mean that the module needs to support
> being passed a bytes-like object as the password, since clearly there are
> servers "in the wild" that support non-ascii passwords and the only way to
> be sure one can send the server the correct password is by treating it as a
> series of bytes.  The library caller will have to be responsible for
> picking the correct encoding based on local knowledge.
>
> Perhaps we should make smtplib accept only bytes, passing on the
> responsibility of using an appropriate encoding to its users?  This seems
> like the most straightforward and transparent choice. It would not be
> backwards-compatible, though.
>
> Alternatively, we could change smtplib to accept passwords as bytes or
> strings, but raise an informative exception when given strings with
> non-ASCII characters.  As now, users could be surprised if they have been
> passing passwords as string and hadn't tested their use of smtplib with
> non-ASCII passwords.  We'd just improve the exception and documentation to
> clarify the situation.
>
> ----------
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue29750>
> _______________________________________
>
History
Date User Action Args
2018-06-17 19:11:31david__setrecipients: + david__, barry, taleinat, giampaolo.rodola, r.david.murray, JustAnother1
2018-06-17 19:11:31david__linkissue29750 messages
2018-06-17 19:11:31david__create