Skip to content

Conversation

@hugovk
Copy link
Member

@hugovkhugovk 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-appbedevere-appbot added awaiting core review docs Documentation in the Doc dir skip news labels Jan 24, 2024
@hugovkhugovk changed the title Fix Sphinx warnings in whatsnew/3.11.rst and relatedgh-101100: Fix Sphinx warnings in whatsnew/3.11.rst and relatedJan 24, 2024
@hugovkhugovk added needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Jan 24, 2024
Copy link
Member

@serhiy-storchakaserhiy-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.


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

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.

-----------

* :opcode:`ASYNC_GEN_WRAP`, :opcode:`RETURN_GENERATOR` and :opcode:`SEND`,
* :opcode:`!ASYNC_GEN_WRAP`, :opcode:`RETURN_GENERATOR` and :opcode:`SEND`,

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`

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-storchakaserhiy-storchaka removed needs backport to 3.11 only security fixes needs backport to 3.12 only 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
MemberAuthor

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
MemberAuthor

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?

@hugovkhugovk merged commit b6623d6 into python:mainJan 27, 2024
@hugovkhugovk deleted the docs-fix-sphinx-warnings-whatsnew-3.11 branch January 27, 2024 13:07
@bedevere-app
Copy link

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

@bedevere-app
Copy link

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

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docsDocumentation in the Doc dirskip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@hugovk@serhiy-storchaka