gh-128384: Add locking to warnings.py. (gh-128386)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
This commit is contained in:
Neil Schemenauer 2025-01-14 11:43:42 -08:00 committed by GitHub
parent d906bde250
commit 1c13c56a34
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 237 additions and 128 deletions

View file

@ -14,7 +14,7 @@ struct _warnings_runtime_state {
PyObject *filters; /* List */
PyObject *once_registry; /* Dict */
PyObject *default_action; /* String */
PyMutex mutex;
_PyRecursiveMutex lock;
long filters_version;
};