Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Apr 26, 2024
2 parents 98deee4 + 5a90de0 commit e58a0e4
Show file tree
Hide file tree
Showing 25 changed files with 354 additions and 193 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/reusable-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
- name: 'Set up Python'
uses: actions/setup-python@v5
with:
python-version: '3.11' # known to work with Sphinx 4.2
python-version: '3.12' # known to work with Sphinx 6.2.1
cache: 'pip'
cache-dependency-path: 'Doc/requirements-oldest-sphinx.txt'
- name: 'Install build dependencies'
Expand Down
4 changes: 2 additions & 2 deletions Doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,8 @@
'languages': ['ja', 'fr', 'zh_TW', 'zh_CN'], 'builders': ['man', 'text'],
}

# Avoid a warning with Sphinx >= 2.0
master_doc = 'contents'
# Avoid a warning with Sphinx >= 4.0
root_doc = 'contents'

# Allow translation of index directives
gettext_additional_targets = [
Expand Down
10 changes: 5 additions & 5 deletions Doc/library/enum.rst
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ Data Types
>>> Color.RED.value
1

Value of the member, can be set in :meth:`~object.__new__`.
Value of the member, can be set in :meth:`~Enum.__new__`.

.. note:: Enum member values

Expand All @@ -299,7 +299,7 @@ Data Types

.. attribute:: Enum._value_

Value of the member, can be set in :meth:`~object.__new__`.
Value of the member, can be set in :meth:`~Enum.__new__`.

.. attribute:: Enum._order_

Expand Down Expand Up @@ -407,8 +407,8 @@ Data Types

results in the call ``int('1a', 16)`` and a value of ``17`` for the member.

..note:: When writing a custom ``__new__``, do not use ``super().__new__`` --
call the appropriate ``__new__`` instead.
.. note:: When writing a custom ``__new__``, do not use ``super().__new__`` --
call the appropriate ``__new__`` instead.

.. method:: Enum.__repr__(self)

Expand Down Expand Up @@ -827,7 +827,7 @@ Supported ``__dunder__`` names
:attr:`~EnumType.__members__` is a read-only ordered mapping of ``member_name``:``member``
items. It is only available on the class.

:meth:`~object.__new__`, if specified, must create and return the enum members;
:meth:`~Enum.__new__`, if specified, must create and return the enum members;
it is also a very good idea to set the member's :attr:`!_value_` appropriately.
Once all the members are created it is no longer used.

Expand Down
38 changes: 19 additions & 19 deletions Doc/requirements-oldest-sphinx.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,29 @@ blurb
python-docs-theme>=2022.1

# Generated from:
# pip install "Sphinx~=4.2.0"
# pip install "Sphinx~=6.2.1"
# pip freeze
#
# Sphinx 4.2 comes from ``needs_sphinx = '4.2'`` in ``Doc/conf.py``.
# Sphinx 6.2.1 comes from ``needs_sphinx = '6.2.1'`` in ``Doc/conf.py``.

alabaster==0.7.13
Babel==2.13.0
certifi==2023.7.22
charset-normalizer==3.3.0
docutils==0.17.1
idna==3.4
alabaster==0.7.16
Babel==2.14.0
certifi==2024.2.2
charset-normalizer==3.3.2
docutils==0.19
idna==3.7
imagesize==1.4.1
Jinja2==3.1.2
MarkupSafe==2.1.3
packaging==23.2
Pygments==2.16.1
Jinja2==3.1.3
MarkupSafe==2.1.5
packaging==24.0
Pygments==2.17.2
requests==2.31.0
snowballstemmer==2.2.0
Sphinx==4.2.0
sphinxcontrib-applehelp==1.0.4
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.1
Sphinx==6.2.1
sphinxcontrib-applehelp==1.0.8
sphinxcontrib-devhelp==1.0.6
sphinxcontrib-htmlhelp==2.0.5
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
urllib3==2.0.7
sphinxcontrib-qthelp==1.0.7
sphinxcontrib-serializinghtml==1.1.10
urllib3==2.2.1
11 changes: 0 additions & 11 deletions Doc/tools/extensions/c_annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"""

from os import path
import docutils
from docutils import nodes
from docutils.parsers.rst import directives
from docutils.parsers.rst import Directive
Expand All @@ -40,16 +39,6 @@
}


# Monkeypatch nodes.Node.findall for forwards compatibility
# This patch can be dropped when the minimum Sphinx version is 4.4.0
# or the minimum Docutils version is 0.18.1.
if docutils.__version_info__ < (0, 18, 1):
def findall(self, *args, **kwargs):
return iter(self.traverse(*args, **kwargs))

nodes.Node.findall = findall


class RCEntry:
def __init__(self, name):
self.name = name
Expand Down
8 changes: 1 addition & 7 deletions Doc/tools/extensions/pyspecific.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,7 @@
from sphinx.util import logging
from sphinx.util.docutils import SphinxDirective
from sphinx.writers.text import TextWriter, TextTranslator

try:
# Sphinx 6+
from sphinx.util.display import status_iterator
except ImportError:
# Deprecated in Sphinx 6.1, will be removed in Sphinx 8
from sphinx.util import status_iterator
from sphinx.util.display import status_iterator


ISSUE_URI = 'https://bugs.python.org/issue?@action=redirect&bpo=%s'
Expand Down
3 changes: 2 additions & 1 deletion Include/internal/pycore_opcode_metadata.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e58a0e4

Please sign in to comment.