Skip to content

Commit e7ffb99

Browse files
refi64methane
authored andcommitted
Fix some sphinx warnings (#9)
* Fix some deprecation warnings in Doc/conf.py * Fix an rst error in Misc/NEWS
1 parent 29896ad commit e7ffb99

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

Doc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ PAPER =
1010
SOURCES =
1111
DISTVERSION = $(shell $(PYTHON) tools/extensions/patchlevel.py)
1212

13-
ALLSPHINXOPTS = -b $(BUILDER) -d build/doctrees -D latex_paper_size=$(PAPER) \
13+
ALLSPHINXOPTS = -b $(BUILDER) -d build/doctrees -D latex_elements.papersize=$(PAPER) \
1414
$(SPHINXOPTS) . build/$(BUILDER) $(SOURCES)
1515

1616
.PHONY: help build html htmlhelp latex text changes linkcheck \

Doc/conf.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,24 @@
8888
# Options for LaTeX output
8989
# ------------------------
9090

91+
# Get LaTeX to handle Unicode correctly
92+
latex_elements = {'inputenc': r'\usepackage[utf8x]{inputenc}', 'utf8extra': ''}
93+
94+
# Additional stuff for the LaTeX preamble.
95+
latex_elements['preamble'] = r'''
96+
\authoraddress{
97+
\strong{Python Software Foundation}\\
98+
Email: \email{docs@python.org}
99+
}
100+
\let\Verbatim=\OriginalVerbatim
101+
\let\endVerbatim=\endOriginalVerbatim
102+
'''
103+
91104
# The paper size ('letter' or 'a4').
92-
latex_paper_size = 'a4'
105+
latex_elements['papersize'] = 'a4'
93106

94107
# The font size ('10pt', '11pt' or '12pt').
95-
latex_font_size = '10pt'
108+
latex_elements['font_size'] = '10pt'
96109

97110
# Grouping the document tree into LaTeX files. List of tuples
98111
# (source start file, target name, title, author, document class [howto/manual]).
@@ -125,22 +138,9 @@
125138
for fn in os.listdir('howto')
126139
if fn.endswith('.rst') and fn != 'index.rst')
127140

128-
# Additional stuff for the LaTeX preamble.
129-
latex_preamble = r'''
130-
\authoraddress{
131-
\strong{Python Software Foundation}\\
132-
Email: \email{docs@python.org}
133-
}
134-
\let\Verbatim=\OriginalVerbatim
135-
\let\endVerbatim=\endOriginalVerbatim
136-
'''
137-
138141
# Documents to append as an appendix to all manuals.
139142
latex_appendices = ['glossary', 'about', 'license', 'copyright']
140143

141-
# Get LaTeX to handle Unicode correctly
142-
latex_elements = {'inputenc': r'\usepackage[utf8x]{inputenc}', 'utf8extra': ''}
143-
144144
# Options for Epub output
145145
# -----------------------
146146

Misc/NEWS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ C API
661661
PY_SSIZE_T_CLEAN is defined.
662662

663663
- Issue #28769: The result of PyUnicode_AsUTF8AndSize() and PyUnicode_AsUTF8()
664-
is now of type "const char *" rather of "char *".
664+
is now of type ``const char *`` rather of ``char *``.
665665

666666
- Issue #29058: All stable API extensions added after Python 3.2 are now
667667
available only when Py_LIMITED_API is set to the PY_VERSION_HEX value of

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy