diff -r 3e5f1fb2aec7 -r 63fd0282ad40 mercurial/node.py --- 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):