From: Junio C Hamano <gitster@pobox.com>
To: "James Touton via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, James Touton <bekenn@gmail.com>
Subject: Re: [PATCH v2] git-p4: use raw string literals for regular expressions
Date: Mon, 29 Jan 2024 09:25:54 -0800 [thread overview]
Message-ID: <xmqqle88jbkt.fsf@gitster.g> (raw)
In-Reply-To: <pull.1639.v2.git.1706312496608.gitgitgadget@gmail.com> (James Touton via GitGitGadget's message of "Fri, 26 Jan 2024 23:41:36 +0000")
"James Touton via GitGitGadget" <gitgitgadget@gmail.com> writes:
> 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'.
prev parent reply other threads:[~2024-01-29 17:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-20 18:25 [PATCH] git-p4: use raw string literals for regular expressions James Touton via GitGitGadget
2024-01-20 18:47 ` Junio C Hamano
2024-01-20 19:34 ` James Touton
2024-01-20 21:54 ` Junio C Hamano
2024-01-26 23:41 ` [PATCH v2] " James Touton via GitGitGadget
2024-01-29 17:25 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqle88jbkt.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=bekenn@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).