Message319828
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>
> _______________________________________
> |
|
Date |
User |
Action |
Args |
2018-06-17 19:11:31 | david__ | set | recipients:
+ david__, barry, taleinat, giampaolo.rodola, r.david.murray, JustAnother1 |
2018-06-17 19:11:31 | david__ | link | issue29750 messages |
2018-06-17 19:11:31 | david__ | create | |
|