Commit d57d270
Fix a crash that happens during shutdown due to looking up modules in the cache
The crash happens only since Python 3.13. Conveniently, Python 3.13 introduces a function to check if the interpreter is shutting down at the moment.
There was a related issue #22067 and related commit 87de6f7
but it appears that the fix was incomplete. What actually causes a crash during shutdown is using `PyState_FindModule`, and `PyUpb_ModuleState_MaybeGet` still calls that anyway.
PiperOrigin-RevId: 8073613811 parent badaf41 commit d57d270
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
61 | 67 | | |
62 | 68 | | |
63 | 69 | | |
| |||
0 commit comments