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
..
2025-04-09 16:18:54 -07:00
2025-04-09 16:18:54 -07:00
2025-04-09 16:18:54 -07:00
2024-06-12 14:24:46 +01:00
2025-04-07 19:35:17 +03:00
2025-03-31 16:29:23 +03:00
2025-01-23 01:44:43 +01:00
2025-03-17 12:32:43 +01:00
2025-03-27 09:57:06 -04:00
2025-03-17 09:19:04 +00:00
2024-06-04 10:22:22 +00:00
2025-04-09 14:32:21 -07:00
2025-04-03 16:20:01 +01:00
2025-04-04 17:59:36 +01:00
2025-04-09 10:34:12 -07:00
2025-03-19 23:01:32 +01:00
2025-03-28 10:35:20 +00:00
2025-03-26 03:48:19 +00:00
2025-04-02 14:48:47 +03:00
2024-12-23 13:31:33 +01:00
2024-11-12 10:41:51 -07:00
2024-11-11 14:49:41 -07:00
2025-03-20 11:35:23 +00:00
2025-03-17 12:32:43 +01:00
2025-03-19 23:01:32 +01:00
2025-03-19 17:33:24 +01:00
2025-02-24 07:26:04 +08:00
2025-03-20 12:02:05 +05:30
2025-04-09 14:32:21 -07:00
2025-03-20 12:03:20 +01:00
2025-04-01 10:18:42 -07:00
2025-03-17 09:19:04 +00:00
2025-03-24 09:49:39 -04:00
2024-11-22 18:50:30 +00:00
2024-10-29 23:57:59 +00:00
2025-03-26 14:38:47 -04:00
2024-07-22 12:08:27 -04:00
2025-04-01 10:18:42 -07:00
2025-04-09 14:32:21 -07:00
2025-04-08 22:08:00 +03:00
2024-11-12 15:59:19 +02:00
2025-01-11 11:17:35 +02:00
2024-05-18 19:44:40 +00:00
2025-04-01 17:18:11 +02:00
2025-03-19 23:01:32 +01:00
2025-03-17 14:41:05 +00:00
2025-03-02 09:56:49 +00:00
2025-04-09 16:18:54 -07:00
2025-03-13 16:02:58 +00:00
2025-03-26 18:36:04 -04:00
2025-03-17 09:19:04 +00:00
2025-03-21 23:24:14 +01:00
2025-03-21 23:37:49 +00:00
2025-03-24 11:00:32 +01:00
2025-03-14 09:52:15 +00:00
2025-03-17 12:32:43 +01:00
2025-02-18 17:14:11 +00:00
2024-07-22 12:08:27 -04:00
2025-04-01 10:18:42 -07:00
2025-04-01 16:55:05 -07:00
2025-04-09 14:32:21 -07:00
2025-04-09 14:32:21 -07:00
2025-03-20 16:59:41 -07:00
2025-04-01 16:55:05 -07:00
2024-11-11 15:58:46 -07:00
2025-02-20 11:31:15 -05:00
2025-03-17 12:32:43 +01:00
2025-03-20 11:35:23 +00:00
2024-11-07 16:37:41 +01:00
2024-08-30 15:42:27 +00:00
2025-03-28 10:35:20 +00:00
2025-03-21 17:19:47 +00:00
2024-11-01 22:04:31 +00:00
2025-03-17 12:32:43 +01:00
2025-03-19 13:46:17 +00:00
2025-03-19 23:01:32 +01:00
2025-03-19 17:33:24 +01:00
2025-03-17 12:32:43 +01:00
2025-04-06 21:39:25 +01:00
2025-04-08 08:50:51 +00:00
2025-04-04 17:59:36 +01:00
2025-04-09 16:18:54 -07:00
2024-12-03 09:41:53 -05:00
2025-03-17 09:19:04 +00:00
2025-04-04 06:23:35 -07:00
2025-04-09 16:18:54 -07:00
2025-03-31 20:28:35 +01:00
2024-10-13 20:59:41 +05:30
2025-04-04 16:31:37 +02:00
2025-03-17 12:32:43 +01:00
2025-04-04 12:24:41 +00:00
2025-03-22 10:38:47 +01:00
2025-01-17 16:42:27 +01:00
2024-06-04 10:22:22 +00:00