Commit Graph

2646 Commits

Author SHA1 Message Date
Takeshi KOMIYA
ad517af81c
Merge branch 'master' into 5459_autodoc_default_options_accepts_True 2019-02-11 12:34:59 +09:00
Takeshi KOMIYA
11a398b1b0
Merge pull request #6052 from tk0miya/5394_meaningful_annotations_for_mock
Display meaningful names in type annotations for mocked objects
2019-02-11 12:32:45 +09:00
Waleed Khan
33c8b1d952 githubpages: support custom domains
Github Pages allows you to link a custom domain to your Github Pages
site by adding a `CNAME` file at the top-level of your `docs` directory.
The `githubpages` extension already inserts a `.nojekyll` file in the
`docs` directory, so it's a good place to add support for this `CNAME`
file as well.
2019-02-10 16:39:41 -08:00
Takeshi KOMIYA
8812131a57
Merge pull request #6022 from tk0miya/5196_linkcheck_should_check_remote_image
Close #5196: linkcheck also checks remote images exist
2019-02-11 02:05:14 +09:00
Takeshi KOMIYA
b0148c6921 Closes #5459: autodoc: autodoc_default_options accepts True as a value 2019-02-11 02:03:09 +09:00
Takeshi KOMIYA
a6ef8190ce Add testcase for mocked objects in autodoc 2019-02-11 01:46:38 +09:00
Takeshi KOMIYA
453ed5e29a Merge branch 'master' into 5394_meaningful_annotations_for_mock 2019-02-11 01:38:26 +09:00
Takeshi KOMIYA
3a237f7f4d
Merge pull request #6017 from tk0miya/4550_align_figures_to_center
Close #4550: All tables and figures without ``align`` option are displayed to center
2019-02-10 20:54:24 +09:00
Takeshi KOMIYA
7aaae7760a
Merge pull request #6023 from tk0miya/refactor_htmlhelp
Refactor htmlhelp builder
2019-02-10 20:50:10 +09:00
Takeshi KOMIYA
1a96f2b2cb Do test with docutils-0.12 2019-02-09 15:48:33 +09:00
Takeshi KOMIYA
3791013c08 quickstart: Simplify generated conf.py (master_doc) 2019-02-09 15:00:27 +09:00
Takeshi KOMIYA
d4df28c643 quickstart: Simplify generated conf.py (source_suffix) 2019-02-09 15:00:27 +09:00
Takeshi KOMIYA
d08903d9b9 quickstart: Simplify generated conf.py (EPUB) 2019-02-09 15:00:27 +09:00
Takeshi KOMIYA
7415f64eab refactor: htmlhelp: Generate .hhc file from template 2019-02-09 14:56:51 +09:00
Takeshi KOMIYA
28b0b744b6 refactor: htmlhelp: Generate .hhp file from template 2019-02-09 14:56:51 +09:00
Takeshi KOMIYA
47058cd175 test: Give freshenv=True to test_docutilsconf for windows environment 2019-02-09 14:44:37 +09:00
Takeshi KOMIYA
1d5e3cba0e refactor: test-docutilsconf
Use options for reST parser instead of HTML4 writer's.
2019-02-09 00:49:49 +09:00
Takeshi KOMIYA
25027945f5 Close #4550: All tables and figures without `align` option are displayed to center 2019-02-08 01:39:41 +09:00
Takeshi KOMIYA
500bf85443
Merge branch 'master' into 5196_linkcheck_should_check_remote_image 2019-02-08 00:10:14 +09:00
Takeshi KOMIYA
55100dce26 refactor: tests/conftest.py 2019-02-07 22:14:06 +09:00
Takeshi KOMIYA
9ac06520b9 test: clear SPHINX_TEST_TEMPDIR before testing 2019-02-07 01:28:45 +09:00
Takeshi KOMIYA
952d76dabb
Merge pull request #5996 from tk0miya/show_tempdir_header_on_testing
Show tempdir header on testing (refs: #5902)
2019-02-07 01:22:40 +09:00
Jean-François B
ed86ada661
Merge pull request #5992 from jfbu/latex_safe_graphics
LaTeX: safer image inclusion
2019-02-05 18:03:07 +01:00
jfbu
87058e6783 Remove from test never executed print(result) debugging info 2019-02-05 17:51:13 +01:00
jfbu
0d72052141 Merge branch 'master' into latex_safe_graphics 2019-02-05 17:46:00 +01:00
Takeshi KOMIYA
ff80d2f538
Merge pull request #5983 from tk0miya/separate_applehelp
Separate applehelp to sphinxcontrib package
2019-02-06 01:14:02 +09:00
Takeshi KOMIYA
c4397318d3 Separate applehelp to sphinxcontrib package 2019-02-06 00:44:37 +09:00
Takeshi KOMIYA
20edbe9500
Merge pull request #6015 from tk0miya/1851_omit_argument_for_code-block
Close #1851: Allow to omit an argument for code-block directive
2019-02-06 00:24:17 +09:00
Takeshi KOMIYA
f551915e9f Close #5196: linkcheck also checks remote images exist 2019-02-06 00:21:52 +09:00
Takeshi KOMIYA
3fbb599d23
Merge pull request #5985 from tk0miya/refactor_test_build_html
refactor: test_build_html.py
2019-02-04 01:59:21 +09:00
Takeshi KOMIYA
d1cd72660b
Merge pull request #6012 from tk0miya/update_svgimg
Fix test: imgconverter expects size of images fixed
2019-02-04 01:53:34 +09:00
Takeshi KOMIYA
6ca669295c Close #1851: Allow to omit an argument for code-block directive 2019-02-04 01:50:44 +09:00
Takeshi KOMIYA
07f3f034a8
Merge pull request #6011 from tk0miya/fix_compile_latex_document
Fix test: compile_latex_document()
2019-02-04 00:05:33 +09:00
Takeshi KOMIYA
21fef75c3b Fix test: imgconverter expects size of images fixed 2019-02-03 23:59:15 +09:00
Takeshi KOMIYA
7b1755d21b Fix test: compile_latex_document() 2019-02-03 23:54:22 +09:00
Takeshi KOMIYA
622a678377
Merge pull request #6010 from tk0miya/4611_show_warnings_for_duplicated_toctree
Fix #4611: epub: Show warning for duplicated ToC entries
2019-02-03 23:36:43 +09:00
Takeshi KOMIYA
b40ad9ffd4 Merge branch '1.8' 2019-02-03 23:20:26 +09:00
Takeshi KOMIYA
b950480218 Fix #4611: epub: Show warning for duplicated ToC entries 2019-02-03 22:53:30 +09:00
Takeshi KOMIYA
b7c679626a Fix #5948: LaTeX: duplicated labels are generated for sections 2019-02-03 22:33:24 +09:00
Takeshi KOMIYA
c70dfcd390 Merge branch '1.8' 2019-02-03 19:53:12 +09:00
Takeshi KOMIYA
ed3d13b939
Merge pull request #6009 from tk0miya/4611_add_testcase_for_html_style
Separate testcase for html_style to single case from root
2019-02-03 19:48:56 +09:00
Takeshi KOMIYA
705248af2f Merge branch '1.8' 2019-02-03 19:33:28 +09:00
Takeshi KOMIYA
ba7b7b3698
Merge pull request #6008 from tk0miya/4611_use_simple_svg
test: Replace SVG image by simple one
2019-02-03 19:26:37 +09:00
Takeshi KOMIYA
97782c8ba1 Separate testcase for html_style to single case from root 2019-02-03 19:16:04 +09:00
Takeshi KOMIYA
36e770fe68 test: Replace SVG image by simple one
Old SVG image contains non standard tags and attributes. Therefore,
epubcheck warns it as invalid.  To avoid the warnings, this replaces it
by very simple one.
2019-02-03 19:08:28 +09:00
Takeshi KOMIYA
e483e4afc3 texinfo: remove DOTs from name if name contains other characters 2019-02-03 19:01:37 +09:00
Takeshi KOMIYA
133ed17de6 Add testcase for TexinfoTranslator.escape_id() 2019-02-03 19:01:37 +09:00
Takeshi KOMIYA
aabbbe346c Merge branch '1.8' 2019-02-03 17:07:13 +09:00
Takeshi KOMIYA
b6478accb0 Fix #5995: autodoc: autodoc_mock_imports conflict with metaclass 2019-02-02 01:22:57 +09:00
Takeshi KOMIYA
ed90306ee5 Show tempdir header on testing (refs: #5902) 2019-02-01 22:36:10 +09:00
jfbu
669f9c3a13 LaTeX: safer image inclusion
Closes: #5956
2019-01-29 11:15:49 +01:00
Takeshi KOMIYA
353e992b37 refactor: test_build_html.py 2019-01-26 17:06:47 +09:00
Takeshi KOMIYA
36d628929e Merge branch '1.8' 2019-01-26 13:40:19 +09:00
Frank Erens
9e6fe21c6a Add 'cpp:struct' directive and 'cpp:struct' role.
They are cosmetic variants of the class directive/role.
2019-01-20 12:29:20 +01:00
Jakob Lykke Andersen
ffdc4db2c1 C++, minor fixes 2019-01-20 10:28:39 +01:00
Takeshi KOMIYA
bc805fb8bc
Merge pull request #5969 from tk0miya/progress_message2
refactoring progress messages
2019-01-20 13:38:20 +09:00
Takeshi KOMIYA
1182e7f6d2 refactor: compile .mo file only if needed on testing 2019-01-20 11:51:23 +09:00
Takeshi KOMIYA
6968889206
Merge pull request #5968 from tk0miya/separate_qthelp
Separate qthelp to sphinxcontrib package
2019-01-20 00:28:08 +09:00
Takeshi KOMIYA
c5f20a9046 progress_message() supports a skip 2019-01-19 20:48:21 +09:00
Takeshi KOMIYA
6be9d2a08e Separate qthelp to sphinxcontrib package 2019-01-19 16:34:06 +09:00
jfbu
ff5031c96e Merge branch '1.8'
Resolved Conflicts:
	sphinx/writers/latex.py
2019-01-17 17:26:51 +01:00
jfbu
e7aee6e82a LaTeX: remove usage of \scalebox by incorporating scale in height/width
Closes: #5954
2019-01-14 16:04:04 +01:00
Takeshi KOMIYA
0081482eb7
Merge pull request #5949 from tk0miya/4064_removes_assets_for_websupport
Remove assets for websupport (refs: #4064)
2019-01-14 00:56:52 +09:00
Takeshi KOMIYA
2569776ffd Remove assets for websupport (refs: #4064) 2019-01-14 00:30:36 +09:00
Takeshi KOMIYA
d6fc5c9095 Stop to use $SPHINX_TEST_TEMPDIR envvar
At once, we added $SPHINX_TEST_TEMPDIR to keep intermediate files of
testing to investigate the failures.  At present, we've used pytest
as a test runner.  And it keeps temporary directories of last 3
testings.  So this starts to use it instead of $SPHINX_TEST_TEMPDIR.
https://docs.pytest.org/en/latest/tmpdir.html#the-default-base-temporary-directory
2019-01-13 23:50:18 +09:00
Takeshi KOMIYA
a4a206ce5a
Merge pull request #5930 from tk0miya/refactor_subprocess.run
Use subprocess.run() instead of Popen()
2019-01-13 23:34:17 +09:00
Takeshi KOMIYA
46334a2b00 Use subprocess.run() instead of Popen()
Since python3.5, subprocess.run() has been introduced. It works a
wrapper of Popen, and it looks much simple and better. This uses it
instead of Popen to make our code simple.
2019-01-13 23:25:54 +09:00
Timotheus Kampik
0457d6ebba
WIP: 5258 fix search highlight svg ff (#5265)
* #5258 add tests for highlightText()

*  #5258 fix SVG search highlight issue in Firefox

 Use `node.parentElement.getBBox()` instead of `span.getBBox()`:

* Same highlighting behavior in Chrome, Opera

* Avoid issue with getBBox() in FF, see:
  https://bugzilla.mozilla.org/show_bug.cgi?id=612118

* Microsoft browsers to be tested

*  #5258 update package-lock.json

* #5258 test after control merge & polish

* #5258 allow for some variability in test
2019-01-13 14:06:03 +01:00
Takayuki SHIMIZUKAWA
795b518464
Add PathComparer for testing and fix 2 test failure on Windows. (#5943)
commits are squashed.

* Add PathComparer for testing and fix 2 test failure on Windows.
* fix flake8
* add type information by f2f review. Thanks to @tk0miya!
* fix mypy, flake8 again..
2019-01-13 18:40:35 +09:00
Takeshi KOMIYA
01ccbbcccf Fix test: NamedTemporaryFile causes errors on Windows 2019-01-13 17:43:11 +09:00
Takeshi KOMIYA
20bf74c637 Separate jsmath to sphinxcontrib package 2019-01-13 14:07:12 +09:00
Takeshi KOMIYA
ae60ed5b0b Merge branch '1.8' 2019-01-13 11:44:08 +09:00
Timotheus Kampik
64e64ffbd4 #5258 allow for some variability in test 2019-01-12 15:58:07 +01:00
Timotheus Kampik
c761ec248b #5258 test after control merge & polish 2019-01-12 14:48:35 +01:00
Takeshi KOMIYA
a06f6b71b4 Fix an error with pytest-4.x 2019-01-12 21:08:51 +09:00
Timotheus Kampik
15a7f767b4 Merge branch 'master' into 5258-fix-search-highlight-svg-ff 2019-01-12 11:20:33 +01:00
Takeshi KOMIYA
90b93dda33
Merge pull request #5384 from tk0miya/smart_latex_conf_py
quickstart: Simplify generated conf.py (for latex)
2019-01-08 02:12:38 +09:00
Takeshi KOMIYA
66228fb60f Fix #5906: LaTeX Builder is not initialized correctly on test_markup 2019-01-08 01:30:25 +09:00
Takeshi KOMIYA
46b19b29f3 latex: Do escape_abbr() for author and project 2019-01-07 23:14:56 +09:00
Takeshi KOMIYA
68c90a26f1 quickstart: Simplify generated conf.py (for latex) 2019-01-07 23:06:14 +09:00
Jakob Lykke Andersen
e9df857531 C++, parse all fold expressions 2019-01-06 12:03:17 +01:00
Jakob Lykke Andersen
8eb4ab0681 C++ fixes
- Hyperlinks for declarations involving east cv-qualifiers.
- Duplicate declaration error on function templates with constraints
  in the return type.
  Fixes sphinx-doc/sphinx#5755
2019-01-06 12:03:17 +01:00
jfbu
259d5053fa LaTeX: fix `addtocaptions` for sphinxmessages.sty_t if 'babel' empty
For example if config setting `language` is 'ja'.

Refs: #5516
2019-01-06 10:05:02 +01:00
jfbu
af2bb9f80d Merge branch '1.8'
Conflicts:
	sphinx/writers/latex.py
	tests/test_build_latex.py

Also, modifications were needed in further files.

	modified:   CHANGES
	modified:   sphinx/templates/latex/sphinxmessages.sty_t
	modified:   sphinx/util/template.py
	modified:   sphinx/util/texescape.py
	modified:   sphinx/writers/latex.py
	modified:   tests/test_build_latex.py
2019-01-05 11:00:19 +01:00
jfbu
2259466d4b Remove some spaces added in last commit, which are ignored anyhow 2019-01-05 00:14:45 +01:00
jfbu
37f1aacd1f LaTeX do not strip spaces from numfig_format split at %s
Only for figure and table, currently. Code-bloks have some FIXME code to
still be handled.

PDF output should remain unchanged so this is backwards compatible. The
`\nobreakspace` from LaTeX default `\fnum@figure` is removed by a normal
space. If figname is an abbreviation, the dot is followed by a `\@` to
avoid double space. At the location where the `\@` is inserted the `@`
has catcode non-letter so a space after it is not swallowed.

MEMO: when this is will be moved to sphinxmessages.sty on master branch
it is needed to use `\@{}` or to modify locally catcode of `@` to avoid
space swallowing..

Closes: #5889
2019-01-04 23:53:17 +01:00
jfbu
18bf90822c Fix LaTeX writer handling of user custom numfig_format 2019-01-04 23:35:30 +01:00
Takeshi KOMIYA
cd28de5ba8 refactor: Move \literalblockname to sphinxmessage.sty 2019-01-04 23:06:34 +09:00
Takeshi KOMIYA
ebd484ead2 refactor: Move \tablename to sphinxmessage.sty 2019-01-04 23:06:34 +09:00
Takeshi KOMIYA
1c34501e85 refactor: Move \figurename to sphinxmessage.sty 2019-01-04 23:06:34 +09:00
Takeshi KOMIYA
7459d8771a Fix HTML: Invalid HTML5 file is generated for glossary (refs: #4611)
Note: It was caused by a glossary having multiple terms for one
description.
2019-01-03 18:17:17 +09:00
Takeshi KOMIYA
a0e1390472 Remove use of deprecated APIs 2019-01-03 13:27:33 +09:00
Takeshi KOMIYA
64df1d1e89
Merge pull request #5880 from tk0miya/omit_master_doc
test: Omit master_doc settings from testcases
2019-01-03 11:20:26 +09:00
Takeshi KOMIYA
114ff77f68 test: Omit master_doc settings from testcases 2019-01-03 10:58:42 +09:00
Takeshi KOMIYA
c4c878303f encoding keyword for path.text() and path.write_text() is no longer needed 2019-01-03 10:58:07 +09:00
Takeshi KOMIYA
5428d94d24 Remove coding magic comments from tests 2019-01-02 21:53:07 +09:00
Takeshi KOMIYA
da3075d0b7 A happy new year! 2019-01-02 16:17:25 +09:00
Takeshi KOMIYA
76e9f57c2e Merge branch '1.8' 2019-01-02 16:16:25 +09:00
Takeshi KOMIYA
1b1ebd2c75 A happy new year! 2019-01-02 16:00:30 +09:00
jfbu
32d57b8637 Merge branch '1.8'
resolved Conflicts:
	doc/development/tutorials/todo.rst
	sphinx/locale/__init__.py
	sphinx/search/zh.py
2018-12-28 12:50:20 +01:00
Timotheus Kampik
221614654f
#5605 fix Chinese search index (#5611)
generate search index for Latin words correctly if search language is Chinese
2018-12-25 18:41:52 +01:00
Takeshi KOMIYA
99a7dca216
Merge pull request #5806 from jdufresne/six-text-type
Replace use of six.text_type with str
2018-12-26 01:31:33 +09:00
Takeshi KOMIYA
b5c0edc949 Merge branch '1.8' 2018-12-26 00:37:55 +09:00
Timotheus Kampik
b779975a44 Merge branch 'master' into 5660-version-modified-classes 2018-12-24 14:57:42 +01:00
Takeshi KOMIYA
6ffe549f49 refactor chm_htmlescape() 2018-12-24 13:54:53 +09:00
Timotheus Kampik
edf9d210b6 #5660 adjust expected result to new classes
Also, fix formating glitch
2018-12-23 17:02:31 +01:00
Takeshi KOMIYA
4702086681 Merge branch '1.8' 2018-12-24 00:49:36 +09:00
animalize
9052471e19 don't generate build files inside /tests/roots/ 2018-12-23 22:16:03 +08:00
animalize
cedd94c541 [1.8] htmlhelp: convert hex escaping to decimal escaping in .hhc/.hhk files (#5853)
* htmlhelp: convert hex escaping to decimal escaping in .hhc/.hhk files

.hhc/.hhk files don't recognize hex escaping, we need convert hex escaping to decimal escaping. for example: `'` -> `'`.
2018-12-23 22:39:12 +09:00
jfbu
701b39328f Merge branch '1.8'
(Resolved) Conflicts:
	sphinx/texinputs/sphinxmanual.cls
2018-12-23 11:23:04 +01:00
Takeshi KOMIYA
f06e84ac4f Fix #5800: todo: crashed if todo is defined in TextElement 2018-12-22 01:10:23 +09:00
Jon Dufresne
6978918ffc Replace use of six.text_type with str
This removes the last use of the six package allowing Sphinx to remove
it as a dependency.
2018-12-18 16:23:10 -08:00
Takeshi KOMIYA
3905cb8b7c Merge branch '1.8' 2018-12-18 23:32:52 +09:00
Takeshi KOMIYA
f04e161173
Merge pull request #5826 from tk0miya/refactor_intersphinx
intersphinx: Normalize mapping on config-inited
2018-12-18 23:29:25 +09:00
Takeshi KOMIYA
4c149f6458
Merge pull request #5835 from goerz/1.8
Use mathjax CDN "latest" URL by default
2018-12-18 23:07:42 +09:00
jfbu
bd2ca4763c [tests] LaTeX: use latex engines with `--halt-on-error` option 2018-12-18 13:41:48 +01:00
Michael Goerz
77e617e25a Use mathjax CDN "latest" URL by default
Closes #5725
2018-12-17 22:14:25 -05: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
Takeshi KOMIYA
556f599e6e intersphinx: Normalize mapping on config-inited 2018-12-17 22:03:47 +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
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
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
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
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
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
Jakob Lykke Andersen
73a8b7e658 Merge branch 'cpp_fix_float_literals' into 1.8 2018-12-16 17:19:57 +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
c6bd84a614 refactor: Remove u-prefix from strings 2018-12-16 21:28: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
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
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
Takeshi KOMIYA
c70e65fc6c
Merge branch 'master' into 5770_doctest_refers_highlight_language 2018-12-16 00:32:10 +09:00
Takeshi KOMIYA
b56f4f9022 Remove print_function feature 2018-12-15 23:16:10 +09:00
Takeshi KOMIYA
415ebc15c5
Merge pull request #5784 from tk0miya/refactor_hack_for_py2
Refactor hack for py2
2018-12-15 22:40:46 +09:00
Takeshi KOMIYA
66fad4e22d Remove a hack for py2 from testcode 2018-12-15 22:01:22 +09:00
Takeshi KOMIYA
fd1dd13a50 refactor: Replace six.StringIO by io.StringIO 2018-12-15 21:00:38 +09:00
Takeshi KOMIYA
001a557fcf
Merge pull request #5781 from tk0miya/refactor_six.PY2
refactor: Drop six.PY2
2018-12-15 20:57:51 +09:00
Takeshi KOMIYA
e789080b54 refactor: Drop six.PY2 2018-12-15 20:08:39 +09:00
Takeshi KOMIYA
5f8b1ede8e refactor: Replace six.add_metaclass by __metaclass_ attribute 2018-12-15 20:06:26 +09:00
Takeshi KOMIYA
d6d4406ce9 Fix #5770: doctest: Follow highlight_language on highlighting doctest block 2018-12-15 18:35:12 +09:00