Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make
PyDict
iterator compatible with free-threaded build (#4439)
* Iterate over dict items in `DictIterator` * Use python instead of C API to get dict items * Use plain dict iterator when not on free-threaded & not a subclass * Copy dict on free-threaded builds to prevent concurrent modifications * Add test for dict subclass iters * Implement `PyDict::locked_for_each` * Lock `BoundDictIterator::next` on each iteration * Implement locked `fold` & `try_fold` * Implement `all`,`any`,`find`,`find_map`,`position` when not on nightly * Add changelog * Use critical section wrapper * Make `dict::locked_for_each` available on all builds * Remove item() iter * Add tests for `PyDict::iter()` reducers * Add more docs to locked_for_each * Move iter implementation into inner struct
- Loading branch information