-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
Remove base64.encodestring() and base64.decodestring() aliases, deprecated since Python 3.1 #83532
Comments
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(). |
The deprecation was introduced 11 years ago in bpo-3613 by this change: commit b54d801
The aliases were deprecated for 7 cycles (Python 3.1 to Python 3.8). |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: