Opened 14 months ago
Closed 14 months ago
#27521 closed defect (fixed)
py3: fix invalid escape sequences in docstrings
Reported by: | egourgoulhon | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-8.8 |
Component: | documentation | Keywords: | python3 |
Cc: | chapoton, tscrim | Merged in: | |
Authors: | Eric Gourgoulhon | Reviewers: | Frédéric Chapoton |
Report Upstream: | N/A | Work issues: | |
Branch: | e00e5fe (Commits) | Commit: | e00e5fe4c0220e4a4f8a8dfd5719860aebee2423 |
Dependencies: | Stopgaps: |
Description
When generating the documentation with Sage 8.7.rc0 -- Python3, one gets the following deprecation warnings:
[dochtml] [repl ] <unknown>:181: DeprecationWarning: invalid escape sequence \) [dochtml] [repl ] <unknown>:365: DeprecationWarning: invalid escape sequence \w [dochtml] [functions] <unknown>:234: DeprecationWarning: invalid escape sequence \l [dochtml] [functions] <unknown>:349: DeprecationWarning: invalid escape sequence \l [dochtml] [cryptogra] <unknown>:505: DeprecationWarning: invalid escape sequence \G [dochtml] [misc ] <unknown>:1496: DeprecationWarning: invalid escape sequence \| [dochtml] [function_] <unknown>:391: DeprecationWarning: invalid escape sequence \o [dochtml] [function_] <unknown>:549: DeprecationWarning: invalid escape sequence \O [dochtml] [function_] <unknown>:580: DeprecationWarning: invalid escape sequence \O [dochtml] [interface] <unknown>:1496: DeprecationWarning: invalid escape sequence \|
Except for the first two (those in repl
), they are due to function docstrings that are opened with """
while they should be opened with r"""
since they contain LaTeX backslashes. The branch in this ticket fixes this. The issue in repl
is due to the file src/sage/repl/interpreter.py
and seems of different origin.
Change History (6)
comment:1 Changed 14 months ago by
- Branch set to u/egourgoulhon/fix_invalid_escape_sequences_in_doctrings
- Commit set to e00e5fe4c0220e4a4f8a8dfd5719860aebee2423
comment:2 Changed 14 months ago by
- Cc chapoton tscrim added
- Status changed from new to needs_review
comment:3 Changed 14 months ago by
- Reviewers set to Frédéric Chapoton
- Status changed from needs_review to positive_review
C'est parfait, merci !
comment:4 follow-up: ↓ 5 Changed 14 months ago by
Note that the pycodestyle plugin is supposed to check exactly for this, but this requires the installation of pycodestyle on the patchbot machines.
comment:5 in reply to: ↑ 4 Changed 14 months ago by
Replying to chapoton:
Note that the pycodestyle plugin is supposed to check exactly for this,
Good! because it was quite tedious to find the failing docstrings, the error message with <unknown>
being not particularly helpful...
comment:6 Changed 14 months ago by
- Branch changed from u/egourgoulhon/fix_invalid_escape_sequences_in_doctrings to e00e5fe4c0220e4a4f8a8dfd5719860aebee2423
- Resolution set to fixed
- Status changed from positive_review to closed
New commits:
Fix invalid escape sequences in docstrings (Trac #27521)