summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-09-13 10:54:21 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-09-13 10:54:21 +0900
commitbec30596a8f7487cad23df532bf02d1b29024dbc (patch)
tree9a0a414ea420336a66d0c12015152cb1bcc945f6
parent5ade6b72196edd44d043888fc7847f36577d694c (diff)
parent0b44e68d4fed408453859dd9a83dc3ee68d90c7f (diff)
downloadsphinx-git-bec30596a8f7487cad23df532bf02d1b29024dbc.tar.gz
Merge branch '3.x' into master
-rw-r--r--.github/ISSUE_TEMPLATE/config.yml5
-rw-r--r--CHANGES7
-rw-r--r--doc/develop.rst10
-rw-r--r--doc/extdev/appapi.rst15
-rw-r--r--doc/internals/contributing.rst4
-rw-r--r--doc/usage/quickstart.rst2
-rw-r--r--package-lock.json22
-rw-r--r--sphinx/directives/code.py2
-rw-r--r--sphinx/domains/c.py6
-rw-r--r--sphinx/domains/cpp.py2
-rw-r--r--sphinx/ext/autodoc/__init__.py7
-rw-r--r--sphinx/ext/napoleon/docstring.py2
-rw-r--r--sphinx/registry.py2
-rw-r--r--sphinx/util/template.py2
-rw-r--r--tests/test_build_html.py8
15 files changed, 63 insertions, 33 deletions
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index c9009b90e..226532b79 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -2,5 +2,8 @@
blank_issues_enabled: false # default: true
contact_links:
- name: Question
+ url: https://stackoverflow.com/questions/tagged/python-sphinx
+ about: For Q&A purpose, please use Stackoverflow with the tag python-sphinx
+- name: Discussion
url: https://groups.google.com/forum/#!forum/sphinx-users
- about: For Q&A purpose, please use sphinx-users mailing list.
+ about: For general discussion, please use sphinx-users mailing list.
diff --git a/CHANGES b/CHANGES
index 03783b736..bb1530e77 100644
--- a/CHANGES
+++ b/CHANGES
@@ -61,6 +61,9 @@ Bugs fixed
----------
* #8085: i18n: Add support for having single text domain
+* #8143: autodoc: AttributeError is raised when False value is passed to
+ autodoc_default_options
+* #8192: napoleon: description is disappeared when it contains inline literals
* #8093: The highlight warning has wrong location in some builders (LaTeX,
singlehtml and so on)
@@ -85,6 +88,10 @@ Features added
Bugs fixed
----------
+* #8188: C, add missing items to internal object types dictionary,
+ e.g., preventing intersphinx from resolving them.
+
+
Testing
--------
diff --git a/doc/develop.rst b/doc/develop.rst
index 080251ba6..1287a6539 100644
--- a/doc/develop.rst
+++ b/doc/develop.rst
@@ -140,14 +140,14 @@ started with writing your own extensions.
.. _slideshare: https://www.slideshare.net/
.. _TikZ/PGF LaTeX package: https://sourceforge.net/projects/pgf/
.. _MATLAB: https://www.mathworks.com/products/matlab.html
-.. _swf: https://bitbucket.org/klorenz/sphinxcontrib-swf
-.. _findanything: https://bitbucket.org/klorenz/sphinxcontrib-findanything
-.. _cmakedomain: https://bitbucket.org/klorenz/sphinxcontrib-cmakedomain
+.. _swf: https://github.com/sphinx-contrib/swf
+.. _findanything: https://github.com/sphinx-contrib/findanything
+.. _cmakedomain: https://github.com/sphinx-contrib/cmakedomain
.. _GNU Make: https://www.gnu.org/software/make/
-.. _makedomain: https://bitbucket.org/klorenz/sphinxcontrib-makedomain
+.. _makedomain: https://github.com/sphinx-contrib/makedomain
.. _inlinesyntaxhighlight: https://sphinxcontrib-inlinesyntaxhighlight.readthedocs.io/
.. _CMake: https://cmake.org
-.. _domaintools: https://bitbucket.org/klorenz/sphinxcontrib-domaintools
+.. _domaintools: https://github.com/sphinx-contrib/domaintools
.. _restbuilder: https://pypi.org/project/sphinxcontrib-restbuilder/
.. _Lasso: http://www.lassosoft.com/
.. _beamer: https://pypi.org/project/sphinxcontrib-beamer/
diff --git a/doc/extdev/appapi.rst b/doc/extdev/appapi.rst
index 036b57ec1..df3eb3d67 100644
--- a/doc/extdev/appapi.rst
+++ b/doc/extdev/appapi.rst
@@ -177,17 +177,18 @@ type for that event::
9. (if running in parallel mode, for each process) event.env-merged-info(app, env, docnames, other)
10. event.env-updated(app, env)
11. event.env-get-updated(app, env)
- 11. event.env-check-consistency(app, env)
+ 12. event.env-check-consistency(app, env)
+ # The updated-docs list can be builder dependent, but generally includes all new/changed documents,
+ # plus any output from `env-get-updated`, and then all "parent" documents in the ToC tree
# For builders that output a single page, they are first joined into a single doctree before post-transforms/doctree-resolved
- for docname in docnames:
- 12. apply post-transforms (by priority): docutils.document -> docutils.document
- 13. event.doctree-resolved(app, doctree, docname)
+ for docname in updated-docs:
+ 13. apply post-transforms (by priority): docutils.document -> docutils.document
+ 14. event.doctree-resolved(app, doctree, docname)
- (for any reference node that fails to resolve) event.missing-reference(env, node, contnode)
- 14. Generate output files
-
- 15. event.build-finished(app, exception)
+ 15. Generate output files
+ 16. event.build-finished(app, exception)
Here is a more detailed list of these events.
diff --git a/doc/internals/contributing.rst b/doc/internals/contributing.rst
index 0e464478a..1f4a31013 100644
--- a/doc/internals/contributing.rst
+++ b/doc/internals/contributing.rst
@@ -12,6 +12,9 @@ Getting help
The Sphinx community maintains a number of mailing lists and IRC channels.
+Stack Overflow with tag `python-sphinx`_
+ Questions and answers about use and development.
+
sphinx-users <sphinx-users@googlegroups.com>
Mailing list for user support.
@@ -21,6 +24,7 @@ sphinx-dev <sphinx-dev@googlegroups.com>
#sphinx-doc on irc.freenode.net
IRC channel for development questions and user support.
+.. _python-sphinx: https://stackoverflow.com/questions/tagged/python-sphinx
Bug Reports and Feature Requests
--------------------------------
diff --git a/doc/usage/quickstart.rst b/doc/usage/quickstart.rst
index 8d2de021e..1d7e540a6 100644
--- a/doc/usage/quickstart.rst
+++ b/doc/usage/quickstart.rst
@@ -15,7 +15,7 @@ Much of Sphinx's power comes from the richness of its default plain-text markup
format, :doc:`reStructuredText </usage/restructuredtext/index>`, along with
it's :doc:`significant extensibility capabilities </development/index>`.
-The goal of this document is to give you a quick taste of what Sphinx it is and
+The goal of this document is to give you a quick taste of what Sphinx is and
how you might use it. When you're done here, you can check out the
:doc:`installation guide </usage/installation>` followed by the intro to the
default markup format used by Sphinx, :doc:`reStucturedText
diff --git a/package-lock.json b/package-lock.json
index e3fb91e21..087afcf3e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -385,12 +385,6 @@
"integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=",
"dev": true
},
- "eventemitter3": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz",
- "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==",
- "dev": true
- },
"extend": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
@@ -535,14 +529,22 @@
}
},
"http-proxy": {
- "version": "1.17.0",
- "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.17.0.tgz",
- "integrity": "sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g==",
+ "version": "1.18.1",
+ "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz",
+ "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==",
"dev": true,
"requires": {
- "eventemitter3": "^3.0.0",
+ "eventemitter3": "^4.0.0",
"follow-redirects": "^1.0.0",
"requires-port": "^1.0.0"
+ },
+ "dependencies": {
+ "eventemitter3": {
+ "version": "4.0.7",
+ "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz",
+ "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==",
+ "dev": true
+ }
}
},
"iconv-lite": {
diff --git a/sphinx/directives/code.py b/sphinx/directives/code.py
index b79950ea4..4447b746a 100644
--- a/sphinx/directives/code.py
+++ b/sphinx/directives/code.py
@@ -60,7 +60,7 @@ def dedent_lines(lines: List[str], dedent: int, location: Tuple[str, int] = None
return lines
if any(s[:dedent].strip() for s in lines):
- logger.warning(__('Over dedent has detected'), location=location)
+ logger.warning(__('non-whitespace stripped by dedent'), location=location)
new_lines = []
for line in lines:
diff --git a/sphinx/domains/c.py b/sphinx/domains/c.py
index d8ccc2e3d..c759dacbd 100644
--- a/sphinx/domains/c.py
+++ b/sphinx/domains/c.py
@@ -1792,7 +1792,7 @@ class Symbol:
if not declaration:
if Symbol.debug_lookup:
- Symbol.debug_print("no delcaration")
+ Symbol.debug_print("no declaration")
Symbol.debug_indent -= 2
# good, just a scope creation
# TODO: what if we have more than one symbol?
@@ -3607,6 +3607,10 @@ class CDomain(Domain):
'macro': ObjType(_('macro'), 'macro'),
'type': ObjType(_('type'), 'type'),
'var': ObjType(_('variable'), 'data'),
+ 'enum': ObjType(_('enum'), 'enum'),
+ 'enumerator': ObjType(_('enumerator'), 'enumerator'),
+ 'struct': ObjType(_('struct'), 'struct'),
+ 'union': ObjType(_('union'), 'union'),
}
directives = {
diff --git a/sphinx/domains/cpp.py b/sphinx/domains/cpp.py
index 92d578427..7b10f8166 100644
--- a/sphinx/domains/cpp.py
+++ b/sphinx/domains/cpp.py
@@ -4292,7 +4292,7 @@ class Symbol:
if not declaration:
if Symbol.debug_lookup:
- Symbol.debug_print("no delcaration")
+ Symbol.debug_print("no declaration")
Symbol.debug_indent -= 2
# good, just a scope creation
# TODO: what if we have more than one symbol?
diff --git a/sphinx/ext/autodoc/__init__.py b/sphinx/ext/autodoc/__init__.py
index 4d01da07e..018860036 100644
--- a/sphinx/ext/autodoc/__init__.py
+++ b/sphinx/ext/autodoc/__init__.py
@@ -92,7 +92,10 @@ def members_option(arg: Any) -> Union[object, List[str]]:
"""Used to convert the :members: option to auto directives."""
if arg is None or arg is True:
return ALL
- return [x.strip() for x in arg.split(',') if x.strip()]
+ elif arg is False:
+ return None
+ else:
+ return [x.strip() for x in arg.split(',') if x.strip()]
def members_set_option(arg: Any) -> Union[object, Set[str]]:
@@ -170,7 +173,7 @@ def merge_members_option(options: Dict) -> None:
members = options.setdefault('members', [])
for key in {'private-members', 'special-members'}:
- if key in options and options[key] is not ALL:
+ if key in options and options[key] not in (ALL, None):
for member in options[key]:
if member not in members:
members.append(member)
diff --git a/sphinx/ext/napoleon/docstring.py b/sphinx/ext/napoleon/docstring.py
index 71ded1558..e787f46cb 100644
--- a/sphinx/ext/napoleon/docstring.py
+++ b/sphinx/ext/napoleon/docstring.py
@@ -32,7 +32,7 @@ _numpy_section_regex = re.compile(r'^[=\-`:\'"~^_*+#<>]{2,}\s*$')
_single_colon_regex = re.compile(r'(?<!:):(?!:)')
_xref_or_code_regex = re.compile(
r'((?::(?:[a-zA-Z0-9]+[\-_+:.])*[a-zA-Z0-9]+:`.+?`)|'
- r'(?:``.+``))')
+ r'(?:``.+?``))')
_xref_regex = re.compile(
r'(?:(?::(?:[a-zA-Z0-9]+[\-_+:.])*[a-zA-Z0-9]+:)?`.+?`)'
)
diff --git a/sphinx/registry.py b/sphinx/registry.py
index 3c3d25029..43cc35e0d 100644
--- a/sphinx/registry.py
+++ b/sphinx/registry.py
@@ -400,7 +400,7 @@ class SphinxComponentRegistry:
def load_extension(self, app: "Sphinx", extname: str) -> None:
"""Load a Sphinx extension."""
- if extname in app.extensions: # alread loaded
+ if extname in app.extensions: # already loaded
return
if extname in EXTENSION_BLACKLIST:
logger.warning(__('the extension %r was already merged with Sphinx since '
diff --git a/sphinx/util/template.py b/sphinx/util/template.py
index bb078a2a2..8785928a9 100644
--- a/sphinx/util/template.py
+++ b/sphinx/util/template.py
@@ -85,7 +85,7 @@ class LaTeXRenderer(SphinxRenderer):
self.env.block_start_string = '<%'
self.env.block_end_string = '%>'
self.env.comment_start_string = '<#'
- self.env.comment_end_string = '<#'
+ self.env.comment_end_string = '#>'
class ReSTRenderer(SphinxRenderer):
diff --git a/tests/test_build_html.py b/tests/test_build_html.py
index 00a4c20da..45f44c198 100644
--- a/tests/test_build_html.py
+++ b/tests/test_build_html.py
@@ -10,8 +10,10 @@
import os
import re
+from distutils.version import LooseVersion
from itertools import cycle, chain
+import pygments
import pytest
from html5lib import HTMLParser
@@ -1567,4 +1569,8 @@ def test_html_codeblock_linenos_style_inline(app):
app.build()
content = (app.outdir / 'index.html').read_text()
- assert '<span class="lineno">1 </span>' in content
+ pygments_version = tuple(LooseVersion(pygments.__version__).version)
+ if pygments_version > (2, 7):
+ assert '<span class="linenos">1</span>' in content
+ else:
+ assert '<span class="lineno">1 </span>' in content