Takeshi KOMIYA
f596439a0f
Merge pull request #5786 from tk0miya/requests-2.5
...
Update deps: requests-2.5.0 or above
2018-12-18 23:12:19 +09:00
Takeshi KOMIYA
c2047c2cf7
Merge pull request #5833 from tk0miya/fix_typehints_for_code_directive
...
Fix annotations of code directives
2018-12-18 23:10:00 +09:00
Takeshi KOMIYA
f4f2eefd19
Fix annotations of code directives
2018-12-18 00:53:28 +09:00
Takeshi KOMIYA
afea0b1085
Merge pull request #5831 from jdufresne/term-decode
...
Deprecate quickstart.term_decode() and remove internal uses
2018-12-18 00:24:04 +09:00
Jon Dufresne
43ff640b58
Deprecate quickstart.term_decode() and remove internal uses
...
Per the Python 3 docs, input() always returns a string:
https://docs.python.org/3/library/functions.html#input
> The function then reads a line from input, converts it to a
> string (stripping a trailing newline), and returns that.
The stubs from typeshed say the same:
5c69373890/stdlib/3/builtins.pyi (L835)
Here is the implementation from CPython with also shows a call to
PyUnicode_Decode on the result:
https://github.com/python/cpython/blob/3.7/Python/bltinmodule.c#L1960-L2143
As the value is always a string, there is nothing to decode. Therefore
the call to term_decode() unnecessary and can safely be removed.
With this in mind, must adjust quickstart tests to be more
representative.
2018-12-17 06:44:17 -08:00
jfbu
cce4ad7f80
Merge branch '1.8'
...
(Resolved) Conflicts:
sphinx/domains/cpp.py
2018-12-17 15:23:00 +01:00
Takeshi KOMIYA
0a199c08b8
Merge pull request #5825 from tk0miya/add_comment
...
Add comment for Inventory type
2018-12-17 21:39:48 +09:00
Takeshi KOMIYA
d8e6c799be
Merge pull request #5771 from jfbu/latex_fix_broken_contentsname
...
Fix regression regarding LaTeX table of contents name (refs: #5683 )
2018-12-17 21:35:12 +09:00
Takeshi KOMIYA
2480283e6a
Merge pull request #5824 from tk0miya/remove_absolute_import
...
Remove absolute_import
2018-12-17 21:33:01 +09:00
Takeshi KOMIYA
ef4fa3682b
Add comment for Inventory type
2018-12-17 21:31:55 +09:00
Takeshi KOMIYA
1ef7b1a080
Merge pull request #5817 from jdufresne/inventory-typing
...
Define a common Inventory type for reuse across modules
2018-12-17 20:53:12 +09:00
Takeshi KOMIYA
5e5bdb8a64
Remove absolute_import
2018-12-17 20:47:49 +09:00
Takeshi KOMIYA
8ea3f7fad9
Merge pull request #5509 from stephenfin/remove-future-imports
...
Remove future imports
2018-12-17 20:32:39 +09:00
Takeshi KOMIYA
07b8748a07
Merge pull request #5804 from jdufresne/file-avoid-str
...
Remove unnecessary bytes/str type check in FileAvoidWrite.write()
2018-12-17 19:19:08 +09:00
Takeshi KOMIYA
94de89e0d0
Merge pull request #5805 from jdufresne/has-tag-str
...
Remove unnecessary bytes/str type check from doctree_read()
2018-12-17 19:18:13 +09:00
Takeshi KOMIYA
d8b69c7f98
Merge pull request #5819 from jdufresne/coding-comment
...
Remove unnecessary encoding cookie from Python source files
2018-12-17 19:15:00 +09:00
Takeshi KOMIYA
08c88729dd
Merge pull request #5813 from jdufresne/reporter-exc
...
Pass exceptions directly to docutils reporter
2018-12-17 19:13:32 +09:00
Jon Dufresne
e9c87b3d13
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-17 11:11:41 +01:00
Takeshi KOMIYA
c7ed4f3ddd
Merge pull request #5814 from jdufresne/str-format-coerce
...
Remove redundant coerce to str in string formatting
2018-12-17 19:08:28 +09:00
Takeshi KOMIYA
be6decaddf
Merge pull request #5818 from jdufresne/string-classes
...
Deprecate sphinx.config.string_classes; remove all internal uses
2018-12-17 19:06:55 +09:00
Takeshi KOMIYA
226f7bd4d9
Merge pull request #5815 from jdufresne/analyzer-type
...
Define Documenter.analyzer as type ModuleAnalyzer
2018-12-17 19:05:04 +09:00
Takeshi KOMIYA
71a7ce1453
Merge branch 'master' into string-classes
2018-12-17 18:58:32 +09:00
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
Jon Dufresne
bade33c7e4
Remove unnecessary encoding cookie from Python source files
...
In Python 3, the default encoding of source files is utf-8. The encoding
cookie is now unnecessary and redundant so remove it. For more details,
see the docs:
https://docs.python.org/3/howto/unicode.html#the-string-type
> The default encoding for Python source code is UTF-8, so you can
> simply include a Unicode character in a string literal ...
Includes a fix for the flake8 header checks to stop expecting an
encoding cookie.
2018-12-16 12:22:12 -08:00
Jon Dufresne
80861d105b
Deprecate sphinx.config.string_classes; remove all internal uses
...
With only a single text type across supported Python versions, the
string_classes is no longer necessary.
Internally, all uses were converted to the value `[str]`. For
.add_config_value() uses that also supply a default string, the type is
inferred.
2018-12-16 11:35:06 -08:00
Jakob Lykke Andersen
bf3bc32184
Merge pull request #5816 from jakobandersen/cpp_assert_dup_partial_build
...
C++, fix assertion in partial builds with duplicates
2018-12-16 20:06:24 +01:00
Jon Dufresne
e72391d995
Define a common Inventory type for reuse across modules
2018-12-16 11:03:28 -08:00
Jakob Lykke Andersen
57f70d0f1d
C++, fix assertion in partial builds with duplicates
...
Fixes sphinx-doc/sphinx#5496
2018-12-16 19:36:35 +01:00
Jon Dufresne
150abce5a6
Define Documenter.analyzer as type ModuleAnalyzer
2018-12-16 10:21:11 -08:00
Jon Dufresne
2b0096fba9
Remove redundant coerce to str in string formatting
...
When an object is passed to a string format placeholder '%s', Python
will implicitly call str() on the object. This applies to print() and
logging as well.
2018-12-16 10:03:45 -08:00
jfbu
30ec4b6bba
Merge branch '1.8'
2018-12-16 18:34:05 +01:00
Jon Dufresne
d414471eed
Pass exceptions directly to docutils reporter
...
The docutils reporter supports an exception as an argument. It is
converted to a string internally.
2018-12-16 09:21:55 -08:00
Jon Dufresne
7f229582e7
Remove unnecessary bytes/str type check from doctree_read()
...
ModuleAnalyzer.code is always type str. Decoding is unnecessary.
2018-12-16 08:29:24 -08:00
Jakob Lykke Andersen
73a8b7e658
Merge branch 'cpp_fix_float_literals' into 1.8
2018-12-16 17:19:57 +01:00
Jon Dufresne
e5bf235ba0
Remove unnecessary bytes/str type check in FileAvoidWrite.write()
...
All calls to FileAvoidWrite.write() always pass a text string.
Additionally, the type signature only allows type str.
2018-12-16 08:17:19 -08: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