Skip to content

Commit ee7ead2

Browse files
Merge branch 'main' of https://github.com/python/cpython into linked-list
2 parents b46bcfe + 52fbcf6 commit ee7ead2

30 files changed

+452
-197
lines changed

Doc/howto/clinic.rst

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,11 @@ The CLI supports the following options:
188188

189189
The directory tree to walk in :option:`--make` mode.
190190

191+
.. option:: --exclude EXCLUDE
192+
193+
A file to exclude in :option:`--make` mode.
194+
This option can be given multiple times.
195+
191196
.. option:: FILE ...
192197

193198
The list of files to process.
@@ -1925,13 +1930,14 @@ Example from :source:`Objects/codeobject.c`::
19251930
Return a copy of the code object with new values for the specified fields.
19261931
[clinic start generated output]*/
19271932

1928-
The generated docstring ends up looking like this::
1933+
The generated docstring ends up looking like this:
19291934

1930-
Doc_STRVAR(code_replace__doc__,
1931-
"replace($self, /, **changes)\n"
1932-
"--\n"
1933-
"\n"
1934-
"Return a copy of the code object with new values for the specified fields.");
1935+
.. code-block:: none
1936+
1937+
replace($self, /, **changes)
1938+
--
1939+
1940+
Return a copy of the code object with new values for the specified fields.
19351941
19361942
19371943
.. _clinic-howto-deprecate-positional:
@@ -1963,7 +1969,7 @@ whenever the *b* parameter is passed positionally,
19631969
and we'll be allowed to make it keyword-only in Python 3.14 at the earliest.
19641970

19651971
We can use Argument Clinic to emit the desired deprecation warnings
1966-
using the ``* [from ...]``` syntax,
1972+
using the ``* [from ...]`` syntax,
19671973
by adding the line ``* [from 3.14]`` right above the *b* parameter::
19681974

19691975
/*[clinic input]
@@ -1995,12 +2001,12 @@ Luckily for us, compiler warnings are now generated:
19952001
.. code-block:: none
19962002
19972003
In file included from Modules/foomodule.c:139:
1998-
Modules/clinic/foomodule.c.h:83:8: warning: Update 'b' in 'myfunc' in 'foomodule.c' to be keyword-only. [-W#warnings]
1999-
# warning "Update 'b' in 'myfunc' in 'foomodule.c' to be keyword-only."
2004+
Modules/clinic/foomodule.c.h:139:8: warning: In 'foomodule.c', update parameter(s) 'a' and 'b' in the clinic input of 'mymod.myfunc' to be keyword-only. [-W#warnings]
2005+
# warning "In 'foomodule.c', update parameter(s) 'a' and 'b' in the clinic input of 'mymod.myfunc' to be keyword-only. [-W#warnings]"
20002006
^
20012007
20022008
We now close the deprecation phase by making *b* keyword-only;
2003-
replace the ``* [from ...]``` line above *b*
2009+
replace the ``* [from ...]`` line above *b*
20042010
with the ``*`` from the line above *c*::
20052011

20062012
/*[clinic input]

Doc/library/functions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1752,7 +1752,7 @@ are always available. They are listed here in alphabetical order.
17521752
The *start* parameter can be specified as a keyword argument.
17531753

17541754
.. versionchanged:: 3.12 Summation of floats switched to an algorithm
1755-
that gives higher accuracy on most builds.
1755+
that gives higher accuracy and better commutativity on most builds.
17561756

17571757

17581758
.. class:: super()

Doc/whatsnew/3.12.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,8 +504,8 @@ Other Language Changes
504504
* :class:`slice` objects are now hashable, allowing them to be used as dict keys and
505505
set items. (Contributed by Will Bradshaw, Furkan Onder, and Raymond Hettinger in :gh:`101264`.)
506506

507-
* :func:`sum` now uses Neumaier summation to improve accuracy when summing
508-
floats or mixed ints and floats.
507+
* :func:`sum` now uses Neumaier summation to improve accuracy and commutativity
508+
when summing floats or mixed ints and floats.
509509
(Contributed by Raymond Hettinger in :gh:`100425`.)
510510

511511
* Exceptions raised in a typeobject's ``__set_name__`` method are no longer

Include/internal/pycore_instruments.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,6 @@ extern int
9090
_Py_call_instrumentation_2args(PyThreadState *tstate, int event,
9191
_PyInterpreterFrame *frame, _Py_CODEUNIT *instr, PyObject *arg0, PyObject *arg1);
9292

93-
extern void
94-
_Py_call_instrumentation_exc0(PyThreadState *tstate, int event,
95-
_PyInterpreterFrame *frame, _Py_CODEUNIT *instr);
96-
9793
extern void
9894
_Py_call_instrumentation_exc2(PyThreadState *tstate, int event,
9995
_PyInterpreterFrame *frame, _Py_CODEUNIT *instr, PyObject *arg0, PyObject *arg1);

Include/internal/pycore_opcode.h

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Include/internal/pycore_opcode_metadata.h

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Include/opcode.h

Lines changed: 52 additions & 51 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Lib/_opcode_metadata.py

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)