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