ENH: avoid thread safety issues around uses of `PySequence_Fast` by ngoldbaum · Pull Request #29394 · numpy/numpy

added 6 commits

July 17, 2025 13:04

@ngoldbaum

seberg

seberg

ngoldbaum

@ngoldbaum

@ngoldbaum @seberg

Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>

This was referenced

Jul 21, 2025

IndifferentArea pushed a commit to IndifferentArea/numpy that referenced this pull request

Dec 7, 2025
…py#29394)

* BUG: prevent mutating multiter arguments while processing them

* MAINT: also add locking for array creation from array-likes

* MAINT: add lock nditer argument with a critical section

* MAINT: give NO_BRACKETS variants a label argument

* MAINT: more critical sections

* MAINT: apply suggestions from Sam

* MAINT: fix linter and GIL-enabled build compilation

* MAINT: simplify error paths

* Update numpy/_core/src/multiarray/iterators.c

Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>

---------

Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>