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

Fix module init for Python 3.12 #561

Merged
merged 1 commit into from
Oct 5, 2023
Merged

Fix module init for Python 3.12 #561

merged 1 commit into from
Oct 5, 2023

Commits on Oct 5, 2023

  1. Fix module init for Python 3.12

    Python 3.12 changed module init slightly (this may actually be a CPython
    3.12 bug, it's not 100% clear). Before Python 3.12 the module wouldn't
    be available via `PyState_FindModule` until it was fully initialized.
    Now the module is immediately available, but in an invalid state
    leading to segfaults. The workaround is to manually call
    `PyState_AddModule` to ensure the module is always available.
    
    In the long run we should move to using multiphase module init which
    should avoid this problem entirely.
    jcrist committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    727d907 View commit details
    Browse the repository at this point in the history