Skip to content

Commit 096108c

Browse files
authored
Merge branch '4.x' into 9756_classmethod_not_having_func
2 parents ced8895 + d8b92bb commit 096108c

File tree

156 files changed

+1021
-990
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+1021
-990
lines changed

.github/workflows/transifex.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
ref: 4.x
1616
- name: Set up Python
1717
uses: actions/setup-python@v2
18+
with:
19+
python-version: 3.9 # https://github.com/transifex/transifex-client/pull/330
1820
- name: Install dependencies
1921
run: pip install -U babel jinja2 transifex-client
2022
- name: Extract translations from source code
@@ -33,6 +35,8 @@ jobs:
3335
ref: 4.x
3436
- name: Set up Python
3537
uses: actions/setup-python@v2
38+
with:
39+
python-version: 3.9 # https://github.com/transifex/transifex-client/pull/330
3640
- name: Install dependencies
3741
run: pip install -U babel jinja2 transifex-client
3842
- name: Extract translations from source code

CHANGES

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Incompatible changes
2828
Deprecated
2929
----------
3030

31+
* ``sphinx.ext.autodoc.AttributeDocumenter._datadescriptor``
3132
* ``sphinx.writers.html.HTMLTranslator._fieldlist_row_index``
3233
* ``sphinx.writers.html.HTMLTranslator._table_row_index``
3334
* ``sphinx.writers.html5.HTML5Translator._fieldlist_row_index``
@@ -60,13 +61,18 @@ Bugs fixed
6061
* #9657: autodoc: The base class for a subclass of mocked object is incorrect
6162
* #9607: autodoc: Incorrect base class detection for the subclasses of the
6263
generic class
64+
* #9755: autodoc: memory addresses are shown for aliases
65+
* #9752: autodoc: Failed to detect type annotation for slots attribute
6366
* #9756: autodoc: Crashed if classmethod does not have __func__ attribute
6467
* #9630: autosummary: Failed to build summary table if :confval:`primary_domain`
6568
is not 'py'
6669
* #9670: html: Fix download file with special characters
6770
* #9710: html: Wrong styles for even/odd rows in nested tables
71+
* #9763: html: parameter name and its type annotation are not separated in HTML
6872
* #9649: HTML search: when objects have the same name but in different domains,
6973
return all of them as result instead of just one.
74+
* #7634: intersphinx: references on the file in sub directory are broken
75+
* #9737: LaTeX: hlist is rendered as a list containing "aggedright" text
7076
* #9678: linkcheck: file extension was shown twice in warnings
7177
* #9697: py domain: An index entry with parens was registered for ``py:method``
7278
directive with ``:property:`` option

doc/extdev/deprecated.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ The following is a list of deprecated interfaces.
2222
- (will be) Removed
2323
- Alternatives
2424

25+
* - ``sphinx.ext.autodoc.AttributeDocumenter._datadescriptor``
26+
- 4.3
27+
- 6.0
28+
- N/A
29+
2530
* - ``sphinx.writers.html.HTMLTranslator._fieldlist_row_index``
2631
- 4.3
2732
- 6.0

doc/usage/configuration.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2637,10 +2637,8 @@ Options for the linkcheck builder
26372637
A regular expression that matches a URI.
26382638
*auth_info*
26392639
Authentication information to use for that URI. The value can be anything
2640-
that is understood by the ``requests`` library (see `requests
2641-
Authentication <requests-auth>`_ for details).
2642-
2643-
.. _requests-auth: https://requests.readthedocs.io/en/master/user/authentication/
2640+
that is understood by the ``requests`` library (see :ref:`requests
2641+
Authentication <requests:authentication>` for details).
26442642

26452643
The ``linkcheck`` builder will use the first matching ``auth_info`` value
26462644
it can find in the :confval:`linkcheck_auth` list, so values earlier in the

sphinx/builders/_epub_base.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -323,14 +323,14 @@ def footnote_spot(tree: nodes.document) -> Tuple[Element, int]:
323323
# a) place them after the last existing footnote
324324
# b) place them after an (empty) Footnotes rubric
325325
# c) create an empty Footnotes rubric at the end of the document
326-
fns = tree.traverse(nodes.footnote)
326+
fns = list(tree.traverse(nodes.footnote))
327327
if fns:
328328
fn = fns[-1]
329329
return fn.parent, fn.parent.index(fn) + 1
330330
for node in tree.traverse(nodes.rubric):
331331
if len(node) == 1 and node.astext() == FOOTNOTES_RUBRIC_NAME:
332332
return node.parent, node.parent.index(node) + 1
333-
doc = tree.traverse(nodes.document)[0]
333+
doc = list(tree.traverse(nodes.document))[0]
334334
rub = nodes.rubric()
335335
rub.append(nodes.Text(FOOTNOTES_RUBRIC_NAME))
336336
doc.append(rub)
@@ -339,10 +339,10 @@ def footnote_spot(tree: nodes.document) -> Tuple[Element, int]:
339339
if show_urls == 'no':
340340
return
341341
if show_urls == 'footnote':
342-
doc = tree.traverse(nodes.document)[0]
342+
doc = list(tree.traverse(nodes.document))[0]
343343
fn_spot, fn_idx = footnote_spot(tree)
344344
nr = 1
345-
for node in tree.traverse(nodes.reference):
345+
for node in list(tree.traverse(nodes.reference)):
346346
uri = node.get('refuri', '')
347347
if (uri.startswith('http:') or uri.startswith('https:') or
348348
uri.startswith('ftp:')) and uri not in node.astext():

sphinx/builders/latex/transforms.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class SubstitutionDefinitionsRemover(SphinxPostTransform):
4545
formats = ('latex',)
4646

4747
def run(self, **kwargs: Any) -> None:
48-
for node in self.document.traverse(nodes.substitution_definition):
48+
for node in list(self.document.traverse(nodes.substitution_definition)):
4949
node.parent.remove(node)
5050

5151

@@ -81,7 +81,7 @@ def expand_show_urls(self) -> None:
8181
if show_urls is False or show_urls == 'no':
8282
return
8383

84-
for node in self.document.traverse(nodes.reference):
84+
for node in list(self.document.traverse(nodes.reference)):
8585
uri = node.get('refuri', '')
8686
if uri.startswith(URI_SCHEMES):
8787
if uri.startswith('mailto:'):
@@ -501,7 +501,7 @@ class BibliographyTransform(SphinxPostTransform):
501501

502502
def run(self, **kwargs: Any) -> None:
503503
citations = thebibliography()
504-
for node in self.document.traverse(nodes.citation):
504+
for node in list(self.document.traverse(nodes.citation)):
505505
node.parent.remove(node)
506506
citations += node
507507

@@ -602,9 +602,9 @@ class IndexInSectionTitleTransform(SphinxPostTransform):
602602
formats = ('latex',)
603603

604604
def run(self, **kwargs: Any) -> None:
605-
for node in self.document.traverse(nodes.title):
605+
for node in list(self.document.traverse(nodes.title)):
606606
if isinstance(node.parent, nodes.section):
607-
for i, index in enumerate(node.traverse(addnodes.index)):
607+
for i, index in enumerate(list(node.traverse(addnodes.index))):
608608
# move the index node next to the section title
609609
node.remove(index)
610610
node.parent.insert(i + 1, index)

sphinx/domains/c.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
_string_re = re.compile(r"[LuU8]?('([^'\\]*(?:\\.[^'\\]*)*)'"
9393
r'|"([^"\\]*(?:\\.[^"\\]*)*)")', re.S)
9494

95-
_simple_type_sepcifiers_re = re.compile(r"""(?x)
95+
_simple_type_specifiers_re = re.compile(r"""(?x)
9696
\b(
9797
void|_Bool|bool
9898
# Integer
@@ -2584,7 +2584,7 @@ def _parse_trailing_type_spec(self) -> ASTTrailingTypeSpec:
25842584
# fundamental types, https://en.cppreference.com/w/c/language/type
25852585
# and extensions
25862586
self.skip_ws()
2587-
if self.match(_simple_type_sepcifiers_re):
2587+
if self.match(_simple_type_specifiers_re):
25882588
return ASTTrailingTypeSpecFundamental(self.matched_text)
25892589

25902590
# prefixed

sphinx/domains/cpp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@
335335
]
336336

337337

338-
_simple_type_sepcifiers_re = re.compile(r"""(?x)
338+
_simple_type_specifiers_re = re.compile(r"""(?x)
339339
\b(
340340
auto|void|bool
341341
# Integer
@@ -5859,7 +5859,7 @@ def _parse_trailing_type_spec(self) -> ASTTrailingTypeSpec:
58595859
# fundamental types, https://en.cppreference.com/w/cpp/language/type
58605860
# and extensions
58615861
self.skip_ws()
5862-
if self.match(_simple_type_sepcifiers_re):
5862+
if self.match(_simple_type_specifiers_re):
58635863
return ASTTrailingTypeSpecFundamental(self.matched_text)
58645864

58655865
# decltype

sphinx/domains/index.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def merge_domaindata(self, docnames: Iterable[str], otherdata: Dict) -> None:
4848
def process_doc(self, env: BuildEnvironment, docname: str, document: Node) -> None:
4949
"""Process a document after it is read by the environment."""
5050
entries = self.entries.setdefault(env.docname, [])
51-
for node in document.traverse(addnodes.index):
51+
for node in list(document.traverse(addnodes.index)):
5252
try:
5353
for entry in node['entries']:
5454
split_index_msg(entry[0], entry[1])

sphinx/domains/python.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ def make_xref(self, rolename: str, domain: str, target: str,
328328
text = target[1:]
329329
elif prefix == '~':
330330
text = target.split('.')[-1]
331-
for node in result.traverse(nodes.Text):
331+
for node in list(result.traverse(nodes.Text)):
332332
node.parent[node.parent.index(node)] = nodes.Text(text)
333333
break
334334
elif isinstance(result, pending_xref) and env.config.python_use_unqualified_type_names:

0 commit comments

Comments
 (0)