Message ID | 20240328-yocto-patches-v1-1-1124fa0bc532@theobroma-systems.com |
---|---|
State | New |
Headers | show |
Series | new yocto-patches ML + some typo/syntax fixes | expand |
Hi Quentin Thanks for the patch! On 3/28/24 at 16:07, Quentin Schulz wrote: > From: Quentin Schulz <quentin.schulz@theobroma-systems.com> > > There are some syntax warnings returned by Python: > """ > yocto-docs/documentation/conf.py:162: SyntaxWarning: invalid escape sequence '\P' > 'passoptionstopackages': '\PassOptionsToPackage{bookmarksdepth=5}{hyperref}', > yocto-docs/documentation/conf.py:163: SyntaxWarning: invalid escape sequence '\s' > 'preamble': '\setcounter{tocdepth}{2}', > """ > > Backslashes must be doubled in Python string literals to avoid > interpretation as escape sequence, c.f. > https://www.sphinx-doc.org/en/master/latex.html#module-latex. What command(s) were you running to get the error? I didn't see it. Anyway: Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Merged into "master-next" Cheers Michael.
Hi Michael, On 3/29/24 12:12, Michael Opdenacker wrote: > Hi Quentin > > Thanks for the patch! > > On 3/28/24 at 16:07, Quentin Schulz wrote: >> From: Quentin Schulz <quentin.schulz@theobroma-systems.com> >> >> There are some syntax warnings returned by Python: >> """ >> yocto-docs/documentation/conf.py:162: SyntaxWarning: invalid escape >> sequence '\P' >> 'passoptionstopackages': >> '\PassOptionsToPackage{bookmarksdepth=5}{hyperref}', >> yocto-docs/documentation/conf.py:163: SyntaxWarning: invalid escape >> sequence '\s' >> 'preamble': '\setcounter{tocdepth}{2}', >> """ >> >> Backslashes must be doubled in Python string literals to avoid >> interpretation as escape sequence, c.f. >> https://www.sphinx-doc.org/en/master/latex.html#module-latex. > > What command(s) were you running to get the error? I didn't see it. Normal build instructions, just using Python 3.12.2 on Fedora 39. https://docs.python.org/3/whatsnew/3.12.html#other-language-changes """ A backslash-character pair that is not a valid escape sequence now generates a SyntaxWarning, instead of DeprecationWarning. For example, re.compile("\d+\.\d+") now emits a SyntaxWarning ("\d" is an invalid escape sequence, use raw strings for regular expression: re.compile(r"\d+\.\d+")). In a future Python version, SyntaxError will eventually be raised, instead of SyntaxWarning. (Contributed by Victor Stinner in gh-98401.) """ Cheers, Quentin
diff --git a/documentation/conf.py b/documentation/conf.py index a64685ec9..35c5c1453 100644 --- a/documentation/conf.py +++ b/documentation/conf.py @@ -159,8 +159,8 @@ html_last_updated_fmt = '%b %d, %Y' html_secnumber_suffix = " " latex_elements = { - 'passoptionstopackages': '\PassOptionsToPackage{bookmarksdepth=5}{hyperref}', - 'preamble': '\setcounter{tocdepth}{2}', + 'passoptionstopackages': '\\PassOptionsToPackage{bookmarksdepth=5}{hyperref}', + 'preamble': '\\setcounter{tocdepth}{2}', } # Make the EPUB builder prefer PNG to SVG because of issues rendering Inkscape SVG