Opened 4 years ago

Closed 4 years ago

#21982 closed enhancement (fixed)

Py3: Unicode errors in docstrings

Reported by: jmantysalo Owned by:
Priority: trivial Milestone: sage-7.5
Component: python3 Keywords:
Cc: chapoton Merged in:
Authors: Jori Mäntysalo Reviewers: Jeroen Demeyer
Report Upstream: N/A Work issues:
Branch: 63567b7 (Commits, GitHub, GitLab) Commit: 63567b743363705e62920296b24cdb6db5b95f90
Dependencies: Stopgaps:

Status badges

Description

See

find src/sage/ -name '*.py' | while read f; do python3 -m py_compile $f 2>&1 | fgrep -q 'unicode error' && echo $f; done

Change History (13)

comment:1 Changed 4 years ago by jmantysalo

  • Branch set to u/jmantysalo/py3-unicode-docstring

comment:2 Changed 4 years ago by jmantysalo

  • Commit set to 64baf7c1c149c86f2fba97f2f1d363653a3cd98b
  • Status changed from new to needs_review

New commits:

64baf7cDocstring py3-compliance.

comment:3 follow-up: Changed 4 years ago by jdemeyer

  • Status changed from needs_review to needs_work

Those backslashes are really needed for Sphinx to correctly compile!

comment:4 in reply to: ↑ 3 Changed 4 years ago by jmantysalo

Replying to jdemeyer:

Those backslashes are really needed for Sphinx to correctly compile!

??? I did look the .html output and saw no error.

comment:5 Changed 4 years ago by jdemeyer

"No errors" is not the same as "correct". Example:

This

sentence

has no errors but is NOT really correct.

comment:6 Changed 4 years ago by jmantysalo

Sorry for being blind, but can you show me where the error is? I did look the output file, and it seems to be correct.

comment:7 follow-up: Changed 4 years ago by jdemeyer

Well, I need to compile the doc myself first. But believe me that those backslashes are there for a reason.

comment:8 in reply to: ↑ 7 ; follow-up: Changed 4 years ago by jmantysalo

Replying to jdemeyer:

Well, I need to compile the doc myself first. But believe me that those backslashes are there for a reason.

I did compile, and there is no visible change.

comment:9 in reply to: ↑ 8 ; follow-up: Changed 4 years ago by jdemeyer

Replying to jmantysalo:

Replying to jdemeyer:

Well, I need to compile the doc myself first. But believe me that those backslashes are there for a reason.

I did compile, and there is no visible change.

I agree. Maybe the problem only occurs with single-line references (all those that you changed are multi-line). In any case, I guess the proper fix is changing """ to r""" instead of removing the backslashes.

comment:10 Changed 4 years ago by git

  • Commit changed from 64baf7c1c149c86f2fba97f2f1d363653a3cd98b to 63567b743363705e62920296b24cdb6db5b95f90

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

63567b7Three """ to r""" for py3.

comment:11 in reply to: ↑ 9 Changed 4 years ago by jmantysalo

  • Status changed from needs_work to needs_review

Replying to jdemeyer:

Maybe the problem only occurs with single-line references (all those that you changed are multi-line). In any case, I guess the proper fix is changing """ to r""" instead of removing the backslashes.

OK. Done.

comment:12 Changed 4 years ago by jdemeyer

  • Reviewers set to Jeroen Demeyer
  • Status changed from needs_review to positive_review

comment:13 Changed 4 years ago by vbraun

  • Branch changed from u/jmantysalo/py3-unicode-docstring to 63567b743363705e62920296b24cdb6db5b95f90
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.