Commit 9a039df
committed
Fix potential deadlock in make_iterator_impl for Python 3.13t
Refactor pycritical_section into a unified class with internal version
checks instead of using a type alias fallback. Skip locking in
make_iterator_impl for Python < 3.14.0rc1 to avoid deadlock during
type registration, as pycritical_section cannot release the mutex
during Python callbacks without PyCriticalSection_BeginMutex.1 parent 89b2879 commit 9a039df
2 files changed
+19
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
234 | 233 | | |
235 | | - | |
236 | 234 | | |
237 | 235 | | |
238 | 236 | | |
| |||
241 | 239 | | |
242 | 240 | | |
243 | 241 | | |
244 | | - | |
245 | | - | |
246 | 242 | | |
247 | 243 | | |
| 244 | + | |
248 | 245 | | |
| 246 | + | |
249 | 247 | | |
250 | 248 | | |
251 | 249 | | |
| 250 | + | |
| 251 | + | |
252 | 252 | | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
253 | 264 | | |
254 | | - | |
255 | 265 | | |
256 | 266 | | |
257 | 267 | | |
258 | 268 | | |
259 | 269 | | |
260 | 270 | | |
261 | 271 | | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | 272 | | |
266 | 273 | | |
267 | 274 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3173 | 3173 | | |
3174 | 3174 | | |
3175 | 3175 | | |
| 3176 | + | |
| 3177 | + | |
| 3178 | + | |
3176 | 3179 | | |
| 3180 | + | |
3177 | 3181 | | |
3178 | 3182 | | |
3179 | 3183 | | |
| |||
0 commit comments