Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.13] gh-125243: Fix ZoneInfo data race in free threading build (GH-125281) #125414

Merged
merged 1 commit into from
Oct 15, 2024

Commits on Oct 13, 2024

  1. pythongh-125243: Fix ZoneInfo data race in free threading build (pyth…

    …onGH-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`.
    (cherry picked from commit f1d33db)
    
    Co-authored-by: Sam Gross <[email protected]>
    colesbury authored and miss-islington committed Oct 13, 2024
    Configuration menu
    Copy the full SHA
    a9c2581 View commit details
    Browse the repository at this point in the history