# HG changeset patch # User Augie Fackler # Date 2018-05-19 00:42:31 # Node ID 4fccc73ce2f62fc65985f2da95846749c89db183 # Parent 92ac9cf78dba7765b39e32e1380bfa5e51a44ff5 pathencode: hashlib.sha1() takes bytes not str on Python 3 Differential Revision: https://phab.mercurial-scm.org/D3588 diff --git a/mercurial/cext/pathencode.c b/mercurial/cext/pathencode.c --- a/mercurial/cext/pathencode.c +++ b/mercurial/cext/pathencode.c @@ -678,7 +678,7 @@ static int sha1hash(char hash[20], const } } - shaobj = PyObject_CallFunction(shafunc, "s#", str, len); + shaobj = PyObject_CallFunction(shafunc, PY23("s#", "y#"), str, len); if (shaobj == NULL) return -1;