diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist
--- a/contrib/python3-whitelist
+++ b/contrib/python3-whitelist
@@ -198,6 +198,7 @@
 test-extensions-afterloaded.t
 test-extensions-wrapfunction.py
 test-extra-filelog-entry.t
+test-fastannotate-revmap.py
 test-fetch.t
 test-filebranch.t
 test-filecache.py
diff --git a/tests/test-fastannotate-revmap.py b/tests/test-fastannotate-revmap.py
--- a/tests/test-fastannotate-revmap.py
+++ b/tests/test-fastannotate-revmap.py
@@ -14,7 +14,7 @@
     xrange = range
 
 def genhsh(i):
-    return chr(i) + b'\0' * 19
+    return pycompat.bytechr(i) + b'\0' * 19
 
 def gettemppath():
     fd, path = tempfile.mkstemp()