Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-101100: Fix Sphinx warnings in whatsnew/3.11.rst and related #114531

Merged
merged 3 commits into from
Jan 27, 2024

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Jan 24, 2024

Fix 51 warnings, mainly removals or renames.

Doc/whatsnew/2.7.rst:2129: WARNING: c:func reference target not found: PyCode_New
Doc/whatsnew/3.11.rst:673: WARNING: py:meth reference target not found: Enum.__str__
Doc/whatsnew/3.11.rst:1280: WARNING: py:meth reference target not found: list.append
Doc/whatsnew/3.11.rst:1607: WARNING: 'opcode' reference target not found: ASYNC_GEN_WRAP
Doc/whatsnew/3.11.rst:1618: WARNING: 'opcode' reference target not found: PREP_RERAISE_STAR
Doc/whatsnew/3.11.rst:1641: WARNING: 'opcode' reference target not found: KW_NAMES
Doc/whatsnew/3.11.rst:1642: WARNING: 'opcode' reference target not found: PRECALL
Doc/whatsnew/3.11.rst:1655: WARNING: 'opcode' reference target not found: POP_JUMP_BACKWARD_IF_TRUE
Doc/whatsnew/3.11.rst:1657: WARNING: 'opcode' reference target not found: POP_JUMP_FORWARD_IF_TRUE
Doc/whatsnew/3.11.rst:1663: WARNING: 'opcode' reference target not found: JUMP_IF_TRUE_OR_POP
Doc/whatsnew/3.11.rst:1663: WARNING: 'opcode' reference target not found: JUMP_IF_FALSE_OR_POP
Doc/whatsnew/3.11.rst:1792: WARNING: py:func reference target not found: importlib.resources.contents
Doc/whatsnew/3.11.rst:1793: WARNING: py:func reference target not found: importlib.resources.is_resource
Doc/whatsnew/3.11.rst:1794: WARNING: py:func reference target not found: importlib.resources.open_binary
Doc/whatsnew/3.11.rst:1795: WARNING: py:func reference target not found: importlib.resources.open_text
Doc/whatsnew/3.11.rst:1796: WARNING: py:func reference target not found: importlib.resources.read_binary
Doc/whatsnew/3.11.rst:1797: WARNING: py:func reference target not found: importlib.resources.read_text
Doc/whatsnew/3.11.rst:1798: WARNING: py:func reference target not found: importlib.resources.path
Doc/whatsnew/3.11.rst:1806: WARNING: py:func reference target not found: locale.resetlocale
Doc/whatsnew/3.11.rst:1970: WARNING: py:mod reference target not found: distutils
Doc/whatsnew/3.11.rst:2298: WARNING: c:func reference target not found: PyCode_New
Doc/whatsnew/3.11.rst:2298: WARNING: c:func reference target not found: PyCode_NewWithPosOnlyArgs
Doc/whatsnew/3.11.rst:2405: WARNING: c:func reference target not found: PyUnicode_CHECK_INTERNED
Doc/whatsnew/3.11.rst:2466: WARNING: c:func reference target not found: PyFrame_FastToLocalsWithError
Doc/whatsnew/3.11.rst:2466: WARNING: c:func reference target not found: PyFrame_LocalsToFast
Doc/whatsnew/3.11.rst:2607: WARNING: c:func reference target not found: PyUnicode_IS_COMPACT
Doc/whatsnew/3.11.rst:2608: WARNING: c:func reference target not found: PyUnicode_IS_READY
Doc/whatsnew/3.11.rst:2662: WARNING: c:type reference target not found: PyWeakReference
Doc/whatsnew/3.8.rst:1626: WARNING: c:func reference target not found: PyCode_NewWithPosOnlyArgs
Doc/whatsnew/3.8.rst:1626: WARNING: c:func reference target not found: PyCode_New
build/NEWS:4617: WARNING: 'opcode' reference target not found: KW_NAMES
build/NEWS:5158: WARNING: 'opcode' reference target not found: JUMP_IF_FALSE_OR_POP
build/NEWS:5158: WARNING: 'opcode' reference target not found: JUMP_IF_TRUE_OR_POP
build/NEWS:5508: WARNING: 'opcode' reference target not found: PREP_RERAISE_STAR
build/NEWS:6036: WARNING: 'opcode' reference target not found: UNARY_POSITIVE
build/NEWS:6036: WARNING: 'opcode' reference target not found: ASYNC_GEN_WRAP
build/NEWS:6036: WARNING: 'opcode' reference target not found: LIST_TO_TUPLE
build/NEWS:9676: WARNING: 'opcode' reference target not found: JUMP_IF_TRUE_OR_POP
build/NEWS:9676: WARNING: 'opcode' reference target not found: JUMP_IF_FALSE_OR_POP
build/NEWS:10343: WARNING: c:func reference target not found: PyFrame_FastToLocalsWithError
build/NEWS:10343: WARNING: c:func reference target not found: PyFrame_LocalsToFast
build/NEWS:10396: WARNING: 'opcode' reference target not found: PRECALL
build/NEWS:10968: WARNING: 'opcode' reference target not found: PRECALL
build/NEWS:11773: WARNING: 'opcode' reference target not found: PREP_RERAISE_STAR
build/NEWS:11776: WARNING: 'opcode' reference target not found: POP_EXCEPT_AND_RERAISE
build/NEWS:12139: WARNING: c:func reference target not found: PyUnicode_CHECK_INTERNED
build/NEWS:13083: WARNING: c:type reference target not found: PyWeakReference
build/NEWS:20372: WARNING: py:mod reference target not found: lib2to3.fixes.fix_urllib
build/NEWS:23463: WARNING: c:func reference target not found: PyCode_NewWithPosOnlyArgs
build/NEWS:23463: WARNING: c:func reference target not found: PyCode_New
build/NEWS:26488: WARNING: py:mod reference target not found: lib2to3.pgen2.tokenize

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

@bedevere-app bedevere-app bot added awaiting core review docs Documentation in the Doc dir skip news labels Jan 24, 2024
@hugovk hugovk changed the title Fix Sphinx warnings in whatsnew/3.11.rst and related gh-101100: Fix Sphinx warnings in whatsnew/3.11.rst and related Jan 24, 2024
@hugovk hugovk added needs backport to 3.11 only security fixes needs backport to 3.12 bug and security fixes labels Jan 24, 2024
Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

It LGTM for main, but most of the changes should not be backported to 3.11, and some should not be backported to 3.12 either.

It is safer to not use automation, but re-do this work for 3.12 and 3..11 separately, to be sure that you do not remove a working reference.

@@ -1278,7 +1278,7 @@ This section covers specific optimizations independent of the
(Contributed by Stefan Behnel in :gh:`68264`.)

* Resizing lists is streamlined for the common case,
speeding up :meth:`list.append` by ≈15%
speeding up :meth:`!list.append` by ≈15%
Copy link
Member

Choose a reason for hiding this comment

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

I would left it as a reminder that we should add a reference to list.append, and not sweep it under cover.

@@ -1604,7 +1604,7 @@ raw, adaptive bytecode containing quickened data.
New opcodes
-----------

* :opcode:`ASYNC_GEN_WRAP`, :opcode:`RETURN_GENERATOR` and :opcode:`SEND`,
* :opcode:`!ASYNC_GEN_WRAP`, :opcode:`RETURN_GENERATOR` and :opcode:`SEND`,
Copy link
Member

Choose a reason for hiding this comment

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

It should not be backported to 3.11.

Comment on lines +1792 to +1798
* :func:`!importlib.resources.contents`
* :func:`!importlib.resources.is_resource`
* :func:`!importlib.resources.open_binary`
* :func:`!importlib.resources.open_text`
* :func:`!importlib.resources.read_binary`
* :func:`!importlib.resources.read_text`
* :func:`!importlib.resources.path`
Copy link
Member

Choose a reason for hiding this comment

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

It should not be backported to 3.12.

@serhiy-storchaka serhiy-storchaka removed needs backport to 3.11 only security fixes needs backport to 3.12 bug and security fixes labels Jan 26, 2024
@serhiy-storchaka
Copy link
Member

It could be perhaps simpler to make a patch for 3.11, then apply it to 3.12, fix new warnings, apply the new patch to main and fix the remaining warnings. It is how we did before Git. You can still use this sequence for fixing What's New for older versions.

@hugovk
Copy link
Member Author

hugovk commented Jan 26, 2024

It is safer to not use automation, but re-do this work for 3.12 and 3..11 separately, to be sure that you do not remove a working reference.

yep, good idea.

It could be perhaps simpler to make a patch for 3.11, then apply it to 3.12, fix new warnings, apply the new patch to main and fix the remaining warnings. It is how we did before Git. You can still use this sequence for fixing What's New for older versions.

Interesting, will try that for the next What's New. 👍

@hugovk
Copy link
Member Author

hugovk commented Jan 27, 2024

I would left it as a reminder that we should add a reference to list.append, and not sweep it under cover.

Sure, we-added :meth:`list.append`, we can deal with it in a new PR.

For that PR, append is in this table of operations for mutable sequence types:

https://docs.python.org/3/library/stdtypes.html#mutable-sequence-types

Should we link list.append to this table, via its existing typesseq-mutable reference, or add new reference to it?

Or add append to https://docs.python.org/3/library/stdtypes.html#lists?

Or somewhere else?

@hugovk hugovk merged commit b6623d6 into python:main Jan 27, 2024
25 checks passed
@hugovk hugovk deleted the docs-fix-sphinx-warnings-whatsnew-3.11 branch January 27, 2024 13:07
@bedevere-app
Copy link

bedevere-app bot commented Jan 27, 2024

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

@bedevere-app
Copy link

bedevere-app bot commented Jan 27, 2024

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

aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants