Skip to content

gh-101100: Fix Sphinx warnings in whatsnew/2.7.rst and related - #115319

Merged
hugovk merged 7 commits into
python:mainfrom
hugovk:docs-fix-sphinx-warnings-2.7
Feb 12, 2024
Merged

hugovk merged 7 commits into
python:mainfrom
hugovk:docs-fix-sphinx-warnings-2.7

Conversation

@hugovk

@hugovk hugovk commented Feb 12, 2024 •

Copy link
Copy Markdown
Member

Fixes most of the Sphinx reference warnings in whatsnew/2.7.rst, plus some related fixes in other files, 108 warnings in all:

Doc/library/asyncio-subprocess.rst:243: WARNING: py:data reference target not found: SIGTERM
Doc/library/asyncio-subprocess.rst:255: WARNING: c:func reference target not found: TerminateProcess
Doc/library/multiprocessing.rst:652: WARNING: c:func reference target not found: TerminateProcess
Doc/library/subprocess.rst:860: WARNING: c:func reference target not found: TerminateProcess
Doc/whatsnew/2.6.rst:2391: WARNING: py:const reference target not found: SIGTERM
Doc/whatsnew/2.6.rst:2391: WARNING: c:func reference target not found: TerminateProcess
Doc/whatsnew/2.7.rst:199: WARNING: py:func reference target not found: operator.isCallable
Doc/whatsnew/2.7.rst:199: WARNING: py:func reference target not found: operator.sequenceIncludes
Doc/whatsnew/2.7.rst:455: WARNING: py:func reference target not found: logging.fileConfig
Doc/whatsnew/2.7.rst:462: WARNING: py:func reference target not found: logging.dictConfig
Doc/whatsnew/2.7.rst:535: WARNING: py:meth reference target not found: logging.LoggerAdapter.isEnabledFor
Doc/whatsnew/2.7.rst:554: WARNING: py:meth reference target not found: dict.viewkeys
Doc/whatsnew/2.7.rst:554: WARNING: py:meth reference target not found: dict.viewvalues
Doc/whatsnew/2.7.rst:554: WARNING: py:meth reference target not found: dict.viewitems
Doc/whatsnew/2.7.rst:723: WARNING: py:func reference target not found: contextlib.nested
Doc/whatsnew/2.7.rst:787: WARNING: py:meth reference target not found: __coerce__
Doc/whatsnew/2.7.rst:818: WARNING: py:meth reference target not found: __format__
Doc/whatsnew/2.7.rst:828: WARNING: py:func reference target not found: long
Doc/whatsnew/2.7.rst:851: WARNING: py:class reference target not found: unicode
Doc/whatsnew/2.7.rst:851: WARNING: py:meth reference target not found: __unicode__
Doc/whatsnew/2.7.rst:879: WARNING: py:class reference target not found: file
Doc/whatsnew/2.7.rst:879: WARNING: py:attr reference target not found: filename
Doc/whatsnew/2.7.rst:967: WARNING: py:data reference target not found: sys.long_info
Doc/whatsnew/2.7.rst:1008: WARNING: py:meth reference target not found: split
Doc/whatsnew/2.7.rst:1008: WARNING: py:meth reference target not found: replace
Doc/whatsnew/2.7.rst:1008: WARNING: py:meth reference target not found: rindex
Doc/whatsnew/2.7.rst:1008: WARNING: py:meth reference target not found: rpartition
Doc/whatsnew/2.7.rst:1008: WARNING: py:meth reference target not found: rsplit
Doc/whatsnew/2.7.rst:1047: WARNING: py:mod reference target not found: bsddb
Doc/whatsnew/2.7.rst:1132: WARNING: py:class reference target not found: collections.Mapping
Doc/whatsnew/2.7.rst:1161: WARNING: py:func reference target not found: contextlib.nested
Doc/whatsnew/2.7.rst:1196: WARNING: py:class reference target not found: Decimal
Doc/whatsnew/2.7.rst:1220: WARNING: py:const reference target not found: InvalidOperation
Doc/whatsnew/2.7.rst:1238: WARNING: py:const reference target not found: IGNORE_EXCEPTION_DETAIL
Doc/whatsnew/2.7.rst:1242: WARNING: py:attr reference target not found: output_charset
Doc/whatsnew/2.7.rst:1270: WARNING: py:meth reference target not found: __eq__
Doc/whatsnew/2.7.rst:1270: WARNING: py:meth reference target not found: __lt__
Doc/whatsnew/2.7.rst:1270: WARNING: py:meth reference target not found: __le__
Doc/whatsnew/2.7.rst:1270: WARNING: py:meth reference target not found: __gt__
Doc/whatsnew/2.7.rst:1270: WARNING: py:meth reference target not found: __ge__
Doc/whatsnew/2.7.rst:1270: WARNING: py:meth reference target not found: __cmp__
Doc/whatsnew/2.7.rst:1303: WARNING: py:attr reference target not found: hashlib.hashlib.algorithms
Doc/whatsnew/2.7.rst:1348: WARNING: py:mod reference target not found: _pyio
Doc/whatsnew/2.7.rst:1353: WARNING: py:attr reference target not found: errors
Doc/whatsnew/2.7.rst:1426: WARNING: py:class reference target not found: multiprocessing.Pool
Doc/whatsnew/2.7.rst:1426: WARNING: py:class reference target not found: multiprocessing.Pool
Doc/whatsnew/2.7.rst:1495: WARNING: 'envvar' reference target not found: USER_BASE
Doc/whatsnew/2.7.rst:1540: WARNING: c:macro reference target not found: SSL_MODE_AUTO_RETRY
Doc/whatsnew/2.7.rst:1547: WARNING: py:func reference target not found: ssl.wrap_socket
Doc/whatsnew/2.7.rst:1566: WARNING: py:meth reference target not found: __index__
Doc/whatsnew/2.7.rst:1566: WARNING: py:meth reference target not found: __int__
Doc/whatsnew/2.7.rst:1592: WARNING: py:const reference target not found: EINTR
Doc/whatsnew/2.7.rst:1605: WARNING: py:attr reference target not found: major
Doc/whatsnew/2.7.rst:1605: WARNING: py:attr reference target not found: minor
Doc/whatsnew/2.7.rst:1605: WARNING: py:attr reference target not found: micro
Doc/whatsnew/2.7.rst:1605: WARNING: py:attr reference target not found: releaselevel
Doc/whatsnew/2.7.rst:1605: WARNING: py:attr reference target not found: serial
Doc/whatsnew/2.7.rst:1610: WARNING: py:attr reference target not found: major
Doc/whatsnew/2.7.rst:1610: WARNING: py:attr reference target not found: minor
Doc/whatsnew/2.7.rst:1610: WARNING: py:attr reference target not found: build
Doc/whatsnew/2.7.rst:1610: WARNING: py:attr reference target not found: service_pack
Doc/whatsnew/2.7.rst:1610: WARNING: py:attr reference target not found: service_pack_major
Doc/whatsnew/2.7.rst:1610: WARNING: py:attr reference target not found: service_pack_minor
Doc/whatsnew/2.7.rst:1610: WARNING: py:attr reference target not found: suite_mask
Doc/whatsnew/2.7.rst:1610: WARNING: py:attr reference target not found: product_type
Doc/whatsnew/2.7.rst:1694: WARNING: py:mod reference target not found: xml.etree
Doc/whatsnew/2.7.rst:1700: WARNING: py:attr reference target not found: encode_threshold
Doc/whatsnew/2.7.rst:1700: WARNING: py:class reference target not found: SimpleXMLRPCRequestHandler
Doc/whatsnew/2.7.rst:1713: WARNING: py:meth reference target not found: zipfile.ZipFile.readline
Doc/whatsnew/2.7.rst:1810: WARNING: py:mod reference target not found: ttk
Doc/whatsnew/2.7.rst:1817: WARNING: py:mod reference target not found: ttk
Doc/whatsnew/2.7.rst:1829: WARNING: py:mod reference target not found: unittest2
Doc/whatsnew/2.7.rst:1941: WARNING: py:meth reference target not found: unittest.TestCase.assertRegexpMatches
Doc/whatsnew/2.7.rst:1941: WARNING: py:meth reference target not found: unittest.TestCase.assertNotRegexpMatches
Doc/whatsnew/2.7.rst:1946: WARNING: py:meth reference target not found: unittest.TestCase.assertRaisesRegexp
Doc/whatsnew/2.7.rst:1953: WARNING: py:meth reference target not found: unittest.TestCase.assertItemsEqual
Doc/whatsnew/2.7.rst:1967: WARNING: py:meth reference target not found: unittest.TestCase.assertDictContainsSubset
Doc/whatsnew/2.7.rst:2026: WARNING: py:exc reference target not found: ParseError
Doc/whatsnew/2.7.rst:2026: WARNING: py:attr reference target not found: position
Doc/whatsnew/2.7.rst:2030: WARNING: py:attr reference target not found: tag
Doc/whatsnew/2.7.rst:2042: WARNING: py:attr reference target not found: default_namespace
Doc/whatsnew/2.7.rst:2067: WARNING: py:class reference target not found: Element
Doc/whatsnew/2.7.rst:2067: WARNING: py:meth reference target not found: getiterator
Doc/whatsnew/2.7.rst:2067: WARNING: py:meth reference target not found: getchildren
Doc/whatsnew/2.7.rst:2074: WARNING: py:class reference target not found: Element
Doc/whatsnew/2.7.rst:2229: WARNING: py:func reference target not found: threading._shutdown
Doc/whatsnew/2.7.rst:2244: WARNING: py:mod reference target not found: pyexpat
Doc/whatsnew/2.7.rst:2330: WARNING: py:data reference target not found: CRT_ASSEMBLY_VERSION
Doc/whatsnew/2.7.rst:2330: WARNING: py:data reference target not found: VC_ASSEMBLY_PUBLICKEYTOKEN
Doc/whatsnew/2.7.rst:2330: WARNING: py:data reference target not found: LIBRARIES_ASSEMBLY_NAME_PREFIX
Doc/whatsnew/2.7.rst:2345: WARNING: c:func reference target not found: _beginthreadex
Doc/whatsnew/2.7.rst:2349: WARNING: py:const reference target not found: CTRL_C_EVENT
Doc/whatsnew/2.7.rst:2349: WARNING: py:const reference target not found: CTRL_BREAK_EVENT
Doc/whatsnew/2.7.rst:2349: WARNING: c:func reference target not found: TerminateProcess
Doc/whatsnew/2.7.rst:2359: WARNING: py:mod reference target not found: mimelib
Doc/whatsnew/2.7.rst:2388: WARNING: py:const reference target not found: SO_SETFIB
Doc/whatsnew/2.7.rst:2443: WARNING: py:meth reference target not found: __int__
Doc/whatsnew/2.7.rst:2489: WARNING: py:mod reference target not found: xml.etree
Doc/whatsnew/2.7.rst:2495: WARNING: py:meth reference target not found: StringIO.StringIO.readline
Doc/whatsnew/2.7.rst:2495: WARNING: py:class reference target not found: StringIO.StringIO
Doc/whatsnew/2.7.rst:2579: WARNING: 'envvar' reference target not found: PYTHONSHOWREFCOUNT
Doc/whatsnew/2.7.rst:2583: WARNING: 'envvar' reference target not found: PYTHONSHOWALLOCCOUNT
Doc/whatsnew/2.7.rst:2714: WARNING: py:mod reference target not found: xmlrpclib
Doc/whatsnew/2.7.rst:2755: WARNING: py:func reference target not found: ssl._https_verify_certificates
Doc/whatsnew/3.1.rst:172: WARNING: py:func reference target not found: contextlib.nested
Doc/whatsnew/3.2.rst:746: WARNING: py:meth reference target not found: xml.etree.ElementTree.getchildren
Doc/whatsnew/3.2.rst:747: WARNING: py:meth reference target not found: xml.etree.ElementTree.getiterator
Doc/whatsnew/3.2.rst:2685: WARNING: py:func reference target not found: contextlib.nested

The remaining 17 warnings in 2.7.rst might be things that need documenting; I've left them for another time:

Doc/whatsnew/2.7.rst:1484: WARNING: py:exc reference target not found: shutil.SpecialFileError
Doc/whatsnew/2.7.rst:1540: WARNING: py:meth reference target not found: recv
Doc/whatsnew/2.7.rst:1899: WARNING: py:func reference target not found: unittest.setUpModule
Doc/whatsnew/2.7.rst:1899: WARNING: py:func reference target not found: unittest.tearDownModule
Doc/whatsnew/2.7.rst:2030: WARNING: py:meth reference target not found: Element.write
Doc/whatsnew/2.7.rst:2182: WARNING: c:macro reference target not found: Py_ISALNUM
Doc/whatsnew/2.7.rst:2182: WARNING: c:macro reference target not found: Py_ISALPHA
Doc/whatsnew/2.7.rst:2182: WARNING: c:macro reference target not found: Py_ISDIGIT
Doc/whatsnew/2.7.rst:2182: WARNING: c:macro reference target not found: Py_ISLOWER
Doc/whatsnew/2.7.rst:2182: WARNING: c:macro reference target not found: Py_ISSPACE
Doc/whatsnew/2.7.rst:2182: WARNING: c:macro reference target not found: Py_ISUPPER
Doc/whatsnew/2.7.rst:2182: WARNING: c:macro reference target not found: Py_ISXDIGIT
Doc/whatsnew/2.7.rst:2182: WARNING: c:macro reference target not found: Py_TOLOWER
Doc/whatsnew/2.7.rst:2182: WARNING: c:macro reference target not found: Py_TOUPPER
Doc/whatsnew/2.7.rst:2234: WARNING: c:macro reference target not found: T_STRING_INPLACE
Doc/whatsnew/2.7.rst:2260: WARNING: c:macro reference target not found: X87_DOUBLE_ROUNDING
Doc/whatsnew/2.7.rst:2266: WARNING: 'envvar' reference target not found: LDCXXSHARED

📚 Documentation preview 📚: https://cpython-previews--115319.org.readthedocs.build/

@hugovk hugovk added needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Feb 12, 2024
@bedevere-app bedevere-app Bot added awaiting core review docs Documentation in the Doc dir skip news labels Feb 12, 2024
@hugovk hugovk changed the title Fix Sphinx warnings in whatsnew/2.7.rst and related Feb 12, 2024

@AlexWaygood AlexWaygood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! A couple of minor suggestions:

Comment thread Doc/whatsnew/2.6.rst Resolved
Comment thread Doc/whatsnew/2.6.rst Resolved
Comment thread Doc/whatsnew/2.6.rst Resolved
Comment thread Doc/whatsnew/2.7.rst Resolved
hugovk and others added 2 commits February 12, 2024 13:00
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

@AlexWaygood AlexWaygood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few more, sorry!

Comment thread Doc/whatsnew/2.7.rst Resolved
Comment thread Doc/whatsnew/2.7.rst Resolved
Comment thread Doc/whatsnew/2.7.rst Resolved
Comment thread Doc/whatsnew/2.7.rst Resolved
Comment thread Doc/whatsnew/2.7.rst Resolved
Comment thread Doc/whatsnew/2.7.rst Resolved
Comment thread Doc/whatsnew/2.7.rst Resolved
Comment thread Doc/whatsnew/2.7.rst
Comment on lines +1605 to +1614
* The :attr:`sys.version_info` value is now a named tuple, with attributes
named :attr:`!major`, :attr:`!minor`, :attr:`!micro`,
:attr:`!releaselevel`, and :attr:`!serial`. (Contributed by Ross
Light; :issue:`4285`.)

:func:`sys.getwindowsversion` also returns a named tuple,
with attributes named :attr:`major`, :attr:`minor`, :attr:`build`,
:attr:`platform`, :attr:`service_pack`, :attr:`service_pack_major`,
:attr:`service_pack_minor`, :attr:`suite_mask`, and
:attr:`product_type`. (Contributed by Brian Curtin; :issue:`7766`.)
with attributes named :attr:`!major`, :attr:`!minor`, :attr:`!build`,
:attr:`!platform`, :attr:`!service_pack`, :attr:`!service_pack_major`,
:attr:`!service_pack_minor`, :attr:`!suite_mask`, and
:attr:`!product_type`. (Contributed by Brian Curtin; :issue:`7766`.)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(It's possible to link to all of these attributes directly, I think -- but I agree that there's no need to do so; it would just be distracting for the reader. No change requested! :)

Comment thread Doc/whatsnew/2.7.rst Resolved
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

@AlexWaygood AlexWaygood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looks good other than my question at #115319 (comment)

@AlexWaygood AlexWaygood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Some line-length nits)

Comment thread Doc/whatsnew/2.7.rst Resolved
Comment thread Doc/whatsnew/2.7.rst Resolved
Comment thread Doc/whatsnew/2.7.rst Resolved
Comment thread Doc/whatsnew/2.7.rst Resolved
@hugovk

hugovk commented Feb 12, 2024

Copy link
Copy Markdown
Member Author

A few more, sorry!

Always welcome, thank you for the review!

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

@AlexWaygood AlexWaygood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

Comment thread Doc/whatsnew/2.7.rst Resolved
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
@hugovk
hugovk merged commit 92483b2 into python:main Feb 12, 2024
@hugovk
hugovk deleted the docs-fix-sphinx-warnings-2.7 branch February 12, 2024 12:40
@miss-islington-app

Copy link
Copy Markdown

Thanks @hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@miss-islington-app

Copy link
Copy Markdown

Sorry, @hugovk, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 92483b21b30d451586c54dc4923665f7f7eedd7a 3.12
@miss-islington-app

Copy link
Copy Markdown

Sorry, @hugovk, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 92483b21b30d451586c54dc4923665f7f7eedd7a 3.11
@bedevere-app

bedevere-app Bot commented Feb 12, 2024

Copy link
Copy Markdown

GH-115330 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.12 only security fixes label Feb 12, 2024
hugovk added a commit to hugovk/cpython that referenced this pull request Feb 12, 2024
… related (pythonGH-115319)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>.
(cherry picked from commit 92483b2)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@bedevere-app

bedevere-app Bot commented Feb 12, 2024

Copy link
Copy Markdown

GH-115331 is a backport of this pull request to the 3.11 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.11 only security fixes label Feb 12, 2024
hugovk added a commit to hugovk/cpython that referenced this pull request Feb 12, 2024
… related (pythonGH-115319)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>.
(cherry picked from commit 92483b2)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
fsc-eriker pushed a commit to fsc-eriker/cpython that referenced this pull request Feb 14, 2024
python#115319)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

2 participants