py3: convert encoding name and mode to str
Otherwise tolocal() and fromlocal() wouldn't work on Python 3. Still tolocal()
can't make a valid localstr object because localstr inherits str, but it can
return some object without raising exceptions.
Since Py3 bytes() behaves much like bytearray() than str() of Py2, we can't
simply do s/str/bytes/g. I have no good idea to handle str/bytes divergence.
pycompat: extract function that converts attribute or encoding name to str
This will be used to convert encoding.encoding to a str acceptable by
Python 3 functions.
The source encoding is changed to "latin-1" because encoding.encoding can
have arbitrary bytes. Since valid names should consist of ASCII characters,
we don't care about the mapping of non-ASCII characters so long as invalid
names are distinct from valid names.
Added signature for changeset
149433e68974
pycompat: provide 'ispy3' constant
We compare version_info at several places, which seems enough to define
a constant.
Added tag 3.9.2 for changeset
149433e68974
extensions: add a note about debug output during extensions search
These messages do not show up when one use '--debug'. This is quite confusing so
we clarify the situation next to the 'ui.debug' call.
extensions: fix a debug message when searching for extensions
The "next" value was wrong. When 'hgext.NAME' is not found we now search for
'hgext3rd.NAME'.