https://github.com/python/cpython/commit/b994feeca78f8ff81666b0e8a40fe2003986f6c7 commit: b994feeca78f8ff81666b0e8a40fe2003986f6c7 branch: 3.10 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月01日T05:58:37-07:00 summary: hashlib: Fix old message about unicode objects. (GH-28653) (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))) { \