Commit Graph

9308 Commits

Author SHA1 Message Date
Yoshiki Shibukawa
cd1c7e01dc fix #4063: Sphinx crushes when there are referenced todolist 2017-10-12 23:19:09 +09:00
Takeshi KOMIYA
87e39a5080 Merge pull request #4141 from hugovk/patch-1
Update classifiers with supported versions
2017-10-11 23:39:33 +09:00
Hugo
dd91df0be2 Update classifiers with supported versions 2017-10-11 17:16:15 +03:00
Aaron Carlisle
61fe8b04cc Theme: Move body tag into a block
Sometimes users might want to override this tag to include custom information such as `id`s e.g:

`<body id="page-top">`

Can be done with `{%- block body_tag %}<body id="page-top">{% endblock %}`
2017-10-10 17:59:47 -04:00
Peter Cock
cc89093777 Treat lists like tuples in AST function get_lvar_namesl 2017-10-10 16:26:28 +01:00
Peter Cock
350f196c4f Report the unimplemented node_name in exception 2017-10-10 16:23:38 +01:00
Stephen Finucane
67753b7ce3 Remove 'test-reqs.txt'
We were never really using this file for its specified purpose [1]. Now
that we have everything cleanly organized in 'setup.py', there really
isn't any reason to keep it around. Remove it.

[1] https://caremad.io/posts/2013/07/setup-vs-requirement/

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-10 14:13:09 +01:00
Stephen Finucane
eb8efce7d8 requirements: Reduce duplication
Simply installing packages will ensure that most of the dependencies in
'setup.py' are installed, meaning 'test-reqs.txt' need only contain
those necessary for testing.

The only notable change is that the 'simplejson' module is dropped from
the requirements list. This included as a dependency for the PyPy
target, but it appears that this is not necessary today (though it may
have been when the target was added in 2011).

This retains 'setup.py test' which, as noted in the tox docs [1], is
sometimes expected for downstream distribution testing. We may wish to
find a way to synchronize requirements between 'test-reqs.txt' and this
section in the future, but that's work for another day.

[1] https://tox.readthedocs.io/en/latest/example/basic.html#integration-with-setup-py-test-command

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-10 14:06:10 +01:00
Stephen Finucane
dbd58d4c51 setup.py: Stop caring about pip 1.5.6
This version is silly old and anyone that's _still_ using this is not
going to be building Sphinx from source. Simply remove it.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-10 14:03:48 +01:00
Takeshi KOMIYA
8fb03f5967 Merge pull request #4113 from funkyfuture/tests
Some testing related enhancements
2017-10-10 20:29:51 +09:00
Takeshi KOMIYA
4faa727368 Update CHANGES for PR #4125 2017-10-10 20:00:54 +09:00
Takeshi KOMIYA
e8dc07e44b Merge pull request #4125 from cocoatomo/translation-inconsistency-warning
Display reference texts of original and translated passages
2017-10-10 19:58:06 +09:00
Takeshi KOMIYA
36300dcb18 Merge branch 'master' into tests 2017-10-10 19:55:46 +09:00
Takeshi KOMIYA
3f72683827 Merge pull request #4118 from stephenfin/the-great-toxification-2
The great toxification (part 2)
2017-10-10 19:54:09 +09:00
Takeshi KOMIYA
d699fa66a6 Merge pull request #4117 from stephenfin/the-great-toxification-1
The great toxification (part 1)
2017-10-10 19:50:35 +09:00
Frank Sachsenheim
990de5799a Adds a note about passing args to pytest. 2017-10-09 22:37:27 +02:00
Frank Sachsenheim
b2959a91c5 Makefile: Adds a target to build docs from the root dir. 2017-10-09 22:37:27 +02:00
Frank Sachsenheim
26796f6985 Makefile: Makes PHONY statements more maintainable. 2017-10-09 22:14:51 +02:00
Takeshi KOMIYA
75759053ca Merge pull request #4128 from tk0miya/1448_qthelp_namespace
Add qthelp_namespace
2017-10-09 01:38:31 +09:00
Takeshi KOMIYA
1292089255 Close #1448: qthelp: Add new config value; qthelp_namespace 2017-10-08 23:22:56 +09:00
Takeshi KOMIYA
2839fc5f68 Update docs (refs: #1448) 2017-10-08 13:15:43 +09:00
cocoatomo
35d10033c2 Add (optional) u prefixes for Python 2.7 2017-10-08 01:55:53 +09:00
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
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