mirror of
https://github.com/python/cpython.git
synced 2026-04-25 21:30:45 +00:00
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> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| __main__.py | ||
| check_config.py | ||
| test_abstract.py | ||
| test_bytearray.py | ||
| test_bytes.py | ||
| test_codecs.py | ||
| test_complex.py | ||
| test_config.py | ||
| test_dict.py | ||
| test_eval.py | ||
| test_eval_code_ex.py | ||
| test_exceptions.py | ||
| test_file.py | ||
| test_float.py | ||
| test_frame.py | ||
| test_function.py | ||
| test_getargs.py | ||
| test_hash.py | ||
| test_immortal.py | ||
| test_import.py | ||
| test_list.py | ||
| test_long.py | ||
| test_mem.py | ||
| test_misc.py | ||
| test_number.py | ||
| test_object.py | ||
| test_opt.py | ||
| test_pyatomic.py | ||
| test_run.py | ||
| test_set.py | ||
| test_structmembers.py | ||
| test_sys.py | ||
| test_time.py | ||
| test_tuple.py | ||
| test_type.py | ||
| test_unicode.py | ||
| test_watchers.py | ||