[Python-checkins] [3.9] hashlib: Fix old message about unicode objects. (GH-28653) (GH-28679)

miss-islington webhook-mailer at python.org
Fri Oct 1 09:28:28 EDT 2021


https://github.com/python/cpython/commit/8822526caac80a0ab5f0b4722fe947e78c2ada7c
commit: 8822526caac80a0ab5f0b4722fe947e78c2ada7c
branch: 3.9
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2021-10-01T06:28:19-07:00
summary:

[3.9] hashlib: Fix old message about unicode objects. (GH-28653) (GH-28679)



(cherry picked from commit 9ce0f48e918860ffa32751a85b0fe7967723e2e3)


Co-authored-by: Julien Palard <julien at palard.fr>

files:
M Modules/hashlib.h

diff --git a/Modules/hashlib.h b/Modules/hashlib.h
index 978593e2f1a0c..56ae7a5e50bf5 100644
--- a/Modules/hashlib.h
+++ b/Modules/hashlib.h
@@ -8,7 +8,7 @@
 #define GET_BUFFER_VIEW_OR_ERROR(obj, viewp, erraction) do { \
         if (PyUnicode_Check((obj))) { \
             PyErr_SetString(PyExc_TypeError, \
-                            "Unicode-objects must be encoded before hashing");\
+                            "Strings must be encoded before hashing");\
             erraction; \
         } \
         if (!PyObject_CheckBuffer((obj))) { \



More information about the Python-checkins mailing list