cleanup: turn `pathsuboption` deprecation warning into an error
We could simply drop the check, but lets raise explicit error instead of
suffering strange error in case of misuse.
--- 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)