Sage: Ticket #29567: Fix "invalid escape sequence" when building the doc
https://trac.sagemath.org/ticket/29567
<p>
While building the doc there are messages of the kind
</p>
<pre class="wiki">/dev/shm/portage/sci-mathematics/sage-9999/work/sage-9999/src-python3_7/build/lib/sage/rings/quotient_ring.py:1355: DeprecationWarning: invalid escape sequence \Q
[dynamics ] <unknown>:1355: DeprecationWarning: invalid escape sequence \Q
[algebras ] <unknown>:1355: DeprecationWarning: invalid escape sequence \Q
/dev/shm/portage/sci-mathematics/sage-9999/work/sage-9999/src-python3_7/build/lib/sage/rings/function_field/ideal.py:2218: DeprecationWarning: invalid escape sequence \g
[function_] <unknown>:2218: DeprecationWarning: invalid escape sequence \g
[rings ] <unknown>:1355: DeprecationWarning: invalid escape sequence \Q
[schemes ] <unknown>:1355: DeprecationWarning: invalid escape sequence \Q
[dynamics ] <unknown>:1355: DeprecationWarning: invalid escape sequence \Q
[algebras ] <unknown>:1355: DeprecationWarning: invalid escape sequence \Q
[function_] <unknown>:2218: DeprecationWarning: invalid escape sequence \g
[rings ] <unknown>:1355: DeprecationWarning: invalid escape sequence \Q
[schemes ] <unknown>:1355: DeprecationWarning: invalid escape sequence \Q
</pre><p>
It is apparently caused by jinja and python 3.6+. The guilty escape sequences should be put in raw strings. See <a class="ext-link" href="https://stackoverflow.com/questions/50504500/deprecationwarning-invalid-escape-sequence-what-to-use-instead-of-d"><span class="icon"></span>https://stackoverflow.com/questions/50504500/deprecationwarning-invalid-escape-sequence-what-to-use-instead-of-d</a>
</p>
en-usSagehttps://trac.sagemath.org/chrome/site/logo_sagemath_trac.png
https://trac.sagemath.org/ticket/29567
Trac 1.2François BisseyFri, 24 Apr 2020 10:39:07 GMTcc, commit, branch, author set
https://trac.sagemath.org/ticket/29567#comment:1
https://trac.sagemath.org/ticket/29567#comment:1
<ul>
<li><strong>cc</strong>
<em>John Palmieri</em> added
</li>
<li><strong>commit</strong>
set to <em>8f6e48220392cff66ce83c478aa5bc191aa2277a</em>
</li>
<li><strong>branch</strong>
set to <em>u/fbissey/invalid_escape_sequence</em>
</li>
<li><strong>author</strong>
set to <em>François Bissey</em>
</li>
</ul>
<p>
I remember discussing it in a previous sphinx (1.8) ticket. We had those all over the place. They seem to have reduced. The branch tckle the two I still see in sage-on-gentoo but there could be other masked by one of my patches.
</p>
<hr />
<p>
New commits:
</p>
<table class="wiki">
<tr><td><a class="ext-link" href="https://git.sagemath.org/sage.git/commit?id=8f6e48220392cff66ce83c478aa5bc191aa2277a"><span class="icon"></span>8f6e482</a></td><td><code>fix some invalid escape sequence messages</code>
</td></tr></table>
TicketJohn PalmieriFri, 24 Apr 2020 23:58:53 GMTreviewer set
https://trac.sagemath.org/ticket/29567#comment:2
https://trac.sagemath.org/ticket/29567#comment:2
<ul>
<li><strong>reviewer</strong>
set to <em>John Palmieri</em>
</li>
</ul>
<p>
There are others, but I don't think they come from the Sage library:
</p>
<pre class="wiki">[repl ] <unknown>:181: DeprecationWarning: invalid escape sequence \)
[repl ] <unknown>:365: DeprecationWarning: invalid escape sequence \w
</pre><p>
Is this ready for review? If so, feel free to give it a positive review from me.
</p>
TicketFrançois BisseySat, 25 Apr 2020 00:08:10 GMTstatus changed
https://trac.sagemath.org/ticket/29567#comment:3
https://trac.sagemath.org/ticket/29567#comment:3
<ul>
<li><strong>status</strong>
changed from <em>new</em> to <em>needs_review</em>
</li>
</ul>
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/29567#comment:2" title="Comment 2">jhpalmieri</a>:
</p>
<blockquote class="citation">
<p>
There are others, but I don't think they come from the Sage library:
</p>
<pre class="wiki">[repl ] <unknown>:181: DeprecationWarning: invalid escape sequence \)
[repl ] <unknown>:365: DeprecationWarning: invalid escape sequence \w
</pre><p>
Is this ready for review? If so, feel free to give it a positive review from me.
</p>
</blockquote>
<p>
Those are funny. I see them in vanilla sage but not in sage-on-gentoo. It would be nice to figure them out one day. All I could see under <code>repl</code> was already properly made into a raw string.
</p>
<p>
If you don't have any more clue about it I guess we should already go with the one that are fixed here.
</p>
TicketFrançois BisseySat, 25 Apr 2020 00:10:00 GMTstatus changed
https://trac.sagemath.org/ticket/29567#comment:4
https://trac.sagemath.org/ticket/29567#comment:4
<ul>
<li><strong>status</strong>
changed from <em>needs_review</em> to <em>positive_review</em>
</li>
</ul>
TicketJohn PalmieriSat, 25 Apr 2020 00:31:32 GMT
https://trac.sagemath.org/ticket/29567#comment:5
https://trac.sagemath.org/ticket/29567#comment:5
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/29567#comment:3" title="Comment 3">fbissey</a>:
</p>
<blockquote class="citation">
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/29567#comment:2" title="Comment 2">jhpalmieri</a>:
</p>
<blockquote class="citation">
<p>
There are others, but I don't think they come from the Sage library:
</p>
<pre class="wiki">[repl ] <unknown>:181: DeprecationWarning: invalid escape sequence \)
[repl ] <unknown>:365: DeprecationWarning: invalid escape sequence \w
</pre><p>
Is this ready for review? If so, feel free to give it a positive review from me.
</p>
</blockquote>
<p>
Those are funny. I see them in vanilla sage but not in sage-on-gentoo. It would be nice to figure them out one day. All I could see under <code>repl</code> was already properly made into a raw string.
</p>
<p>
If you don't have any more clue about it I guess we should already go with the one that are fixed here.
</p>
</blockquote>
<p>
I think they come from IPython, so upgrading that should help: <a class="ext-link" href="https://trac.sagemath.org/ticket/28550#comment:2"><span class="icon"></span>https://trac.sagemath.org/ticket/28550#comment:2</a>
</p>
TicketFrançois BisseySat, 25 Apr 2020 00:39:02 GMT
https://trac.sagemath.org/ticket/29567#comment:6
https://trac.sagemath.org/ticket/29567#comment:6
<p>
I am on ipython-7.5 in sage-on-gentoo, that would explain why I don't see them there. I completely missed that ticket.
</p>
TicketVolker BraunSun, 26 Apr 2020 22:45:55 GMTstatus, branch changed; resolution set
https://trac.sagemath.org/ticket/29567#comment:7
https://trac.sagemath.org/ticket/29567#comment:7
<ul>
<li><strong>status</strong>
changed from <em>positive_review</em> to <em>closed</em>
</li>
<li><strong>resolution</strong>
set to <em>fixed</em>
</li>
<li><strong>branch</strong>
changed from <em>u/fbissey/invalid_escape_sequence</em> to <em>8f6e48220392cff66ce83c478aa5bc191aa2277a</em>
</li>
</ul>
TicketMatthias KöppeSat, 02 May 2020 02:15:55 GMTmilestone changed
https://trac.sagemath.org/ticket/29567#comment:8
https://trac.sagemath.org/ticket/29567#comment:8
<ul>
<li><strong>milestone</strong>
changed from <em>sage-9.2</em> to <em>sage-9.1</em>
</li>
</ul>
Ticket