Skip to content

Commit f25a1c4

Browse files
committed
Merge remote-tracking branch 'upstream/main' into tachyon-subprocesses-atomic
2 parents 2ff40fc + 78a50ee commit f25a1c4

File tree

99 files changed

+19378
-861
lines changed

Some content is hidden

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

99 files changed

+19378
-861
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ Lib/test/certdata/*.pem generated
8888
Lib/test/certdata/*.0 generated
8989
Lib/test/levenshtein_examples.json generated
9090
Lib/test/test_stable_abi_ctypes.py generated
91+
Lib/test/test_zoneinfo/data/*.json generated
9192
Lib/token.py generated
9293
Misc/sbom.spdx.json generated
9394
Objects/typeslots.inc generated

.github/CODEOWNERS

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ Tools/build/generate_global_objects.py @ericsnowcurrently
322322
# Remote Debugging
323323
Python/remote_debug.h @pablogsal
324324
Python/remote_debugging.c @pablogsal
325-
Modules/_remote_debugging_module.c @pablogsal @ambv @1st1
325+
Modules/_remote_debugging/ @pablogsal
326326

327327
# Sub-Interpreters
328328
**/*crossinterp* @ericsnowcurrently
@@ -537,6 +537,11 @@ Lib/pydoc.py @AA-Turner
537537
Lib/pydoc_data/ @AA-Turner
538538
Lib/test/test_pydoc/ @AA-Turner
539539

540+
# Profiling (Sampling)
541+
Doc/library/profiling*.rst @pablogsal
542+
Lib/profiling/ @pablogsal
543+
Lib/test/test_profiling/ @pablogsal
544+
540545
# PyREPL
541546
Lib/_pyrepl/ @pablogsal @lysnikolaou @ambv
542547
Lib/test/test_pyrepl/ @pablogsal @lysnikolaou @ambv

.github/workflows/build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,6 @@ jobs:
706706
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe
707707
with:
708708
allowed-failures: >-
709-
build-ios,
710709
build-windows-msi,
711710
build-ubuntu-ssltests-awslc,
712711
build-ubuntu-ssltests-openssl,

Doc/c-api/extension-modules.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ Legacy single-phase initialization
282282
However, there are no plans to remove support for it.
283283
284284
In single-phase initialization, the old-style
285-
:ref:`initializaton function <extension-pyinit>` (``PyInit_modulename``)
285+
:ref:`initialization function <extension-pyinit>` (``PyInit_modulename``)
286286
should create, populate and return a module object.
287287
This is typically done using :c:func:`PyModule_Create` and functions like
288288
:c:func:`PyModule_AddObjectRef`.

Doc/c-api/module.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ A module's token -- and the *your_token* value to use in the above code -- is:
588588
behave as if it was created from that :c:type:`PyModuleDef`.
589589
In particular, the module state must have matching layout and semantics.
590590
591-
Modules created from :c:type:`PyModuleDef` allways use the address of
591+
Modules created from :c:type:`PyModuleDef` always use the address of
592592
the :c:type:`PyModuleDef` as the token.
593593
This means that :c:macro:`!Py_mod_token` cannot be used in
594594
:c:member:`PyModuleDef.m_slots`.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Pending removal in Python 3.20
99
- :mod:`csv`
1010
- :mod:`!ctypes.macholib`
1111
- :mod:`decimal` (use :data:`decimal.SPEC_VERSION` instead)
12+
- :mod:`http.server`
1213
- :mod:`imaplib`
1314
- :mod:`ipaddress`
1415
- :mod:`json`

Doc/library/argparse.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,27 @@ are set.
645645

646646
.. versionadded:: 3.14
647647

648+
To highlight inline code in your description or epilog text, you can use
649+
backticks::
650+
651+
>>> parser = argparse.ArgumentParser(
652+
... formatter_class=argparse.RawDescriptionHelpFormatter,
653+
... epilog='''Examples:
654+
... `python -m myapp --verbose`
655+
... `python -m myapp --config settings.json`
656+
... ''')
657+
658+
When colors are enabled, the text inside backticks will be displayed in a
659+
distinct color to help examples stand out. When colors are disabled, backticks
660+
are preserved as-is, which is readable in plain text.
661+
662+
.. note::
663+
664+
Backtick markup only applies to description and epilog text. It does not
665+
apply to individual argument ``help`` strings.
666+
667+
.. versionadded:: 3.15
668+
648669

649670
The add_argument() method
650671
-------------------------

Doc/library/functions.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,8 @@ are always available. They are listed here in alphabetical order.
340340
It is needed to unambiguous :ref:`filter <warning-filter>` syntax warnings
341341
by module name.
342342

343-
This function raises :exc:`SyntaxError` if the compiled source is invalid,
344-
and :exc:`ValueError` if the source contains null bytes.
343+
This function raises :exc:`SyntaxError` or :exc:`ValueError` if the compiled
344+
source is invalid.
345345

346346
If you want to parse Python code into its AST representation, see
347347
:func:`ast.parse`.
@@ -606,16 +606,16 @@ are always available. They are listed here in alphabetical order.
606606
This function executes arbitrary code. Calling it with
607607
user-supplied input may lead to security vulnerabilities.
608608

609-
The *expression* argument is parsed and evaluated as a Python expression
609+
The *source* argument is parsed and evaluated as a Python expression
610610
(technically speaking, a condition list) using the *globals* and *locals*
611611
mappings as global and local namespace. If the *globals* dictionary is
612612
present and does not contain a value for the key ``__builtins__``, a
613613
reference to the dictionary of the built-in module :mod:`builtins` is
614-
inserted under that key before *expression* is parsed. That way you can
614+
inserted under that key before *source* is parsed. That way you can
615615
control what builtins are available to the executed code by inserting your
616616
own ``__builtins__`` dictionary into *globals* before passing it to
617617
:func:`eval`. If the *locals* mapping is omitted it defaults to the
618-
*globals* dictionary. If both mappings are omitted, the expression is
618+
*globals* dictionary. If both mappings are omitted, the source is
619619
executed with the *globals* and *locals* in the environment where
620620
:func:`eval` is called. Note, *eval()* will only have access to the
621621
:term:`nested scopes <nested scope>` (non-locals) in the enclosing

Doc/library/http.client.rst

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,12 @@ HTTPConnection Objects
319319
:class:`str` or bytes-like object that is not also a file as the
320320
body representation.
321321

322+
.. note::
323+
324+
Note that you must have read the whole response or call :meth:`close`
325+
if :meth:`getresponse` raised an non-:exc:`ConnectionError` exception
326+
before you can send a new request to the server.
327+
322328
.. versionchanged:: 3.2
323329
*body* can now be an iterable.
324330

@@ -334,16 +340,15 @@ HTTPConnection Objects
334340
Should be called after a request is sent to get the response from the server.
335341
Returns an :class:`HTTPResponse` instance.
336342

337-
.. note::
338-
339-
Note that you must have read the whole response before you can send a new
340-
request to the server.
341-
342343
.. versionchanged:: 3.5
343344
If a :exc:`ConnectionError` or subclass is raised, the
344345
:class:`HTTPConnection` object will be ready to reconnect when
345346
a new request is sent.
346347

348+
Note that this does not apply to :exc:`OSError`\s raised by the underlying
349+
socket. Instead the caller is responsible to call :meth:`close` on the
350+
existing connection.
351+
347352

348353
.. method:: HTTPConnection.set_debuglevel(level)
349354

Doc/library/importlib.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,12 @@ Functions
210210
:exc:`ModuleNotFoundError` is raised when the module being reloaded lacks
211211
a :class:`~importlib.machinery.ModuleSpec`.
212212

213+
.. versionchanged:: next
214+
If *module* is a lazy module that has not yet been materialized (i.e.,
215+
loaded via :class:`importlib.util.LazyLoader` and not yet accessed),
216+
calling :func:`reload` is a no-op and returns the module unchanged.
217+
This prevents the reload from unintentionally triggering the lazy load.
218+
213219
.. warning::
214220
This function is not thread-safe. Calling it from multiple threads can result
215221
in unexpected behavior. It's recommended to use the :class:`threading.Lock`

0 commit comments

Comments
 (0)