Skip to content

Commit 5689108

Browse files
committed
Merge remote-tracking branch 'upstream/3.12' into backport-10bb90e-3.12
2 parents 6872edd + 09a85ea commit 5689108

Some content is hidden

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

55 files changed

+1939
-1755
lines changed

Doc/Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,14 @@ gettext: build
150150
htmlview: html
151151
$(PYTHON) -c "import os, webbrowser; webbrowser.open('file://' + os.path.realpath('build/html/index.html'))"
152152

153+
.PHONY: ensure-sphinx-autobuild
154+
ensure-sphinx-autobuild: venv
155+
$(VENVDIR)/bin/sphinx-autobuild --version > /dev/null || $(VENVDIR)/bin/python3 -m pip install sphinx-autobuild
156+
153157
.PHONY: htmllive
154158
htmllive: SPHINXBUILD = $(VENVDIR)/bin/sphinx-autobuild
155159
htmllive: SPHINXOPTS = --re-ignore="/venv/" --open-browser --delay 0
156-
htmllive: html
160+
htmllive: ensure-sphinx-autobuild html
157161

158162
.PHONY: clean
159163
clean: clean-venv

Doc/c-api/buffer.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ a buffer, see :c:func:`PyObject_GetBuffer`.
147147
or a :c:macro:`PyBUF_WRITABLE` request, the consumer must disregard
148148
:c:member:`~Py_buffer.itemsize` and assume ``itemsize == 1``.
149149

150-
.. c:member:: const char *format
150+
.. c:member:: char *format
151151
152-
A *NUL* terminated string in :mod:`struct` module style syntax describing
152+
A *NULL* terminated string in :mod:`struct` module style syntax describing
153153
the contents of a single item. If this is ``NULL``, ``"B"`` (unsigned bytes)
154154
is assumed.
155155

Doc/c-api/weakref.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ as much as it can.
3535
callable object that receives notification when *ob* is garbage collected; it
3636
should accept a single parameter, which will be the weak reference object
3737
itself. *callback* may also be ``None`` or ``NULL``. If *ob* is not a
38-
weakly referencable object, or if *callback* is not callable, ``None``, or
38+
weakly referenceable object, or if *callback* is not callable, ``None``, or
3939
``NULL``, this will return ``NULL`` and raise :exc:`TypeError`.
4040
4141
@@ -47,7 +47,7 @@ as much as it can.
4747
be a callable object that receives notification when *ob* is garbage
4848
collected; it should accept a single parameter, which will be the weak
4949
reference object itself. *callback* may also be ``None`` or ``NULL``. If *ob*
50-
is not a weakly referencable object, or if *callback* is not callable,
50+
is not a weakly referenceable object, or if *callback* is not callable,
5151
``None``, or ``NULL``, this will return ``NULL`` and raise :exc:`TypeError`.
5252
5353

Doc/data/python3.12.abi

Lines changed: 893 additions & 868 deletions
Large diffs are not rendered by default.

Doc/extending/extending.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ It is important to call :c:func:`free` at the right time. If a block's address
857857
is forgotten but :c:func:`free` is not called for it, the memory it occupies
858858
cannot be reused until the program terminates. This is called a :dfn:`memory
859859
leak`. On the other hand, if a program calls :c:func:`free` for a block and then
860-
continues to use the block, it creates a conflict with re-use of the block
860+
continues to use the block, it creates a conflict with reuse of the block
861861
through another :c:func:`malloc` call. This is called :dfn:`using freed memory`.
862862
It has the same bad consequences as referencing uninitialized data --- core
863863
dumps, wrong results, mysterious crashes.

Doc/extending/newtypes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ performance-critical objects (such as numbers).
545545
.. seealso::
546546
Documentation for the :mod:`weakref` module.
547547

548-
For an object to be weakly referencable, the extension type must set the
548+
For an object to be weakly referenceable, the extension type must set the
549549
``Py_TPFLAGS_MANAGED_WEAKREF`` bit of the :c:member:`~PyTypeObject.tp_flags`
550550
field. The legacy :c:member:`~PyTypeObject.tp_weaklistoffset` field should
551551
be left as zero.

Doc/faq/general.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ available. Consult `the Python Package Index <https://pypi.org>`_ to
122122
find packages of interest to you.
123123

124124

125+
.. _faq-version-numbering-scheme:
126+
125127
How does the Python version numbering scheme work?
126128
--------------------------------------------------
127129

@@ -183,8 +185,6 @@ information on getting the source code and compiling it.
183185
How do I get documentation on Python?
184186
-------------------------------------
185187

186-
.. XXX mention py3k
187-
188188
The standard documentation for the current stable version of Python is available
189189
at https://docs.python.org/3/. PDF, plain text, and downloadable HTML versions are
190190
also available at https://docs.python.org/3/download.html.

Doc/howto/mro.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ In this case the MRO is GFEF and the local precedence ordering is
426426
preserved.
427427

428428
As a general rule, hierarchies such as the previous one should be
429-
avoided, since it is unclear if F should override E or viceversa.
429+
avoided, since it is unclear if F should override E or vice-versa.
430430
Python 2.3 solves the ambiguity by raising an exception in the creation
431431
of class G, effectively stopping the programmer from generating
432432
ambiguous hierarchies. The reason for that is that the C3 algorithm

Doc/library/curses.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,7 @@ the following methods and attributes:
922922

923923
.. method:: window.getbegyx()
924924

925-
Return a tuple ``(y, x)`` of co-ordinates of upper-left corner.
925+
Return a tuple ``(y, x)`` of coordinates of upper-left corner.
926926

927927

928928
.. method:: window.getbkgd()

Doc/library/dataclasses.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,10 @@ Module contents
185185
- *slots*: If true (the default is ``False``), :attr:`~object.__slots__` attribute
186186
will be generated and new class will be returned instead of the original one.
187187
If :attr:`!__slots__` is already defined in the class, then :exc:`TypeError`
188-
is raised.
188+
is raised. Calling no-arg :func:`super` in dataclasses using ``slots=True`` will result in
189+
the following exception being raised:
190+
``TypeError: super(type, obj): obj must be an instance or subtype of type``.
191+
The two-arg :func:`super` is a valid workaround. See :gh:`90562` for full details.
189192

190193
.. versionadded:: 3.10
191194

0 commit comments

Comments
 (0)