Skip to content

Commit 7fbb890

Browse files
Merge branch 'main' into tachyon-file-does-not-exist
2 parents 8137747 + ff52e90 commit 7fbb890

Some content is hidden

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

49 files changed

+1189
-455
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

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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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/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`

Doc/library/typing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2869,8 +2869,8 @@ ABCs and Protocols for working with I/O
28692869
---------------------------------------
28702870

28712871
.. class:: IO[AnyStr]
2872-
TextIO[AnyStr]
2873-
BinaryIO[AnyStr]
2872+
TextIO
2873+
BinaryIO
28742874

28752875
Generic class ``IO[AnyStr]`` and its subclasses ``TextIO(IO[str])``
28762876
and ``BinaryIO(IO[bytes])``

Doc/whatsnew/3.15.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,10 @@ argparse
423423
default to ``True``. This enables suggestions for mistyped arguments by default.
424424
(Contributed by Jakob Schluse in :gh:`140450`.)
425425

426+
* Added backtick markup support in description and epilog text to highlight
427+
inline code when color output is enabled.
428+
(Contributed by Savannah Ostrowski in :gh:`142390`.)
429+
426430
calendar
427431
--------
428432

@@ -1022,6 +1026,7 @@ New deprecations
10221026
- :mod:`csv`
10231027
- :mod:`!ctypes.macholib`
10241028
- :mod:`decimal` (use :data:`decimal.SPEC_VERSION` instead)
1029+
- :mod:`http.server`
10251030
- :mod:`imaplib`
10261031
- :mod:`ipaddress`
10271032
- :mod:`json`

Include/internal/pycore_opcode_metadata.h

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

Include/internal/pycore_pyatomic_ft_wrappers.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ extern "C" {
5757
_Py_atomic_store_uintptr_release(&value, new_value)
5858
#define FT_ATOMIC_STORE_SSIZE_RELAXED(value, new_value) \
5959
_Py_atomic_store_ssize_relaxed(&value, new_value)
60+
#define FT_ATOMIC_STORE_SSIZE_RELEASE(value, new_value) \
61+
_Py_atomic_store_ssize_release(&value, new_value)
6062
#define FT_ATOMIC_STORE_UINT8_RELAXED(value, new_value) \
6163
_Py_atomic_store_uint8_relaxed(&value, new_value)
6264
#define FT_ATOMIC_STORE_UINT16_RELAXED(value, new_value) \
@@ -140,6 +142,7 @@ extern "C" {
140142
#define FT_ATOMIC_STORE_PTR_RELEASE(value, new_value) value = new_value
141143
#define FT_ATOMIC_STORE_UINTPTR_RELEASE(value, new_value) value = new_value
142144
#define FT_ATOMIC_STORE_SSIZE_RELAXED(value, new_value) value = new_value
145+
#define FT_ATOMIC_STORE_SSIZE_RELEASE(value, new_value) value = new_value
143146
#define FT_ATOMIC_STORE_UINT8_RELAXED(value, new_value) value = new_value
144147
#define FT_ATOMIC_STORE_UINT16_RELAXED(value, new_value) value = new_value
145148
#define FT_ATOMIC_STORE_UINT32_RELAXED(value, new_value) value = new_value

0 commit comments

Comments
 (0)