pathencode: hashlib.sha1() takes bytes not str on Python 3
authorAugie Fackler <augie@google.com>
Fri, 18 May 2018 20:42:31 -0400
changeset 38055 4fccc73ce2f6
parent 38054 92ac9cf78dba
child 38056 9aaa74f9eb87
pathencode: hashlib.sha1() takes bytes not str on Python 3 Differential Revision: https://phab.mercurial-scm.org/D3588
mercurial/cext/pathencode.c
--- a/mercurial/cext/pathencode.c	Fri May 18 20:42:04 2018 -0400
+++ b/mercurial/cext/pathencode.c	Fri May 18 20:42:31 2018 -0400
@@ -678,7 +678,7 @@
 		}
 	}
 
-	shaobj = PyObject_CallFunction(shafunc, "s#", str, len);
+	shaobj = PyObject_CallFunction(shafunc, PY23("s#", "y#"), str, len);
 
 	if (shaobj == NULL)
 		return -1;