Skip to content

Commit 5a1115b

Browse files
committed
Merge 'origin/main' into pythongh-128384-warnings-contextvar
2 parents b880dd1 + ffc2f1d commit 5a1115b

File tree

541 files changed

+29550
-19007
lines changed

Some content is hidden

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

541 files changed

+29550
-19007
lines changed

Doc/c-api/init_config.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,10 @@ Configuration Options
505505
- :c:member:`use_hash_seed <PyConfig.use_hash_seed>`
506506
- ``bool``
507507
- Read-only
508+
* - ``"use_system_logger"``
509+
- :c:member:`use_system_logger <PyConfig.use_system_logger>`
510+
- ``bool``
511+
- Read-only
508512
* - ``"user_site_directory"``
509513
- :c:member:`user_site_directory <PyConfig.user_site_directory>`
510514
- ``bool``
@@ -1927,9 +1931,10 @@ PyConfig
19271931
19281932
Only available on macOS 10.12 and later, and on iOS.
19291933
1930-
Default: ``0`` (don't use system log).
1934+
Default: ``0`` (don't use the system log) on macOS; ``1`` on iOS (use the
1935+
system log).
19311936
1932-
.. versionadded:: 3.13.2
1937+
.. versionadded:: 3.14
19331938
19341939
.. c:member:: int user_site_directory
19351940

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/data/stable_abi.dat

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

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ The following modules have a command-line interface.
1111
* :mod:`code`
1212
* :ref:`compileall <compileall-cli>`
1313
* :mod:`cProfile`: see :ref:`profile <profile-cli>`
14-
* :ref:`difflib <difflib-interface>`
1514
* :ref:`dis <dis-cli>`
16-
* :mod:`doctest`
15+
* :ref:`doctest <doctest-cli>`
1716
* :mod:`!encodings.rot_13`
1817
* :mod:`ensurepip`
1918
* :mod:`filecmp`
@@ -24,9 +23,9 @@ The following modules have a command-line interface.
2423
* :mod:`!idlelib`
2524
* :ref:`inspect <inspect-module-cli>`
2625
* :ref:`json <json-commandline>`
27-
* :mod:`mimetypes`
26+
* :ref:`mimetypes <mimetypes-cli>`
2827
* :mod:`pdb`
29-
* :mod:`pickle`
28+
* :ref:`pickle <pickle-cli>`
3029
* :ref:`pickletools <pickletools-cli>`
3130
* :mod:`platform`
3231
* :mod:`poplib`

Doc/library/concurrent.futures.rst

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,14 @@ Executor Objects
4040
future = executor.submit(pow, 323, 1235)
4141
print(future.result())
4242

43-
.. method:: map(fn, *iterables, timeout=None, chunksize=1)
43+
.. method:: map(fn, *iterables, timeout=None, chunksize=1, buffersize=None)
4444

4545
Similar to :func:`map(fn, *iterables) <map>` except:
4646

47-
* the *iterables* are collected immediately rather than lazily;
47+
* The *iterables* are collected immediately rather than lazily, unless a
48+
*buffersize* is specified to limit the number of submitted tasks whose
49+
results have not yet been yielded. If the buffer is full, iteration over
50+
the *iterables* pauses until a result is yielded from the buffer.
4851

4952
* *fn* is executed asynchronously and several calls to
5053
*fn* may be made concurrently.
@@ -68,7 +71,10 @@ Executor Objects
6871
*chunksize* has no effect.
6972

7073
.. versionchanged:: 3.5
71-
Added the *chunksize* argument.
74+
Added the *chunksize* parameter.
75+
76+
.. versionchanged:: 3.14
77+
Added the *buffersize* parameter.
7278

7379
.. method:: shutdown(wait=True, *, cancel_futures=False)
7480

@@ -425,7 +431,7 @@ to a :class:`ProcessPoolExecutor` will result in deadlock.
425431
After calling this method the caller should no longer submit tasks to the
426432
executor.
427433

428-
.. versionadded:: next
434+
.. versionadded:: 3.14
429435

430436
.. method:: kill_workers()
431437

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

440-
.. versionadded:: next
446+
.. versionadded:: 3.14
441447

442448
.. _processpoolexecutor-example:
443449

Doc/library/contextvars.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Context Variables
112112

113113
assert var.get() == 'default value'
114114

115-
.. versionadded:: next
115+
.. versionadded:: 3.14
116116

117117
Added support for usage as a context manager.
118118

Doc/library/dis.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ details of bytecode instructions as :class:`Instruction` instances:
535535
:class:`dis.Positions` object holding the
536536
start and end locations that are covered by this instruction.
537537

538-
.. data::cache_info
538+
.. data:: cache_info
539539

540540
Information about the cache entries of this instruction, as
541541
triplets of the form ``(name, size, data)``, where the ``name``

Doc/library/doctest.rst

Lines changed: 46 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -177,15 +177,8 @@ prohibit it by passing ``verbose=False``. In either of those cases,
177177
``sys.argv`` is not examined by :func:`testmod` (so passing ``-v`` or not
178178
has no effect).
179179

180-
There is also a command line shortcut for running :func:`testmod`. You can
181-
instruct the Python interpreter to run the doctest module directly from the
182-
standard library and pass the module name(s) on the command line::
183-
184-
python -m doctest -v example.py
185-
186-
This will import :file:`example.py` as a standalone module and run
187-
:func:`testmod` on it. Note that this may not work correctly if the file is
188-
part of a package and imports other submodules from that package.
180+
There is also a command line shortcut for running :func:`testmod`, see section
181+
:ref:`doctest-cli`.
189182

190183
For more information on :func:`testmod`, see section :ref:`doctest-basic-api`.
191184

@@ -248,16 +241,53 @@ Like :func:`testmod`, :func:`testfile`'s verbosity can be set with the
248241
``-v`` command-line switch or with the optional keyword argument
249242
*verbose*.
250243

251-
There is also a command line shortcut for running :func:`testfile`. You can
252-
instruct the Python interpreter to run the doctest module directly from the
253-
standard library and pass the file name(s) on the command line::
244+
There is also a command line shortcut for running :func:`testfile`, see section
245+
:ref:`doctest-cli`.
254246

255-
python -m doctest -v example.txt
247+
For more information on :func:`testfile`, see section :ref:`doctest-basic-api`.
256248

257-
Because the file name does not end with :file:`.py`, :mod:`doctest` infers that
258-
it must be run with :func:`testfile`, not :func:`testmod`.
259249

260-
For more information on :func:`testfile`, see section :ref:`doctest-basic-api`.
250+
.. _doctest-cli:
251+
252+
Command-line Usage
253+
------------------
254+
255+
The :mod:`doctest` module can be invoked as a script from the command line:
256+
257+
.. code-block:: bash
258+
259+
python -m doctest [-v] [-o OPTION] [-f] file [file ...]
260+
261+
.. program:: doctest
262+
263+
.. option:: -v, --verbose
264+
265+
Detailed report of all examples tried is printed to standard output,
266+
along with assorted summaries at the end::
267+
268+
python -m doctest -v example.py
269+
270+
This will import :file:`example.py` as a standalone module and run
271+
:func:`testmod` on it. Note that this may not work correctly if the
272+
file is part of a package and imports other submodules from that package.
273+
274+
If the file name does not end with :file:`.py`, :mod:`!doctest` infers
275+
that it must be run with :func:`testfile` instead::
276+
277+
python -m doctest -v example.txt
278+
279+
.. option:: -o, --option <option>
280+
281+
Option flags control various aspects of doctest's behavior, see section
282+
:ref:`doctest-options`.
283+
284+
.. versionadded:: 3.4
285+
286+
.. option:: -f, --fail-fast
287+
288+
This is shorthand for ``-o FAIL_FAST``.
289+
290+
.. versionadded:: 3.4
261291

262292

263293
.. _doctest-how-it-works:
@@ -540,9 +570,6 @@ Symbolic names for the flags are supplied as module constants, which can be
540570
The names can also be used in :ref:`doctest directives <doctest-directives>`,
541571
and may be passed to the doctest command line interface via the ``-o`` option.
542572

543-
.. versionadded:: 3.4
544-
The ``-o`` command line option.
545-
546573
The first group of options define test semantics, controlling aspects of how
547574
doctest decides whether actual output matches an example's expected output:
548575

@@ -682,11 +709,6 @@ The second group of options controls how test failures are reported:
682709
1. This flag may be useful during debugging, since examples after the first
683710
failure won't even produce debugging output.
684711

685-
The doctest command line accepts the option ``-f`` as a shorthand for ``-o
686-
FAIL_FAST``.
687-
688-
.. versionadded:: 3.4
689-
690712

691713
.. data:: REPORTING_FLAGS
692714

0 commit comments

Comments
 (0)