Skip to content

Commit f0d74ab

Browse files
authored
Merge branch 'main' into fix-issue-111442
2 parents b59930f + 718d234 commit f0d74ab

Some content is hidden

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

60 files changed

+782
-314
lines changed

.editorconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
root = true
22

3-
[*.{py,c,cpp,h,js,rst,md,yml}]
3+
[*.{py,c,cpp,h,js,rst,md,yml,yaml}]
44
trim_trailing_whitespace = true
55
insert_final_newline = true
66
indent_style = space
@@ -11,5 +11,5 @@ indent_size = 4
1111
[*.rst]
1212
indent_size = 3
1313

14-
[*.{js,yml}]
14+
[*.{js,yml,yaml}]
1515
indent_size = 2

Doc/c-api/gcsupport.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ the garbage collector.
277277
278278
Type of the visitor function to be passed to :c:func:`PyUnstable_GC_VisitObjects`.
279279
*arg* is the same as the *arg* passed to ``PyUnstable_GC_VisitObjects``.
280-
Return ``0`` to continue iteration, return ``1`` to stop iteration. Other return
280+
Return ``1`` to continue iteration, return ``0`` to stop iteration. Other return
281281
values are reserved for now so behavior on returning anything else is undefined.
282282
283283
.. versionadded:: 3.12

Doc/deprecations/pending-removal-in-3.16.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ Pending removal in Python 3.16
3232
* :class:`asyncio.WindowsProactorEventLoopPolicy`
3333
* :func:`asyncio.get_event_loop_policy`
3434
* :func:`asyncio.set_event_loop_policy`
35-
* :func:`asyncio.set_event_loop`
3635

3736
Users should use :func:`asyncio.run` or :class:`asyncio.Runner` with
3837
*loop_factory* to use the desired event loop implementation.

Doc/howto/logging-cookbook.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,19 @@ which, when run, will produce:
626626
of each message with the handler's level, and only passes a message to a
627627
handler if it's appropriate to do so.
628628

629+
.. versionchanged:: next
630+
The :class:`QueueListener` can be started (and stopped) via the
631+
:keyword:`with` statement. For example:
632+
633+
.. code-block:: python
634+
635+
with QueueListener(que, handler) as listener:
636+
# The queue listener automatically starts
637+
# when the 'with' block is entered.
638+
pass
639+
# The queue listener automatically stops once
640+
# the 'with' block is exited.
641+
629642
.. _network-logging:
630643

631644
Sending and receiving logging events across a network

Doc/library/asyncio-eventloop.rst

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,14 @@ an event loop:
6565
.. note::
6666

6767
The :mod:`!asyncio` policy system is deprecated and will be removed
68-
in Python 3.16; from there on, this function will always return the
69-
running event loop.
70-
68+
in Python 3.16; from there on, this function will return the current
69+
running event loop if present else it will return the
70+
loop set by :func:`set_event_loop`.
7171

7272
.. function:: set_event_loop(loop)
7373

7474
Set *loop* as the current event loop for the current OS thread.
7575

76-
.. deprecated:: 3.14
77-
The :func:`set_event_loop` function is deprecated and will be removed
78-
in Python 3.16.
79-
8076
.. function:: new_event_loop()
8177

8278
Create and return a new event loop object.

Doc/library/codecs.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,7 @@ particular, the following variants typically exist:
11071107
+-----------------+--------------------------------+--------------------------------+
11081108
| cp852 | 852, IBM852 | Central and Eastern Europe |
11091109
+-----------------+--------------------------------+--------------------------------+
1110-
| cp855 | 855, IBM855 | Bulgarian, Byelorussian, |
1110+
| cp855 | 855, IBM855 | Belarusian, Bulgarian, |
11111111
| | | Macedonian, Russian, Serbian |
11121112
+-----------------+--------------------------------+--------------------------------+
11131113
| cp856 | | Hebrew |
@@ -1155,7 +1155,7 @@ particular, the following variants typically exist:
11551155
+-----------------+--------------------------------+--------------------------------+
11561156
| cp1250 | windows-1250 | Central and Eastern Europe |
11571157
+-----------------+--------------------------------+--------------------------------+
1158-
| cp1251 | windows-1251 | Bulgarian, Byelorussian, |
1158+
| cp1251 | windows-1251 | Belarusian, Bulgarian, |
11591159
| | | Macedonian, Russian, Serbian |
11601160
+-----------------+--------------------------------+--------------------------------+
11611161
| cp1252 | windows-1252 | Western Europe |
@@ -1220,7 +1220,7 @@ particular, the following variants typically exist:
12201220
+-----------------+--------------------------------+--------------------------------+
12211221
| iso8859_4 | iso-8859-4, latin4, L4 | Baltic languages |
12221222
+-----------------+--------------------------------+--------------------------------+
1223-
| iso8859_5 | iso-8859-5, cyrillic | Bulgarian, Byelorussian, |
1223+
| iso8859_5 | iso-8859-5, cyrillic | Belarusian, Bulgarian, |
12241224
| | | Macedonian, Russian, Serbian |
12251225
+-----------------+--------------------------------+--------------------------------+
12261226
| iso8859_6 | iso-8859-6, arabic | Arabic |
@@ -1257,7 +1257,7 @@ particular, the following variants typically exist:
12571257
| | | |
12581258
| | | .. versionadded:: 3.5 |
12591259
+-----------------+--------------------------------+--------------------------------+
1260-
| mac_cyrillic | maccyrillic | Bulgarian, Byelorussian, |
1260+
| mac_cyrillic | maccyrillic | Belarusian, Bulgarian, |
12611261
| | | Macedonian, Russian, Serbian |
12621262
+-----------------+--------------------------------+--------------------------------+
12631263
| mac_greek | macgreek | Greek |

Doc/library/logging.handlers.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,6 +1148,13 @@ possible, while any potentially slow operations (such as sending an email via
11481148
.. versionchanged:: 3.5
11491149
The ``respect_handler_level`` argument was added.
11501150

1151+
.. versionchanged:: next
1152+
:class:`QueueListener` can now be used as a context manager via
1153+
:keyword:`with`. When entering the context, the listener is started. When
1154+
exiting the context, the listener is stopped.
1155+
:meth:`~contextmanager.__enter__` returns the
1156+
:class:`QueueListener` object.
1157+
11511158
.. method:: dequeue(block)
11521159

11531160
Dequeues a record and return it, optionally blocking.

Doc/library/socket.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,10 @@ created. Socket addresses are represented as follows:
164164

165165
- :const:`BTPROTO_SCO` accepts ``bdaddr`` where ``bdaddr`` is a
166166
:class:`bytes` object containing the Bluetooth address in a
167-
string format. (ex. ``b'12:23:34:45:56:67'``) This protocol is not
168-
supported under FreeBSD.
167+
string format. (ex. ``b'12:23:34:45:56:67'``)
168+
169+
.. versionchanged:: next
170+
FreeBSD support added.
169171

170172
- :const:`AF_ALG` is a Linux-only socket based interface to Kernel
171173
cryptography. An algorithm socket is configured with a tuple of two to four

Doc/whatsnew/3.14.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,14 @@ linecache
812812
(Contributed by Tian Gao in :gh:`131638`.)
813813

814814

815+
logging.handlers
816+
----------------
817+
818+
* :class:`logging.handlers.QueueListener` now implements the context
819+
manager protocol, allowing it to be used in a :keyword:`with` statement.
820+
(Contributed by Charles Machalow in :gh:`132106`.)
821+
822+
815823
mimetypes
816824
---------
817825

@@ -1078,13 +1086,22 @@ sys.monitoring
10781086
* Two new events are added: :monitoring-event:`BRANCH_LEFT` and
10791087
:monitoring-event:`BRANCH_RIGHT`. The ``BRANCH`` event is deprecated.
10801088

1089+
1090+
sysconfig
1091+
---------
1092+
1093+
* Add ``ABIFLAGS`` key to :func:`sysconfig.get_config_vars` on Windows.
1094+
(Contributed by Xuehai Pan in :gh:`131799`.)
1095+
1096+
10811097
threading
10821098
---------
10831099

10841100
* :meth:`threading.Thread.start` now sets the operating system thread name
10851101
to :attr:`threading.Thread.name`.
10861102
(Contributed by Victor Stinner in :gh:`59705`.)
10871103

1104+
10881105
tkinter
10891106
-------
10901107

Include/cpython/warnings.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,9 @@ PyAPI_FUNC(int) PyErr_WarnExplicitFormat(
1818

1919
// DEPRECATED: Use PyErr_WarnEx() instead.
2020
#define PyErr_Warn(category, msg) PyErr_WarnEx((category), (msg), 1)
21+
22+
int _PyErr_WarnExplicitObjectWithContext(
23+
PyObject *category,
24+
PyObject *message,
25+
PyObject *filename,
26+
int lineno);

0 commit comments

Comments
 (0)