cpython/Doc/using
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
..
android.rst gh-131531: Add `android.py package` command (#131532) 2025-04-01 08:46:29 +08:00
cmdline.rst gh-128384: Use a context variable for warnings.catch_warnings (gh-130010) 2025-04-09 16:18:54 -07:00
configure.rst Python 3.14.0a7 2025-04-08 14:20:51 +03:00
editors.rst gh-59149: Setup documentation for IDLE on Linux and add section in Editors (#130003) 2025-02-12 03:16:56 -05:00
index.rst gh-116622: Complete Android documentation (#124259) 2024-09-23 23:09:53 +00:00
ios.rst gh-130940: Modify default behavior of `PyConfig.use_system_logger` to enable on iOS (#131172) 2025-03-13 14:28:49 +08:00
mac.rst gh-124720: Update "Using Python on a Mac" document (#124721) 2024-09-30 07:39:46 +08:00
mac_installer_01_introduction.png gh-124720: Update "Using Python on a Mac" document (#124721) 2024-09-30 07:39:46 +08:00
mac_installer_02_readme.png gh-124720: Update "Using Python on a Mac" document (#124721) 2024-09-30 07:39:46 +08:00
mac_installer_03_license.png gh-124720: Update "Using Python on a Mac" document (#124721) 2024-09-30 07:39:46 +08:00
mac_installer_04_installation_type.png gh-124720: Update "Using Python on a Mac" document (#124721) 2024-09-30 07:39:46 +08:00
mac_installer_05_custom_install.png gh-124720: Update "Using Python on a Mac" document (#124721) 2024-09-30 07:39:46 +08:00
mac_installer_06_summary.png gh-124720: Update "Using Python on a Mac" document (#124721) 2024-09-30 07:39:46 +08:00
mac_installer_07_applications.png gh-124720: Update "Using Python on a Mac" document (#124721) 2024-09-30 07:39:46 +08:00
mac_installer_08_install_certificates.png gh-124720: Update "Using Python on a Mac" document (#124721) 2024-09-30 07:39:46 +08:00
mac_installer_09_custom_install_free_threaded.png gh-124720: Update "Using Python on a Mac" document (#124721) 2024-09-30 07:39:46 +08:00
unix.rst Docs: fix shell command formatting (#131310) 2025-03-19 09:42:47 +02:00
win_install_freethreaded.png gh-112984 Update Windows build and installer for free-threaded builds (GH-113129) 2024-01-17 21:52:23 +00:00
win_installer.png Optimize images by IMGbot (GH-21348) 2022-02-04 15:49:43 +09:00
windows.rst Update documentation links to Microsoft's documentation pages (GH-126379) 2024-11-11 17:10:49 +00:00