cmdutil: stop using the `pycompat.open()` shim
Somewhat dubious I suppose, but maybe it makes sense to use the type checking
system to more aggressively use str for trivial things like the `mode` argument
to the function that calls this. That's a project for another day.
--- a/mercurial/cmdutil.py Wed Dec 04 21:05:33 2024 -0500
+++ b/mercurial/cmdutil.py Wed Dec 04 21:09:12 2024 -0500
@@ -30,9 +30,6 @@
nullrev,
short,
)
-from .pycompat import (
- open,
-)
from .thirdparty import attr
# Force pytype to use the non-vendored package
@@ -1406,7 +1403,7 @@
fp = repo.ui.fin
return _unclosablefile(fp)
fn = makefilename(ctx, pat, **props)
- return open(fn, mode)
+ return open(fn, pycompat.sysstr(mode))
def openstorage(repo, cmd, file_, opts, returnrevlog=False):