Skip to content

Commit 2ae00f9

Browse files
authored
Merge branch 'main' into fix-c_powi-117999
2 parents b88a958 + cd11ff1 commit 2ae00f9

File tree

126 files changed

+2290
-1653
lines changed

Some content is hidden

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

126 files changed

+2290
-1653
lines changed

.github/CODEOWNERS

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,21 @@ Objects/type* @markshannon
2929
Objects/codeobject.c @markshannon
3030
Objects/frameobject.c @markshannon
3131
Objects/call.c @markshannon
32-
Python/ceval*.c @markshannon @gvanrossum
33-
Python/ceval*.h @markshannon @gvanrossum
32+
Python/ceval*.c @markshannon
33+
Python/ceval*.h @markshannon
3434
Python/compile.c @markshannon @iritkatriel
3535
Python/assemble.c @markshannon @iritkatriel
3636
Python/flowgraph.c @markshannon @iritkatriel
3737
Python/ast_opt.c @isidentical
38-
Python/bytecodes.c @markshannon @gvanrossum
39-
Python/optimizer*.c @markshannon @gvanrossum
38+
Python/bytecodes.c @markshannon
39+
Python/optimizer*.c @markshannon
4040
Python/optimizer_analysis.c @Fidget-Spinner
4141
Python/optimizer_bytecodes.c @Fidget-Spinner
42+
Lib/_pyrepl/* @pablogsal @lysnikolaou @ambv
4243
Lib/test/test_patma.py @brandtbucher
4344
Lib/test/test_type_*.py @JelleZijlstra
44-
Lib/test/test_capi/test_misc.py @markshannon @gvanrossum
45+
Lib/test/test_capi/test_misc.py @markshannon
46+
Lib/test/test_pyrepl/* @pablogsal @lysnikolaou @ambv
4547
Tools/c-analyzer/ @ericsnowcurrently
4648

4749
# dbm
@@ -150,7 +152,7 @@ Include/internal/pycore_time.h @pganssle @abalkin
150152
/Lib/test/test_tokenize.py @pablogsal @lysnikolaou
151153

152154
# Code generator
153-
/Tools/cases_generator/ @gvanrossum
155+
/Tools/cases_generator/ @markshannon
154156

155157
# AST
156158
Python/ast.c @isidentical

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/tuple.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,12 @@ Tuple Objects
105105
is being replaced; any reference in the tuple at position *pos* will be
106106
leaked.
107107
108+
.. warning::
109+
110+
This macro should *only* be used on tuples that are newly created.
111+
Using this macro on a tuple that is already in use (or in other words, has
112+
a refcount > 1) could lead to undefined behavior.
113+
108114
109115
.. c:function:: int _PyTuple_Resize(PyObject **p, Py_ssize_t newsize)
110116

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/extending/extending.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@ It is important to call :c:func:`free` at the right time. If a block's address
868868
is forgotten but :c:func:`free` is not called for it, the memory it occupies
869869
cannot be reused until the program terminates. This is called a :dfn:`memory
870870
leak`. On the other hand, if a program calls :c:func:`free` for a block and then
871-
continues to use the block, it creates a conflict with re-use of the block
871+
continues to use the block, it creates a conflict with reuse of the block
872872
through another :c:func:`malloc` call. This is called :dfn:`using freed memory`.
873873
It has the same bad consequences as referencing uninitialized data --- core
874874
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/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
@@ -924,7 +924,7 @@ the following methods and attributes:
924924

925925
.. method:: window.getbegyx()
926926

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

929929

930930
.. method:: window.getbkgd()

Doc/library/ipaddress.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ dictionaries.
504504

505505
4. A two-tuple of an address description and a netmask, where the address
506506
description is either a string, a 32-bits integer, a 4-bytes packed
507-
integer, or an existing IPv4Address object; and the netmask is either
507+
integer, or an existing :class:`IPv4Address` object; and the netmask is either
508508
an integer representing the prefix length (e.g. ``24``) or a string
509509
representing the prefix mask (e.g. ``255.255.255.0``).
510510

@@ -725,7 +725,7 @@ dictionaries.
725725

726726
4. A two-tuple of an address description and a netmask, where the address
727727
description is either a string, a 128-bits integer, a 16-bytes packed
728-
integer, or an existing IPv6Address object; and the netmask is an
728+
integer, or an existing :class:`IPv6Address` object; and the netmask is an
729729
integer representing the prefix length.
730730

731731
An :exc:`AddressValueError` is raised if *address* is not a valid IPv6
@@ -781,7 +781,7 @@ dictionaries.
781781

782782
.. attribute:: is_site_local
783783

784-
These attribute is true for the network as a whole if it is true
784+
This attribute is true for the network as a whole if it is true
785785
for both the network address and the broadcast address.
786786

787787

0 commit comments

Comments
 (0)