Re: [PATCH v2] git-p4: use raw string literals for regular expressions
"James Touton via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 39 quoted lines
> From: James Touton <bekenn@gmail.com>
>
> Fixes several Python diagnostics about invalid escape sequences. The
> diagnostics appear for me in Python 3.12, and may appear in earlier
> versions. The fix is to use raw string literals so that backslashes are
> not interpreted as introducing escape sequences. Raw string literals
> are already in use in this file, so adding more does not impact
> toolchain compatibility.
>
> Signed-off-by: James Touton <bekenn@gmail.com>
> ---
> git-p4: use raw string literals for regular expressions
>
> Changes since v1:
>
> * Updated commit message to include the Python version where the
> diagnostics were observed.
>
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1639%2FBekenn%2Fp4-raw-strings-v2
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1639/Bekenn/p4-raw-strings-v2
> Pull-Request: https://github.com/gitgitgadget/git/pull/1639
>
> Range-diff vs v1:
>
> 1: 1ea38dc4643 ! 1: 122ff28ffbd git-p4: use raw string literals for regular expressions
> @@ Metadata
> ## Commit message ##
> git-p4: use raw string literals for regular expressions
>
> - Fixes several Python diagnostics about invalid escape sequences.
> + Fixes several Python diagnostics about invalid escape sequences. The
> + diagnostics appear for me in Python 3.12, and may appear in earlier
> + versions. The fix is to use raw string literals so that backslashes are
> + not interpreted as introducing escape sequences. Raw string literals
> + are already in use in this file, so adding more does not impact
> + toolchain compatibility.
>
> Signed-off-by: James Touton <bekenn@gmail.com>
>
Thanks. Let's merge it down to 'next'.