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 vstinner
Recipients vstinner
Date 2020-01-16.08:25:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1579163117.18.0.498681758214.issue39351@roundup.psfhosted.org>
In-reply-to
Content
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().
History
Date User Action Args
2020-01-16 08:25:17vstinnersetrecipients: + vstinner
2020-01-16 08:25:17vstinnersetmessageid: <1579163117.18.0.498681758214.issue39351@roundup.psfhosted.org>
2020-01-16 08:25:17vstinnerlinkissue39351 messages
2020-01-16 08:25:17vstinnercreate