Skip to content

Commit c9a1342

Browse files
authored
Merge branch 'main' into gh-131263
2 parents 5867c79 + f819900 commit c9a1342

File tree

446 files changed

+27643
-17978
lines changed

Some content is hidden

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

446 files changed

+27643
-17978
lines changed

Doc/c-api/monitoring.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,3 +196,15 @@ would typically correspond to a python function.
196196
.. c:function:: int PyMonitoring_ExitScope(void)
197197
198198
Exit the last scope that was entered with :c:func:`!PyMonitoring_EnterScope`.
199+
200+
201+
.. c:function:: int PY_MONITORING_IS_INSTRUMENTED_EVENT(uint8_t ev)
202+
203+
Return true if the event corresponding to the event ID *ev* is
204+
a :ref:`local event <monitoring-event-local>`.
205+
206+
.. versionadded:: 3.13
207+
208+
.. deprecated:: next
209+
210+
This function is :term:`soft deprecated`.

Doc/c-api/typeobj.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
.. _type-structs:
44

5-
Type Objects
6-
============
5+
Type Object Structures
6+
======================
77

88
Perhaps one of the most important structures of the Python object system is the
99
structure that defines a new type: the :c:type:`PyTypeObject` structure. Type

Doc/c-api/unicode.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1868,7 +1868,7 @@ The following API is deprecated.
18681868
18691869
.. versionadded:: 3.3
18701870
1871-
.. deprecated:: next
1871+
.. deprecated:: 3.14
18721872
This API does nothing since Python 3.12.
18731873
Previously, this could be called to check if
18741874
:c:func:`PyUnicode_READY` is necessary.

Doc/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
'issue_role',
3434
'lexers',
3535
'misc_news',
36-
'pydoc_topics',
3736
'pyspecific',
3837
'sphinx.ext.coverage',
3938
'sphinx.ext.doctest',

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Pending removal in Python 3.15
5757

5858
* :mod:`sysconfig`:
5959

60-
* The ``check_home`` argument of :func:`sysconfig.is_python_build` has been
60+
* The *check_home* argument of :func:`sysconfig.is_python_build` has been
6161
deprecated since Python 3.12.
6262

6363
* :mod:`threading`:

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,6 @@ although there is currently no date scheduled for their removal.
111111
* ``ssl.TLSVersion.TLSv1``
112112
* ``ssl.TLSVersion.TLSv1_1``
113113

114-
* :func:`sysconfig.is_python_build` *check_home* parameter is deprecated and
115-
ignored.
116-
117114
* :mod:`threading` methods:
118115

119116
* :meth:`!threading.Condition.notifyAll`: use :meth:`~threading.Condition.notify_all`.

Doc/glossary.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,10 @@ Glossary
800800
thread removes *key* from *mapping* after the test, but before the lookup.
801801
This issue can be solved with locks or by using the EAFP approach.
802802

803+
lexical analyzer
804+
805+
Formal name for the *tokenizer*; see :term:`token`.
806+
803807
list
804808
A built-in Python :term:`sequence`. Despite its name it is more akin
805809
to an array in other languages than to a linked list since access to
@@ -1291,6 +1295,17 @@ Glossary
12911295
See also :term:`binary file` for a file object able to read and write
12921296
:term:`bytes-like objects <bytes-like object>`.
12931297

1298+
token
1299+
1300+
A small unit of source code, generated by the
1301+
:ref:`lexical analyzer <lexical>` (also called the *tokenizer*).
1302+
Names, numbers, strings, operators,
1303+
newlines and similar are represented by tokens.
1304+
1305+
The :mod:`tokenize` module exposes Python's lexical analyzer.
1306+
The :mod:`token` module contains information on the various types
1307+
of tokens.
1308+
12941309
triple-quoted string
12951310
A string which is bound by three instances of either a quotation mark
12961311
(") or an apostrophe ('). While they don't provide any functionality

Doc/library/bdb.rst

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ The :mod:`bdb` module also defines two classes:
118118

119119
Count of the number of times a :class:`Breakpoint` has been hit.
120120

121-
.. class:: Bdb(skip=None)
121+
.. class:: Bdb(skip=None, backend='settrace')
122122

123123
The :class:`Bdb` class acts as a generic Python debugger base class.
124124

@@ -132,9 +132,22 @@ The :mod:`bdb` module also defines two classes:
132132
frame is considered to originate in a certain module is determined
133133
by the ``__name__`` in the frame globals.
134134

135+
The *backend* argument specifies the backend to use for :class:`Bdb`. It
136+
can be either ``'settrace'`` or ``'monitoring'``. ``'settrace'`` uses
137+
:func:`sys.settrace` which has the best backward compatibility. The
138+
``'monitoring'`` backend uses the new :mod:`sys.monitoring` that was
139+
introduced in Python 3.12, which can be much more efficient because it
140+
can disable unused events. We are trying to keep the exact interfaces
141+
for both backends, but there are some differences. The debugger developers
142+
are encouraged to use the ``'monitoring'`` backend to achieve better
143+
performance.
144+
135145
.. versionchanged:: 3.1
136146
Added the *skip* parameter.
137147

148+
.. versionchanged:: 3.14
149+
Added the *backend* parameter.
150+
138151
The following methods of :class:`Bdb` normally don't need to be overridden.
139152

140153
.. method:: canonic(filename)
@@ -146,6 +159,20 @@ The :mod:`bdb` module also defines two classes:
146159
<os.path.abspath>`. A *filename* with angle brackets, such as ``"<stdin>"``
147160
generated in interactive mode, is returned unchanged.
148161

162+
.. method:: start_trace(self)
163+
164+
Start tracing. For ``'settrace'`` backend, this method is equivalent to
165+
``sys.settrace(self.trace_dispatch)``
166+
167+
.. versionadded:: 3.14
168+
169+
.. method:: stop_trace(self)
170+
171+
Stop tracing. For ``'settrace'`` backend, this method is equivalent to
172+
``sys.settrace(None)``
173+
174+
.. versionadded:: 3.14
175+
149176
.. method:: reset()
150177

151178
Set the :attr:`!botframe`, :attr:`!stopframe`, :attr:`!returnframe` and
@@ -364,6 +391,28 @@ The :mod:`bdb` module also defines two classes:
364391
Return all breakpoints that are set.
365392

366393

394+
Derived classes and clients can call the following methods to disable and
395+
restart events to achieve better performance. These methods only work
396+
when using the ``'monitoring'`` backend.
397+
398+
.. method:: disable_current_event()
399+
400+
Disable the current event until the next time :func:`restart_events` is
401+
called. This is helpful when the debugger is not interested in the current
402+
line.
403+
404+
.. versionadded:: 3.14
405+
406+
.. method:: restart_events()
407+
408+
Restart all the disabled events. This function is automatically called in
409+
``dispatch_*`` methods after ``user_*`` methods are called. If the
410+
``dispatch_*`` methods are not overridden, the disabled events will be
411+
restarted after each user interaction.
412+
413+
.. versionadded:: 3.14
414+
415+
367416
Derived classes and clients can call the following methods to get a data
368417
structure representing a stack trace.
369418

Doc/library/cmdline.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The following modules have a command-line interface.
1212
* :ref:`compileall <compileall-cli>`
1313
* :mod:`cProfile`: see :ref:`profile <profile-cli>`
1414
* :ref:`dis <dis-cli>`
15-
* :mod:`doctest`
15+
* :ref:`doctest <doctest-cli>`
1616
* :mod:`!encodings.rot_13`
1717
* :mod:`ensurepip`
1818
* :mod:`filecmp`
@@ -25,7 +25,7 @@ The following modules have a command-line interface.
2525
* :ref:`json <json-commandline>`
2626
* :ref:`mimetypes <mimetypes-cli>`
2727
* :mod:`pdb`
28-
* :mod:`pickle`
28+
* :ref:`pickle <pickle-cli>`
2929
* :ref:`pickletools <pickletools-cli>`
3030
* :mod:`platform`
3131
* :mod:`poplib`

Doc/library/concurrent.futures.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Executor Objects
7373
.. versionchanged:: 3.5
7474
Added the *chunksize* parameter.
7575

76-
.. versionchanged:: next
76+
.. versionchanged:: 3.14
7777
Added the *buffersize* parameter.
7878

7979
.. method:: shutdown(wait=True, *, cancel_futures=False)
@@ -431,7 +431,7 @@ to a :class:`ProcessPoolExecutor` will result in deadlock.
431431
After calling this method the caller should no longer submit tasks to the
432432
executor.
433433

434-
.. versionadded:: next
434+
.. versionadded:: 3.14
435435

436436
.. method:: kill_workers()
437437

@@ -443,7 +443,7 @@ to a :class:`ProcessPoolExecutor` will result in deadlock.
443443
After calling this method the caller should no longer submit tasks to the
444444
executor.
445445

446-
.. versionadded:: next
446+
.. versionadded:: 3.14
447447

448448
.. _processpoolexecutor-example:
449449

0 commit comments

Comments
 (0)