On Sat, Jan 20, 2024 at 10:47 AM Junio C Hamano <gitster@xxxxxxxxx> wrote: > > "James Touton via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes: > > > From: James Touton <bekenn@xxxxxxxxx> > > > > Fixes several Python diagnostics about invalid escape sequences. > > Thanks for noticing, but we want a bit more backstory explained here > in the proposed commit log message, outlining: > > 1. With what version of Python the deprecation warning started. > > This will help us judge the urgency of the fix. If I am reading the > docs.python.org/$version/howto/regex.html right, we do not see this > > In addition, special escape sequences that are valid in regular > expressions, but not valid as Python string literals, now result > in a DeprecationWarning and will eventually become a > SyntaxError, which means the sequences will be invalid if raw > string notation or escaping the backslashes isn’t used. > > in Python 3.5's document, but Python 3.6's document starts talking > about the warning. Python 3.6 was released at the end of 2016 so it > is 7 years old---users have lived with the warning for this many > years, so if the above reasoning is correct, this is not all that > urgent to require a maintenance release. > > 2. How well the new construct, used by the code after applying this > patch, is supported by older version of Python. > > This will assure us that the change will not be robbing from users > of older versions of Python to pay users of newer versions of > Python. Again, if I am reading the documentation right, feeding r'' > raw strings to regexp engine was supported even by Python 2.7, which > is what git-p4.py already requires, so we should be OK. > > But we want the developers who propose a change to explain why it is > a good idea, and why it is a safe change to make, in their proposed > commit log message, instead of forcing the reviewers to do that for > them. > > For other syntactic and linguistic hints on writing a proposed log > message, please check Documentation/SubmittingPatches document. > > Thanks, again. Thanks for the notes, I will update this when I have the opportunity. Raw strings were already present in the file, just not in these particular locations. Given that, I wouldn't expect them to need any particular explanation; do you still want some mention of compatibility constraints, or is it enough to mention that they're already in use?