#23834 closed defect (fixed)

html_use_smartypants is deprecated, so don't use it

Reported by: jhpalmieri Owned by:
Priority: minor Milestone: sage-8.1
Component: documentation Keywords:
Cc: Merged in:
Authors: John Palmieri Reviewers: François Bissey
Report Upstream: N/A Work issues:
Branch: dee62b6 (Commits) Commit: dee62b60ac0f3f269ffc796d4fcac52d5ffc6ae4
Dependencies: Stopgaps:

Description

The documentation ja/a_tour_of_sage uses html_use_smartypants, but this is now deprecated:

RemovedInSphinx17Warning: html_use_smartypants option is deprecated. Smart quotes are on by default; if you want to disable or customize them, use the smart_quotes option in docutils.conf.

If I delete the line html_use_smartypants = False, there is no difference in the resulting html or latex files.

Change History (10)

comment:1 Changed 23 months ago by jhpalmieri

  • Component changed from PLEASE CHANGE to documentation
  • Priority changed from major to minor
  • Type changed from PLEASE CHANGE to defect

comment:2 Changed 23 months ago by jhpalmieri

  • Branch set to u/jhpalmieri/smart

comment:3 Changed 23 months ago by jhpalmieri

  • Commit set to dee62b60ac0f3f269ffc796d4fcac52d5ffc6ae4
  • Status changed from new to needs_review

New commits:

dee62b6trac 23834: do not use html_use_smartypants: it has been deprecated.

comment:4 Changed 23 months ago by jhpalmieri

We could instead create a file doc/ja/a_tour_of_sage/docutils.conf containing

[parsers]
smart_quotes = no

to keep the old behavior, but as far as I can tell, this option is not used anywhere.

comment:5 Changed 23 months ago by fbissey

I was going to ask if it was related to

diff --git a/src/sage/misc/sphinxify.py b/src/sage/misc/sphinxify.py
index f084a19..4f76d41 100644
--- a/src/sage/misc/sphinxify.py
+++ b/src/sage/misc/sphinxify.py
@@ -80,6 +80,10 @@ def sphinxify(docstring, format='html'):
     # buildername, confoverrides, status, warning, freshenv).
     confdir = os.path.join(SAGE_DOC_SRC, 'en', 'introspect')
 
+    open(os.path.join(srcdir, 'docutils.conf'), 'w').write(r"""
+[parsers]
+smart_quotes = no
+""")
     doctreedir = os.path.join(srcdir, 'doctrees')
     confoverrides = {'html_context': {}, 'master_doc': 'docstring'}

Could we use those conf.py files instead?

comment:6 Changed 23 months ago by jhpalmieri

I'm not sure I understand what you mean. In any case, I don't know how to use conf.py files instead of docutils.conf files.

comment:7 Changed 23 months ago by fbissey

May have been a daft question in any case. I just remembered "smarty_pants" from the previous ticket. I think the stuff in sphinxify negates the need for ja to have its own docutils.conf. I think removal as stated in the commit is the best thing to do.

comment:8 Changed 23 months ago by fbissey

  • Authors set to John Palmieri
  • Reviewers set to François Bissey
  • Status changed from needs_review to positive_review

I am making this positive review, and fill the author field :) before Volker complaints.

comment:9 Changed 23 months ago by jhpalmieri

Thank you, on both counts.

comment:10 Changed 22 months ago by vbraun

  • Branch changed from u/jhpalmieri/smart to dee62b60ac0f3f269ffc796d4fcac52d5ffc6ae4
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.