SIGN IN SIGN UP
python / cpython UNCLAIMED

The Python programming language

0 0 1 Python

gh-125243: Fix ZoneInfo data race in free threading build (#125281)

Lock `ZoneInfoType` to protect accesses to `ZONEINFO_STRONG_CACHE`.
Refactor the `tp_new` handler to use Argument Clinic so that we can just
use `@critical_section` annotations on the relevant functions.

Also use `PyDict_SetDefaultRef` instead of `PyDict_SetDefault` when
inserting into the `TIMEDELTA_CACHE`.
S
Sam Gross committed
f1d33dbddd3496b062e1fbe024fb6d7b023a35f5
Parent: cb8e599
Committed by GitHub <noreply@github.com> on 10/13/2024, 8:17:51 PM