Message360096
base64.encodestring() and base64.decodestring() are aliases deprecated since Python 3.1: encodebytes() and decodebytes() should be used instead.
In Python 3, "string" means Unicode, whereas these functions really work at the bytes level:
>>> base64.encodestring("text")
TypeError: expected bytes-like object, not str
>>> base64.decodestring("text")
TypeError: expected bytes-like object, not str
encodebytes() and decodebytes() names are explicit on the expected types (bytes or bytes-like).
This issue is similar to bpo-38916: "Remove array.fromstring() and array.tostring() aliases, deprecated since Python 3.2".
Attached PR removes the deprecated aliases base64.encodestring() and base64.decodestring(). |
|
Date |
User |
Action |
Args |
2020-01-16 08:25:17 | vstinner | set | recipients:
+ vstinner |
2020-01-16 08:25:17 | vstinner | set | messageid: <1579163117.18.0.498681758214.issue39351@roundup.psfhosted.org> |
2020-01-16 08:25:17 | vstinner | link | issue39351 messages |
2020-01-16 08:25:17 | vstinner | create | |
|