Thu, 02 Jun 2022 04:39:49 +0200 py3: don’t subscript socket.error stable
Manuel Jacob <me@manueljacob.de> [Thu, 02 Jun 2022 04:39:49 +0200] rev 49274
py3: don’t subscript socket.error On Python 2, socket.error was subscriptable. On Python 3, socket.error is an alias to OSError and is not subscriptable. The except block passes the exception to self.send_error(). This fails on both Python 2 (if it was executed) and Python 3, as it expects a string. Getting the attribute .strerror works on Python 2 and Python 3, and has the same effect as the previous code on Python 2.
Mon, 06 Jun 2022 13:58:32 +0400 parsers: drop one extra argument to PyErr_Format
Anton Shestakov <av6@dwimlabs.net> [Mon, 06 Jun 2022 13:58:32 +0400] rev 49273
parsers: drop one extra argument to PyErr_Format GCC gave the following warning during `make local`: mercurial/cext/parsers.c: In function 'dirstate_item_from_v1_data': mercurial/cext/parsers.c:413:30: warning: too many arguments for format [-Wformat-extra-args] 413 | "unknown state: `%c` (%d, %d, %d)", state, mode, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To reproduce, you might need to add the -Wformat-extra-args flag, because it isn't present for me when building for the default python3. But I can see this warning while simply building 6.1 with `make PYTHON=python2 clean local`. I don't think this NULL was useful, because other instances of PyErr_Format() don't have any NULLs as the final argument, but keep in mind that I don't know python's C API.
(0) -30000 -10000 -3000 -1000 -300 -100 -30 -10 -2 +2 +10 +30 +100 +300 +1000 tip