Commit Graph

9217 Commits

Author SHA1 Message Date
Stephen Finucane
fa74085afd sphinx-apidoc: Move parser to a separate function
This lets us better reason about what the parser is doing and use tools
like 'sphinx-contrib.autoprogram' in our own documentation in the
future.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-09 16:28:39 +01:00
Stephen Finucane
87630c8ae8 sphinx-apidoc: Convert to argparse
This is pretty self-explanatory, with most changes coming about as a
side-effect of argparse vs. optparse API differences.

Lowercase characters are used in help strings, per argparse conventions.
Some tests are converted because argparse natively supports unicode.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-09 16:28:39 +01:00
Stephen Finucane
bdaab9ef1b Remove static scripts
Executable scripts without the '.py' extension are already created and
installed by setuptools, by way of the 'console_scripts' section. These
scripts are unnecessary noise. If people want to test this behavior
locally, use a virtualenv.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-09 16:28:39 +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
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
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
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
Takeshi KOMIYA
fd0a56bd37 Fix #4100: Remove debug print from autodoc extension 2017-10-01 01:39:47 +09:00
Jakob Lykke Andersen
a3b66eb095 Merge pull request #4095 from Andne/cpp-tests
Cleanup the C++/Intersphinx test to avoid std namespace
2017-09-28 21:52:30 +02:00
Jakob Lykke Andersen
b85ea529b8 C++, allow empty template argument lists
See sphinx-doc/sphinx#4094
2017-09-28 20:46:34 +02:00
Andy Neebel
3a0c050af0 Some cleanup to avoid using the std:: namespace 2017-09-28 13:43:46 -05:00
Jakob Lykke Andersen
447c54ae92 C++, adapt sphinx-doc/sphinx#3894 after merge to master
Fixes sphinx-doc/sphinx#4082
2017-09-28 20:10:07 +02:00
jfbu
db36b42e55 Avoid extra space in PDF after image in parsed-literal (refs: Fix #4085) 2017-09-27 12:43:28 +02:00
jfbu
dc129e0532 Fix #4085 Failed PDF build from image in parsed-literal 2017-09-27 09:54:18 +02:00
Sumana Harihareswara
384ccf7813 Fix grammar in exclude_patterns explanation comment 2017-09-26 12:55:51 -04:00
Stephen Finucane
5e1af8df77 setup.cfg: Ignore .venv
We started ignoring this file from Git in commit 75154196b. Now do the
same for flake8.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-09-26 15:43:45 +01:00
Takayuki SHIMIZUKAWA
e15e9a79b4 fix a glitch 2017-09-26 22:49:23 +09:00
Takeshi KOMIYA
5cfefdf2c1 Update CHANGES for PR #3929 2017-09-26 15:47:20 +09:00
Takeshi KOMIYA
1ef0351ec1 Merge pull request #3929 from stephenfin/move-sphinx-apidoc-to-ext
apidoc: Move apidoc to ext/apidoc
2017-09-26 15:42:25 +09:00
Takeshi KOMIYA
43cbd5d0d2 Merge branch 'stable' 2017-09-26 09:49:48 +09:00
Takeshi KOMIYA
0ba56553e3 Bump version 2017-09-26 09:48:09 +09:00
Takeshi KOMIYA
c6fe6a3bf2 Bump to 1.6.4 final 2017-09-26 09:45:14 +09:00
Takeshi KOMIYA
cc5a1542c7 Fix #4051: warn() function for HTML theme outputs 'None' string 2017-09-26 01:29:12 +09:00
Takeshi KOMIYA
f2fbd81a70 Merge pull request #4084 from sphinx-doc/4051_warn_outputs_None_string
Fix #4051: warn() function for HTML theme outputs 'None' string
2017-09-26 01:28:31 +09:00
Takeshi KOMIYA
ec2e60674f Fix #4051: warn() function for HTML theme outputs 'None' string 2017-09-26 00:56:24 +09:00
Takeshi KOMIYA
ee600e308d Merge pull request #4083 from alex/patch-1
Switched stylesheet for font to HTTPS to avoid mixed content issues
2017-09-25 16:54:46 +09:00
Alex Gaynor
f9250e198b Switched stylesheet for font to HTTPS to avoid mixed content issues 2017-09-24 14:02:53 -04:00