Manuel Jacob <me@manueljacob.de> [Mon, 07 Aug 2023 23:12:02 +0200] rev 50767
hgweb: encode WSGI environment using the ISO-8859-1 codec
The WSGI specification (PEP 3333) specifies that on Python 3 all strings passed
by the server must be of type str with code points encodable using the ISO
8859-1 codec.
For some reason, I introduced a bug in 2632c1ed8f34 by applying the reverse
change. Maybe I got confused because PEP 3333 says that arbitrary operating
system environment variables may be contained in the WSGI environment and
therefore we need to handle the WSGI environment variables like we would handle
operating system environment variables.
The bug mentioned in the previous paragraph and fixed by this changeset
manifested e.g. in the path of the URL being encoded in the wrong way. Browsers
encode non-ASCII bytes with the percent-encoding. WSGI servers will decode the
percent-encoded bytes and pass them to the application as strings where each
byte is mapped to the corresponding code point with the same ordinal (i.e. it
is decoded using the ISO-8859-1 codec). Mercurial uses the bytes type for these
strings (which makes much more sense), so we need to encode it again using the
ISO-8859-1 codec. If we use another codec, it can result in nonsense.
Manuel Jacob <me@manueljacob.de> [Mon, 07 Aug 2023 23:12:02 +0200] rev 50766
hgweb: encode WSGI environment using the ISO-8859-1 codec
The WSGI specification (PEP 3333) specifies that on Python 3 all strings passed
by the server must be of type str with code points encodable using the ISO
8859-1 codec.
For some reason, I introduced a bug in 2632c1ed8f34 by applying the reverse
change. Maybe I got confused because PEP 3333 says that arbitrary operating
system environment variables may be contained in the WSGI environment and
therefore we need to handle the WSGI environment variables like we would handle
operating system environment variables.
The bug mentioned in the previous paragraph and fixed by this changeset
manifested e.g. in the path of the URL being encoded in the wrong way. Browsers
encode non-ASCII bytes with the percent-encoding. WSGI servers will decode the
percent-encoded bytes and pass them to the application as strings where each
byte is mapped to the corresponding code point with the same ordinal (i.e. it
is decoded using the ISO-8859-1 codec). Mercurial uses the bytes type for these
strings (which makes much more sense), so we need to encode it again using the
ISO-8859-1 codec. If we use another codec, it can result in nonsense.
Raphaël Gomès <rgomes@octobus.net> [Mon, 07 Aug 2023 11:05:43 +0200] rev 50765
Added signature for changeset 787af4e0e8b7
Raphaël Gomès <rgomes@octobus.net> [Mon, 07 Aug 2023 11:05:27 +0200] rev 50764
Added tag 6.5.1 for changeset 787af4e0e8b7
Raphaël Gomès <rgomes@octobus.net> [Mon, 07 Aug 2023 11:04:53 +0200] rev 50763
relnotes: add 6.5.1
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 22 Jun 2023 16:02:12 +0200] rev 50762
perf: fix perf::tags
That return is invalid and unnecessary.
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 21 Jul 2023 15:50:56 +0200] rev 50761
revlog: fix the naming scheme use by split temporary file
The `-s` is now added on the first piece only and the `.i` is added to the
index. This match the initially intended naming scheme.
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 21 Jul 2023 15:15:43 +0200] rev 50760
revlog: show that temporary split file use broken name scheme
The `-s` is added on the wrong part and the `.i` is missing.
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 13 Jul 2023 19:36:43 +0100] rev 50759
fncache: fix a bug that corrupts the fncache after transaction rollback
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 13 Jul 2023 19:26:45 +0100] rev 50758
fncache: add a test demonstrating fncache corruption
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 19 Jul 2023 21:45:39 +0200] rev 50757
compat: use cp -R in `test-revlog-delta-find.t` (issue6835)
This follow POSIX and make things compatible with NetBSD.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 19 Jul 2023 17:42:33 +0200] rev 50756
compat: use cp -R in `test-bundle-phase-internal.t` (issue6835)
This follow POSIX and make things compatible with NetBSD.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 12 Jul 2023 12:47:08 +0200] rev 50755
repoview: fix the filter created by `extrafilter`
The `name` variable was updated in each interaction of the loop, making all new
filters inheriting from the same base (the last one iterated), leading to
terrible terrible misbehavior.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 12 Jul 2023 12:46:58 +0200] rev 50754
repoview: show `extrafilter` misbehave when other filtering is in play
See new changeset for fix and details.
Mads Kiilerich <mads@kiilerich.com> [Wed, 28 Jun 2023 14:23:13 +0200] rev 50753
extensions: imp module is removed in Python 3.12 - use importlib to load files
imp has been deprecated for a long time, and has finally been removed in Python
3.12 .
imp was only used for loading extensions that has been specified with direct
.py path or path to a package directory. The same use cases can be achieved
quite simple with importlib, , possiby with small changes in corner cases with
undefined behaviour, such as extensions without .py source.
There might also be corner cases and undefined behaviour around use of
sys.modules and reloading.
Mads Kiilerich <mads@kiilerich.com> [Tue, 27 Jun 2023 13:05:03 +0200] rev 50752
utils: imp module is removed in Python 3.12 - get is_frozen() from _imp
imp has been deprecated for a long time, and has finally been removed in Python
3.12 .
The successor importlib is using the same internal _imp module as imp, but
doesn't expose it's is_frozen. Using the internal function directly seems like
the cleanest solution.
Another alternative to
imp.is_frozen("__main__")
is
sys.modules['__main__'].__spec__.origin == 'frozen'
but that seems even more internal and fragile.