mercurial/node.py
changeset 49248 63fd0282ad40
parent 48946 642e31cb55f0
child 51863 f4733654f144
--- a/mercurial/node.py	Mon May 30 00:45:00 2022 +0200
+++ b/mercurial/node.py	Mon May 30 16:18:12 2022 +0200
@@ -10,14 +10,7 @@
 
 # This ugly style has a noticeable effect in manifest parsing
 hex = binascii.hexlify
-# Adapt to Python 3 API changes. If this ends up showing up in
-# profiles, we can use this version only on Python 3, and forward
-# binascii.unhexlify like we used to on Python 2.
-def bin(s):
-    try:
-        return binascii.unhexlify(s)
-    except binascii.Error as e:
-        raise TypeError(e)
+bin = binascii.unhexlify
 
 
 def short(node):