Stephen Finucane
5a9033e5aa
Specifically request Python 3
...
If Sphinx is Python 3-only, Sphinx's tooling should be Python 3-only
too.
Signed-off-by: Stephen Finucane <stephen@that.guru>
2018-12-17 09:46:18 +00:00
Stephen Finucane
d345d0f8c1
py3: Remove (most) __future__ imports
...
There were two used:
- print_function
- absolute_import
Both of these are mandatory in Python 3.0 onwards [1] and can therefore
be removed...mostly. Unfortunately, mypy is still running in Python 2.7
mode, meaning we need the 'print_function' future wherever we're calling
'print' with the 'file' argument. There's also a single
'absolute_import' future that must be retained as its removal breaks a
test for as-yet unknown reasons. TODOs are added to resolve both issues
in the future.
[1] https://docs.python.org/3/library/__future__.html
Signed-off-by: Stephen Finucane <stephen@that.guru>
2018-12-17 09:46:15 +00:00
Takeshi KOMIYA
a3d3fecf84
Merge pull request #5820 from jdufresne/invalid-escape
...
Fix invalid escape sequence in test_directive_code.py
2018-12-17 18:25:15 +09:00
Takeshi KOMIYA
8d5d830836
Merge pull request #5821 from jdufresne/deprecate-old-sig
...
Deprecate the old IndexBuilder.feed() method signature
2018-12-17 18:24:45 +09:00
Takeshi KOMIYA
92f94d53a5
Merge pull request #5822 from jdufresne/ugettext
...
Remove Python 2 monkey patch for Unicode ugettext
2018-12-17 18:23:24 +09:00
Jon Dufresne
90b44f4d86
Remove Python 2 monkey patch for Unicode ugettext
...
In Python 3, gettext always returns a Unicode text string.
2018-12-16 15:01:43 -08:00
Jon Dufresne
c4baa7234e
Deprecate the old IndexBuilder.feed() method signature
...
The method signature changed in commit
d27386cc95
(Jun 8, 2016).
2018-12-16 13:52:56 -08:00
Jon Dufresne
d210da96f6
Fix invalid escape sequence in test_directive_code.py
...
Fixes error when running tests:
tests/test_directive_code.py:359
sphinx/tests/test_directive_code.py:359: DeprecationWarning: invalid escape sequence \s
includes = '\\end{sphinxVerbatim}\n\sphinxresetverbatimhllines\n'
2018-12-16 13:37:47 -08:00
jfbu
30ec4b6bba
Merge branch '1.8'
2018-12-16 18:34:05 +01:00
Jakob Lykke Andersen
73a8b7e658
Merge branch 'cpp_fix_float_literals' into 1.8
2018-12-16 17:19:57 +01:00
Jean-François B
e2431d80bd
Merge pull request #5811 from jfbu/latex_fix_sphinxVerbatim_requires_hllines_markup
...
LaTeX: allow sphinxVerbatim usage without explicit "hllines" extra setup
2018-12-16 17:14:25 +01:00
Jakob Lykke Andersen
b3de33deef
C++, fix parsing of floating point literals
...
Fixes sphinx-doc/sphinx#5636
2018-12-16 16:56:55 +01:00
jfbu
88a019dc99
LaTeX: allow sphinxVerbatim usage without explicit "hllines" extra setup
...
Fixes : #5810
2018-12-16 16:54:28 +01:00
Takeshi KOMIYA
6461ea233b
Merge pull request #5793 from tk0miya/pretty_changes
...
Pretty changes
2018-12-16 23:13:37 +09:00
Takeshi KOMIYA
36b7a2d6a4
Merge pull request #5792 from tk0miya/deprecate_UnicodeMixin
...
Deprecate UnicodeMixin
2018-12-16 23:13:02 +09:00
Takeshi KOMIYA
7bdbf50ee9
Merge pull request #5791 from tk0miya/refactor_io
...
Move `source-read` event to SphinxStandaloneReader
2018-12-16 22:27:46 +09:00
Takeshi KOMIYA
608246b0fa
Move source-read
event to SphinxStandaloneReader
2018-12-16 21:59:26 +09:00
Takeshi KOMIYA
1bf9a7eac5
Deprecate LaTeXTranslator.collect_footnotes()
2018-12-16 21:52:30 +09:00
Takeshi KOMIYA
cdb36fbbf6
Sort deprecated APIs by version
2018-12-16 21:51:33 +09:00
Takeshi KOMIYA
531c9f0384
Fix typo
2018-12-16 21:51:33 +09:00
Takeshi KOMIYA
048cfb5e0a
Deprecate UnicodeMixin
2018-12-16 21:51:18 +09:00
Takeshi KOMIYA
42140fae39
Merge pull request #5787 from tk0miya/refactor_uprefix
...
refactor: Remove u-prefix from strings
2018-12-16 21:47:17 +09:00
Takeshi KOMIYA
c6bd84a614
refactor: Remove u-prefix from strings
2018-12-16 21:28:51 +09:00
Takeshi KOMIYA
d160adb811
Merge pull request #5801 from jdufresne/modanalyzer-bytes
...
Remove unnecessary bytes type check in ModuleAnalyzer.for_string()
2018-12-16 20:10:51 +09:00
Takeshi KOMIYA
ea1d2d06f8
Merge pull request #5803 from jdufresne/encoding-utf8
...
Avoid respecifying default encoding for .encode()/.decode() calls
2018-12-16 20:01:43 +09:00
Takeshi KOMIYA
2597c4174e
Merge pull request #5796 from jdufresne/super
...
Use Python 3 super() argument-less syntax
2018-12-16 19:46:47 +09:00
Jean-François B
6395c7d242
Merge pull request #5790 from jfbu/latex_turnoff_lualatex_ligatures
...
Latex turnoff lualatex ligatures
2018-12-16 11:00:26 +01:00
Takeshi KOMIYA
f296f80931
Merge pull request #5795 from jdufresne/six-unichr
...
Remove use of six.unichr()
2018-12-16 10:27:16 +09:00
Takeshi KOMIYA
1c4197b020
Merge pull request #5797 from jdufresne/errno
...
Replace ENOENT errno checks with Python 3 FileNotFoundError
2018-12-16 10:26:44 +09:00
Jon Dufresne
5bf25eb445
Avoid respecifying default encoding for .encode()/.decode() calls
...
In Python 3, both .encode() and .decode() default the encoding to
'utf-8'. See the docs:
https://docs.python.org/3/library/stdtypes.html#str.encode
https://docs.python.org/3/library/stdtypes.html#bytes.decode
Simplify and shorten the code by using the default instead of
respecifying it.
2018-12-15 17:19:56 -08:00
Takeshi KOMIYA
39f1b29649
Merge pull request #5798 from jdufresne/file-attr
...
Remove unnecessary check for type bytes
2018-12-16 10:10:54 +09:00
Takeshi KOMIYA
304a03907d
Merge pull request #5799 from jdufresne/dev-null
...
Use os.devnull; replace hard coded value
2018-12-16 10:09:48 +09:00
Takeshi KOMIYA
480015c531
Merge pull request #5802 from jdufresne/write-text-bytes
...
Remove unnecessary bytes type check from path.write_text()
2018-12-16 10:07:55 +09:00
Jon Dufresne
5b2bf19685
Remove unnecessary bytes type check from path.write_text()
...
All code passes type str to the method. Per the type signature, only str
is allowed.
2018-12-15 11:47:08 -08:00
Jon Dufresne
ee8b403142
Remove unnecessary bytes type check in ModuleAnalyzer.for_string()
...
All uses always pass a str, never a bytes. Per the type signature, only
str types are allowed.
2018-12-15 11:39:14 -08:00
Jon Dufresne
2646a88b1b
Use os.devnull; replace hard coded value
...
https://docs.python.org/3/library/os.html#os.devnull
2018-12-15 11:11:43 -08:00
Jon Dufresne
cc86f57f7f
Remove unnecessary check for type bytes
...
On Python 3, the __file__ attribute is always a string. See docs:
https://docs.python.org/3/reference/import.html#__file__
> __file__ is optional. If set, this attribute’s value must be a string.
2018-12-15 11:05:23 -08:00
Jon Dufresne
49d3a3c0c1
Replace ENOENT errno checks with Python 3 FileNotFoundError
...
The error is more specific and self documenting.
This removes the last use of sphinx.util.osutil.ENOENT, so it is now
deprecated for removal. sphinx.util.osutil.EEXIST was already unused so
that is deprecated as well.
2018-12-15 09:02:55 -08:00
Jon Dufresne
ade973f4e3
Use Python 3 super() argument-less syntax
...
The form is less verbose and more idiomatic for Python 3 only code.
https://docs.python.org/3/library/functions.html#super
2018-12-15 08:35:55 -08:00
Jon Dufresne
1f4fcd656b
Remove use of six.unichr()
...
Use Python 3 chr() instead.
2018-12-15 08:15:56 -08:00
Takeshi KOMIYA
72e96fe754
Merge pull request #5794 from tk0miya/refactor_html.escape
...
Replace pycompat.htmlescape() by html.escape()
2018-12-16 01:06:46 +09:00
Takeshi KOMIYA
6113261948
Merge pull request #5775 from tk0miya/5770_doctest_refers_highlight_language
...
Fix #5770 : doctest: Follow highlight_language on highlighting doctest block
2018-12-16 00:56:55 +09:00
Takeshi KOMIYA
357b1ce2e6
Replace pycompat.htmlescape() by html.escape()
2018-12-16 00:53:56 +09:00
Takeshi KOMIYA
c70e65fc6c
Merge branch 'master' into 5770_doctest_refers_highlight_language
2018-12-16 00:32:10 +09:00
Takeshi KOMIYA
79eec90f36
Merge pull request #5773 from tk0miya/fix_typehints_for_unicode
...
Replace all "unicode" type by "str"
2018-12-16 00:24:21 +09:00
jfbu
eb365898d2
Fix unescaped backslashes in LaTeX...
2018-12-15 15:59:54 +01:00
Takeshi KOMIYA
6bc357140d
Replace all "unicode" type by "str"
2018-12-15 23:57:43 +09:00
Takeshi KOMIYA
0031c9b482
Merge pull request #5789 from tk0miya/remove_print_function
...
Remove print_function feature
2018-12-15 23:26:11 +09:00
jfbu
7364e0c2fd
Update docs for LuaLaTeX
2018-12-15 15:16:43 +01:00
Takeshi KOMIYA
b56f4f9022
Remove print_function feature
2018-12-15 23:16:10 +09:00