diff -r d8f65fc72e7b -r 5c9c41273367 mercurial/utils/urlutil.py --- a/mercurial/utils/urlutil.py Wed Nov 08 22:13:14 2023 +0100 +++ b/mercurial/utils/urlutil.py Wed Nov 08 22:17:41 2023 +0100 @@ -14,7 +14,6 @@ error, pycompat, urllibcompat, - util, ) from . import ( @@ -680,8 +679,7 @@ """ if isinstance(attr, bytes): msg = b'pathsuboption take `str` as "attr" argument, not `bytes`' - util.nouideprecwarn(msg, b"6.6", stacklevel=2) - attr = attr.decode('ascii') + raise TypeError(msg) def register(func): _pathsuboptions[option] = (attr, func)