Commit Graph

9993 Commits

Author SHA1 Message Date
cocoatomo
73fd3f90bf Wrap the line too long 2017-10-08 01:29:07 +09:00
cocoatomo
ff88c8b730 Display reference texts of original and translated messages 2017-10-08 00:06:00 +09:00
Takeshi KOMIYA
46bf9ab4a0 Fix #3692: Unable to build HTML if writing .buildinfo failed 2017-10-07 23:37:45 +09:00
Takeshi KOMIYA
8486f106b0 Merge pull request #4124 from cocoatomo/appropriate-footnote-warning_2
Re-arrange WARNING messages about reference inconsistencies (revised)
2017-10-07 16:16:08 +09:00
Takeshi KOMIYA
bd7d5abf8a Fix mypy violations 2017-10-07 15:47:35 +09:00
Takeshi KOMIYA
c82133f69a Merge branch 'stable' 2017-10-07 15:42:14 +09:00
cocoatomo
349513402a Merge remote-tracking branch 'upstream/stable' into appropriate-footnote-warning_2 2017-10-07 15:38:40 +09:00
Takeshi KOMIYA
7d4dab6928 Fix mypy violations 2017-10-07 15:29:29 +09:00
Takeshi KOMIYA
95f0f4d6a0 Update CHANGES for PR #4112 2017-10-07 15:21:01 +09:00
cocoatomo
aad52ebd09 Divide validation code between refnamed footnote and citation 2017-10-07 10:48:12 +09:00
cocoatomo
1f0c3ce875 Re-arrange WARNING messages about reference inconsistencies 2017-10-07 10:47:59 +09:00
Takeshi KOMIYA
0116cef451 Merge pull request #4109 from sphinx-doc/fix/highlight
fix: #4108 - Search word highlight breaks SVG
2017-10-06 02:22:31 +09:00
Stephen Finucane
160e27e20f utils: Remove 'check_sources'
There are still a couple of checks here but all of them can be removed
now:

- Check if using valid Python syntax
- Check if line length too long
- Check if using 'x == None/True/False'
- Check if using old HTML 3 tags

The first three are already handled by default by the 'flake8' tool. The
last one isn't replaced by anything, but it really isn't worth worrying
about now because the tags it checks for have been dead for a really
long time and would not be used by anyone writing HTML in the last 10
years. Combined, it means we can remove the entire file.

The 'style-check' target is updated to simply alias 'flake8'. It can be
removed in a future release. This allows us to stop using this target in
the Travis jobs, seeing as we already run flake8.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-05 17:17:27 +01:00
Stephen Finucane
f5c0d64658 utils: Move "header check" to a flake8 plugin
If we want to check style, we run 'tox -e flake8': it shouldn't be
necessary to run some obscure 'make' command too. Make this possible by
moving the sole useful test from the target of this make command to a
flake8 plugin.

This includes a fix for a header that was previously excluded from
checks, but is now included.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-05 17:17:27 +01:00
Stephen Finucane
64b4d7c686 utils: Use better variable names in check_fileheader
We're going to be doing some surgery on this function, so first clean it
up before we do anything else.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-05 17:17:27 +01:00
Stephen Finucane
b90e58809f utils: Remove the 'reindent' tool
Nobody seems to be using this, probably because of the 'flake8' target,
and it hasn't been touched, some Python/flake8 updates aside in years.
Just remove it.

The Make target is not removed to both give us time to warn users that
the target is gone and, more importantly, to prevent merge conflicts
with other patches being submitted at the same time.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-05 17:13:59 +01:00
Takeshi KOMIYA
ae08b2d794 Merge pull request #4119 from stephenfin/the-great-toxification-3
The great toxification (part 3)
2017-10-06 00:48:02 +09:00
Stephen Finucane
8f1905c4ae mypy: Make output a little friendlier
Two default-disabled options are enabled:

- show_column_numbers - Shows context notes before errors
- show_error_context - Shows column numbers in error messages

This should make the output of mypy a little easier to parse.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-05 16:01:21 +01:00
Yoshiki Shibukawa
36912a5815 fix: #4108 - Search word highlight breaks SVG 2017-10-05 23:29:55 +09:00
Takeshi KOMIYA
5e1047ba12 Merge pull request #4116 from stephenfin/bug/4115
Fix #4115: Typo in doc
2017-10-05 22:59:14 +09:00
Stephen Finucane
6086d7b608 tox: Don't bother setting 'PYTHONDONTWRITEBYTECODE'
As I've previously discovered [1], this doesn't actually do anything in
modern tox. Simply remove it.

[1] https://review.openstack.org/#/c/369986/

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-05 09:59:08 +01:00
Stephen Finucane
e023c296e8 tox: Pass posargs to docs
This allows us to do something like the following:

  tox -e docs -- -b man

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-05 09:59:08 +01:00
Stephen Finucane
40c8f661ef tox: Ensure 'mypy' targets runs with Python 3.x
Turns out this requires Python 3.2 at a minimum. Who knew? We don't
support Python 3.1 so simply fix to 'python3'.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-05 09:59:08 +01:00
Stephen Finucane
71a5ec18be tox: Always show 25 slowest tests
pytest supports this natively [1] and this is what is currently used by
Travis. There's value in seeing similar data locally.

[1] https://docs.pytest.org/en/latest/usage.html#profiling-test-execution-duration

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-05 09:57:58 +01:00
Stephen Finucane
9d114577dc Fix typo in doc
It's 'py:mod', not 'py:module'. I don't know why this wasn't caught by
Sphinx itself.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-05 09:42:37 +01:00
Stephen Finucane
017f124be5 mypy: Move configuration to 'setup.cfg'
Less top-level files = winning [1].

[1] https://mypy.readthedocs.io/en/stable/config_file.html

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-05 09:29:40 +01:00
Stephen Finucane
6d6d3a40f1 tox: Always run coverage
There is value in examining coverage for something like Sphinx. Start
doing this by default, in anticipation of increasing coverage over time.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-05 09:18:20 +01:00
Stephen Finucane
c5dec1b6a9 tox: Add pylint target to tox
This isn't enabled by default because it throws so many damn errors.
Perhaps we should simply remove this?

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-05 09:18:20 +01:00
Takeshi KOMIYA
c57cd9cb06 Merge branch 'stable' 2017-10-05 00:48:50 +09:00
Takeshi KOMIYA
a7bc29f1bd Update CHANGES for PR #4112 2017-10-05 00:47:34 +09:00
Takeshi KOMIYA
2ba41842bf Merge pull request #4112 from alex/smart-quotes
Don't override the smart_quotes setting if it was already set
2017-10-05 00:46:14 +09:00
Alex Gaynor
ee52c7cd4f Don't override the smart_quotes setting if it was already set
This is needed to fix: https://github.com/sphinx-contrib/spelling/issues/1
2017-10-04 11:22:08 -04:00
Takeshi KOMIYA
50640b700b Fix #4070, #4111: crashes when the warning message contains format strings (again) 2017-10-05 00:00:48 +09:00
Takeshi KOMIYA
4dc46350a7 Update CHANGES for PR #4107 2017-10-04 01:51:37 +09:00
Takeshi KOMIYA
2792cb40b5 Merge pull request #4107 from mitya57/sourcelink-suffix-fallback
Make searchtools.js compatible with pre-Sphinx1.5 templates
2017-10-04 01:50:28 +09:00
Dmitry Shachnev
9da3bf93ff Make searchtools.js compatible with pre-Sphinx1.5 templates
There are still plenty of projects which use custom templates where
DOCUMENTATION_OPTIONS does not define SOURCELINK_SUFFIX.

Currently search does not work in these projects. Make suffix fall
back to .txt since that is the default value of configuration option.
2017-10-03 20:03:07 +07:00
Jakob Lykke Andersen
6d61098058 C++, add test case for sphinx-doc/sphinx#4096 2017-10-03 14:35:10 +02:00
Jakob Lykke Andersen
0aa5c1b697 Merge pull request #4096 from mitya57/cpp-no-assert
C++: Do not assert False if type and declType mismatch
2017-10-03 14:31:33 +02:00
Takeshi KOMIYA
fda530b890 Merge pull request #4077 from stephenfin/move-sphinx-build-to-module
sphinx-build: Move code out of 'sphinx.__init__'
2017-10-03 01:13:45 +09:00
Takeshi KOMIYA
a87ca91a4b Merge pull request #4103 from jschueller/qthelp
Document qthelp configuration
2017-10-03 00:40:15 +09:00
Julien Schueller
21ec11e1a7 Document qthelp configuration 2017-10-02 17:26:21 +02:00
Stephen Finucane
1f5ed02225 sphinx-quickstart: Move code to 'sphinx.cmd'
We're going to move the executable's here (or at least those that part
of the core library). The 'sphinx-build' executable was already moved,
so lets do 'sphinx-quickstart' next.

To avoid breaking packages that are using this feature directly, aliases
for the old 'main' method are included. This is based on what Django
does [1] and, like Django, will allow us to safely remove the old
modules in Sphinx 2.0.

[1] https://github.com/django/django/blob/1.11/django/test/runner.py#L688-L695

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-02 15:42:23 +01:00
Stephen Finucane
89f9c7cab7 sphinx-build: Move code out of 'sphinx.__init__'
We have multiple executables in tree and, while 'sphinx-build' is
arguably the most important of these, there's no reason its importance
should warrant inclusion at the package level.

Create a new module, 'sphinx.cmd', and move the code from
'sphinx.__init__' into a 'build' submodule within. This name might be a
bit disingenuous at present, given the availability of 'make-mode' here
too, but that's an artifact of the current executable design and can be
cleaned up later.

To avoid breaking packages that are using this feature directly, aliases
for the old 'main' method are included. This is based on what Django
does [1] and, like Django, will allow us to safely remove the old
modules in Sphinx 2.0.

[1] https://github.com/django/django/blob/1.11/django/test/runner.py#L688-L695

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-02 15:39:31 +01:00
Stephen Finucane
d736efbdab Stop handling package issues from 'sphinx-build'
There were a number of package error handlers run as part of the
'sphinx-build' command/executable:

- Unsupported Python version (it should be 2.7 or 3.4+)
- Missing packages (missing docutils, jinja2, and roman, which is part
  of docutils, packages)
- Out-of-date packages (docutils)

This code is mostly unchanged since Sphinx was first released. Python,
and in particular Python's packaging options, have come a long way since
then. Today, all of the above checks are provided by setuptools and the
'setup.py' script, meaning we should never actually get to the point of
triggering any of these checks. This is further reinforced by the fact
that none of the other executables carry out these checks: either this
is a bug that no one has reported in ~8 years or, more likely, the
checks are useless and we don't need them anywhere.

In all, we can happily remove these checks, greatly simplify a piece of
code that's otherwise rarely touched, and trust that setuptools is up to
the job it's designed for.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-02 15:16:10 +01:00
Dmitry Shachnev
b01de08e19 C++: Do not assert False if type and declType mismatch
Revert to 1.6.4 behavior where a warning was raised instead.
2017-10-02 07:15:13 +03:00
Takeshi KOMIYA
1892fc18b9 Merge branch 'stable' 2017-10-02 00:41:21 +09:00
Takeshi KOMIYA
3ec2a649b4 Update CHANGES for PR #4002 2017-10-01 22:04:38 +09:00
Timotheus Kampik
e2633a81a4 #3987 remove alabaster-specific sidebars
as default sphinx-quickstart settings
2017-10-01 22:02:55 +09:00
Takeshi KOMIYA
cc4200a980 Merge pull request #4078 from stephenfin/better-flake8
setup.cfg: Ignore .venv
2017-10-01 21:11:45 +09:00
Takeshi KOMIYA
ad68ae93c1 Merge pull request #4087 from brainwane/brainwane-patch-grammarfix
Fix grammar in exclude_patterns explanation comment
2017-10-01 21:10:38 +09:00