Skip to content

Commit 01c882f

Browse files
committed
Merge 'origin/main' into gh-135552-wr-clear-later
2 parents 8a553d1 + da79ac9 commit 01c882f

Some content is hidden

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

50 files changed

+447
-97
lines changed

.github/workflows/jit.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
- '**jit**'
66
- 'Python/bytecodes.c'
77
- 'Python/optimizer*.c'
8+
- 'Python/executor_cases.c.h'
9+
- 'Python/optimizer_cases.c.h'
810
- '!Python/perf_jit_trampoline.c'
911
- '!**/*.md'
1012
- '!**/*.ini'
@@ -13,6 +15,8 @@ on:
1315
- '**jit**'
1416
- 'Python/bytecodes.c'
1517
- 'Python/optimizer*.c'
18+
- 'Python/executor_cases.c.h'
19+
- 'Python/optimizer_cases.c.h'
1620
- '!Python/perf_jit_trampoline.c'
1721
- '!**/*.md'
1822
- '!**/*.ini'

Doc/c-api/object.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,13 @@ Object Protocol
197197
in favour of using :c:func:`PyObject_DelAttr`, but there are currently no
198198
plans to remove it.
199199
200+
The function must not be called with ``NULL`` *v* and an an exception set.
201+
This case can arise from forgetting ``NULL`` checks and would delete the
202+
attribute.
203+
204+
.. versionchanged:: next
205+
Must not be called with NULL value if an exception is set.
206+
200207
201208
.. c:function:: int PyObject_SetAttrString(PyObject *o, const char *attr_name, PyObject *v)
202209
@@ -207,6 +214,10 @@ Object Protocol
207214
If *v* is ``NULL``, the attribute is deleted, but this feature is
208215
deprecated in favour of using :c:func:`PyObject_DelAttrString`.
209216
217+
The function must not be called with ``NULL`` *v* and an an exception set.
218+
This case can arise from forgetting ``NULL`` checks and would delete the
219+
attribute.
220+
210221
The number of different attribute names passed to this function
211222
should be kept small, usually by using a statically allocated string
212223
as *attr_name*.
@@ -215,6 +226,10 @@ Object Protocol
215226
For more details, see :c:func:`PyUnicode_InternFromString`, which may be
216227
used internally to create a key object.
217228
229+
.. versionchanged:: next
230+
Must not be called with NULL value if an exception is set.
231+
232+
218233
.. c:function:: int PyObject_GenericSetAttr(PyObject *o, PyObject *name, PyObject *value)
219234
220235
Generic attribute setter and deleter function that is meant

Doc/deprecations/c-api-pending-removal-in-3.15.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
Pending removal in Python 3.15
22
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
33

4-
* The bundled copy of ``libmpdecimal``.
54
* The :c:func:`!PyImport_ImportModuleNoBlock`:
65
Use :c:func:`PyImport_ImportModule` instead.
76
* :c:func:`PyWeakref_GetObject` and :c:func:`PyWeakref_GET_OBJECT`:
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Pending removal in Python 3.16
2+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3+
4+
* The bundled copy of ``libmpdec``.

Doc/howto/functional.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1217,7 +1217,7 @@ flow inside a program. The book uses Scheme for its examples, but many of the
12171217
design approaches described in these chapters are applicable to functional-style
12181218
Python code.
12191219

1220-
https://www.defmacro.org/ramblings/fp.html: A general introduction to functional
1220+
https://defmacro.org/2006/06/19/fp.html: A general introduction to functional
12211221
programming that uses Java examples and has a lengthy historical introduction.
12221222

12231223
https://en.wikipedia.org/wiki/Functional_programming: General Wikipedia entry

Doc/howto/isolating-extensions.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -626,8 +626,7 @@ Open Issues
626626

627627
Several issues around per-module state and heap types are still open.
628628

629-
Discussions about improving the situation are best held on the `capi-sig
630-
mailing list <https://mail.python.org/mailman3/lists/capi-sig.python.org/>`__.
629+
Discussions about improving the situation are best held on the `discuss forum under c-api tag <https://discuss.python.org/c/core-dev/c-api/30>`__.
631630

632631

633632
Per-Class Scope

Doc/installing/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ switch::
188188
Once the Development & Deployment part of PPUG is fleshed out, some of
189189
those sections should be linked from new questions here (most notably,
190190
we should have a question about avoiding depending on PyPI that links to
191-
https://packaging.python.org/en/latest/mirrors/)
191+
https://packaging.python.org/en/latest/guides/index-mirrors-and-caches/)
192192
193193
194194
Common installation issues

Doc/library/unittest.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1131,7 +1131,7 @@ Test cases
11311131
.. versionchanged:: 3.3
11321132
Added the *msg* keyword argument when used as a context manager.
11331133

1134-
.. method:: assertLogs(logger=None, level=None)
1134+
.. method:: assertLogs(logger=None, level=None, formatter=None)
11351135

11361136
A context manager to test that at least one message is logged on
11371137
the *logger* or one of its children, with at least the given
@@ -1146,6 +1146,10 @@ Test cases
11461146
its string equivalent (for example either ``"ERROR"`` or
11471147
:const:`logging.ERROR`). The default is :const:`logging.INFO`.
11481148

1149+
If given, *formatter* should be a :class:`logging.Formatter` object.
1150+
The default is a formatter with format string
1151+
``"%(levelname)s:%(name)s:%(message)s"``
1152+
11491153
The test passes if at least one message emitted inside the ``with``
11501154
block matches the *logger* and *level* conditions, otherwise it fails.
11511155

@@ -1173,6 +1177,9 @@ Test cases
11731177

11741178
.. versionadded:: 3.4
11751179

1180+
.. versionchanged:: next
1181+
Now accepts a *formatter* to control how messages are formatted.
1182+
11761183
.. method:: assertNoLogs(logger=None, level=None)
11771184

11781185
A context manager to test that no messages are logged on

Doc/using/configure.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ Features and minimum versions required to build CPython:
2929

3030
* Tcl/Tk 8.5.12 for the :mod:`tkinter` module.
3131

32+
* `libmpdec <https://www.bytereef.org/mpdecimal/doc/libmpdec/>`_ 2.5.0
33+
for the :mod:`decimal` module.
34+
3235
* Autoconf 2.72 and aclocal 1.16.5 are required to regenerate the
3336
:file:`configure` script.
3437

Doc/whatsnew/3.12.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2233,6 +2233,8 @@ Deprecated
22332233

22342234
.. include:: ../deprecations/c-api-pending-removal-in-3.15.rst
22352235

2236+
.. include:: ../deprecations/c-api-pending-removal-in-3.16.rst
2237+
22362238
.. include:: ../deprecations/c-api-pending-removal-in-future.rst
22372239

22382240
Removed

0 commit comments

Comments
 (0)