#29567 closed defect (fixed)
Fix "invalid escape sequence" when building the doc
Reported by: | fbissey | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-9.1 |
Component: | documentation | Keywords: | |
Cc: | jhpalmieri | Merged in: | |
Authors: | François Bissey | Reviewers: | John Palmieri |
Report Upstream: | N/A | Work issues: | |
Branch: | 8f6e482 (Commits, GitHub, GitLab) | Commit: | 8f6e48220392cff66ce83c478aa5bc191aa2277a |
Dependencies: | Stopgaps: |
Description
While building the doc there are messages of the kind
/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
It is apparently caused by jinja and python 3.6+. The guilty escape sequences should be put in raw strings. See https://stackoverflow.com/questions/50504500/deprecationwarning-invalid-escape-sequence-what-to-use-instead-of-d
Change History (8)
comment:1 Changed 21 months ago by
- Branch set to u/fbissey/invalid_escape_sequence
- Cc jhpalmieri added
- Commit set to 8f6e48220392cff66ce83c478aa5bc191aa2277a
comment:2 follow-up: ↓ 3 Changed 21 months ago by
- Reviewers set to John Palmieri
There are others, but I don't think they come from the Sage library:
[repl ] <unknown>:181: DeprecationWarning: invalid escape sequence \) [repl ] <unknown>:365: DeprecationWarning: invalid escape sequence \w
Is this ready for review? If so, feel free to give it a positive review from me.
comment:3 in reply to: ↑ 2 ; follow-up: ↓ 5 Changed 21 months ago by
- Status changed from new to needs_review
Replying to jhpalmieri:
There are others, but I don't think they come from the Sage library:
[repl ] <unknown>:181: DeprecationWarning: invalid escape sequence \) [repl ] <unknown>:365: DeprecationWarning: invalid escape sequence \wIs this ready for review? If so, feel free to give it a positive review from me.
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 repl
was already properly made into a raw string.
If you don't have any more clue about it I guess we should already go with the one that are fixed here.
comment:4 Changed 21 months ago by
- Status changed from needs_review to positive_review
comment:5 in reply to: ↑ 3 Changed 21 months ago by
Replying to fbissey:
Replying to jhpalmieri:
There are others, but I don't think they come from the Sage library:
[repl ] <unknown>:181: DeprecationWarning: invalid escape sequence \) [repl ] <unknown>:365: DeprecationWarning: invalid escape sequence \wIs this ready for review? If so, feel free to give it a positive review from me.
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
repl
was already properly made into a raw string.If you don't have any more clue about it I guess we should already go with the one that are fixed here.
I think they come from IPython, so upgrading that should help: https://trac.sagemath.org/ticket/28550#comment:2
comment:6 Changed 21 months ago by
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.
comment:7 Changed 21 months ago by
- Branch changed from u/fbissey/invalid_escape_sequence to 8f6e48220392cff66ce83c478aa5bc191aa2277a
- Resolution set to fixed
- Status changed from positive_review to closed
comment:8 Changed 21 months ago by
- Milestone changed from sage-9.2 to sage-9.1
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.
New commits:
fix some invalid escape sequence messages