Mercurial > public > mercurial-scm > hg
diff tests/testlib/persistent-nodemap-race-ext.py @ 50304:805d4a462abb stable
py3: fix for Python 3.12 emitting SyntaxWarning on invalid escape sequences
Mercurial became very noisy after https://github.com/python/cpython/commit/a60ddd31be7ff96a8189e7483bf1eb2071d2bddf ,
for example:
$ python3.12 mercurial/store.py
mercurial/store.py:406: SyntaxWarning: invalid escape sequence '\.'
EXCLUDED = re.compile(b'.*undo\.[^/]+\.(nd?|i)$')
This verbosity made some tests fail.
The problems were mostly insufficiently escaped regexps, relying on the Python
parser/scanner preserving invalid escape sequences.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Tue, 07 Mar 2023 16:45:54 +0100 |
parents | 6000f5b25c9b |
children | 5cc8deb96b48 |
line wrap: on
line diff
--- a/tests/testlib/persistent-nodemap-race-ext.py Tue Mar 07 16:25:51 2023 +0100 +++ b/tests/testlib/persistent-nodemap-race-ext.py Tue Mar 07 16:45:54 2023 +0100 @@ -1,4 +1,4 @@ -"""Create the race condition for issue6554 +r"""Create the race condition for issue6554 The persistent nodemap issues had an issue where a second writer could overwrite the data that a previous write just wrote. The would break the append