cpython/Doc/howto
Neil Schemenauer d687900f98
gh-128384: Use a context variable for warnings.catch_warnings (gh-130010)
Make `warnings.catch_warnings()` use a context variable for holding
the warning filtering state if the `sys.flags.context_aware_warnings`
flag is set to true.  This makes using the context manager thread-safe in
multi-threaded programs.

Add the `sys.flags.thread_inherit_context` flag.  If true, starting a new
thread with `threading.Thread` will use a copy of the context
from the caller of `Thread.start()`.

Both these flags are set to true by default for the free-threaded build
and false for the default build.

Move the Python implementation of warnings.py into _py_warnings.py.

Make _contextvars a builtin module.

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-04-09 16:18:54 -07:00
..
annotations.rst gh-101100: Add a table of class attributes to the "Custom classes" section of the data model docs (#124480) 2024-09-25 19:29:58 +00:00
argparse-optparse.rst gh-126180: Remove getopt and optparse deprecation notices (GH-126227) 2024-12-23 14:17:19 +10:00
argparse.rst gh-126180: Remove getopt and optparse deprecation notices (GH-126227) 2024-12-23 14:17:19 +10:00
clinic.rst GH-107518: Remove the Argument Clinic How-To (#109900) 2023-10-11 14:57:51 +02:00
cporting.rst
curses.rst Docs: add link roles with Sphinx extlinks (#117850) 2024-04-15 21:22:00 +03:00
descriptor.rst gh-101100: Fix sphinx warnings in howto/* (#127084) 2024-11-26 10:17:54 +02:00
enum.rst gh-101100: Fix sphinx warnings in howto/* (#127084) 2024-11-26 10:17:54 +02:00
free-threading-extensions.rst gh-128426: Mention PySequence_Fast in free-threading C API HOWTO (#128428) 2025-01-03 13:10:24 +05:30
free-threading-python.rst gh-128384: Use a context variable for warnings.catch_warnings (gh-130010) 2025-04-09 16:18:54 -07:00
functional.rst Update the documentation howto index page and group docs into 3 logical sections (GH-119366) 2024-06-17 16:37:33 +02:00
gdb_helpers.rst [Docs] GDB howto: Fix block type of a cast example (#127621) 2024-12-05 22:52:58 +02:00
index.rst gh-124370: Add "howto" for free-threaded Python (#124371) 2024-09-25 17:31:53 -04:00
instrumentation.rst gh-123492: Remove unnecessary :func: parentheses (#123493) 2024-08-30 14:34:09 +03:00
ipaddress.rst
isolating-extensions.rst Fix typos in docs, error messages and comments (#122502) 2024-08-01 00:26:09 +00:00
logging-cookbook.rst [doc]: Update logging cookbook to mention domain socket configuration in a recipe. (GH-130348) 2025-02-20 14:09:15 +00:00
logging.rst docs(logging): fix phrasing from "operation on" to "operate on" (#127543) 2024-12-03 12:22:12 +05:30
logging_flow.png gh-121035: Update PNG image for logging flow diagram. (GH-121323) 2024-07-03 12:33:28 +01:00
logging_flow.svg gh-121035: Further improve logging flow diagram with respect to dark/light modes. (GH-121265) 2024-07-02 18:57:34 +01:00
mro.rst Docs: fix typo in Doc/howto/mro.rst (GH-129095) 2025-01-21 10:22:13 +01:00
perf_profiling.rst gh-118518: Minor improvements to perf docs (#130866) 2025-03-10 21:51:21 +00:00
pyporting.rst gh-119779: Fix pyporting howto docs (#119785) 2024-05-30 18:51:22 +03:00
regex.rst gh-110383: Italicize variable name (#111206) 2023-10-23 07:56:36 +00:00
sockets.rst gh-75898: make use of thread more explicit in the "Socket Programming HOWTO" document (#125023) 2024-10-08 17:43:37 +05:30
sorting.rst Sorting techniques edits (#124701) 2024-09-27 17:19:44 -07:00
timerfd.rst Fix typo in Doc/howto/timerfd.rst (GH-118376) 2024-04-29 14:01:03 +03:00
unicode.rst
urllib2.rst gh-118671: Updated dead ActiveState links (#118730) 2024-05-08 01:06:38 -06:00