Commit f46c9c4
authored
Expose unsafe wrappers for Py_BEGIN_CRITICAL_SECTION_MUTEX API (#5642)
* WIP: attempt to add with_critical_section_mutex
* WIP: use an UnsafeCell
* finish UnsafeCell rewrite
* finish and tweak docs
* fix limited API builds
* fix deadlocks and abi3 compilation errors
* remove unnecessary comparisons with true
* add two more tests
* add changelog entry
* add missing conditional compilation for new tests
* add missing conditional compilation for new tests
* fix conditional compilation in pyo3::sync
* fix Python 3.13 clippy
* Update newsfragments/5642.added.md
* refactor so to use EnteredCriticalSection struct
* tweak docstrings
* Add SAFETY comments in tests
* fix include guards
* remove unnecessary returns
* fix whitespace formatting
* Move note about minimum Python version
* Fix reference leak by adjusting lifetimes
* Apply suggestions for test tweaks from code review
* refactor into a new module and rewrite docs
* adjust imports to satisfy clippy
* Fix EnteredCriticalSection conditinal compilation
* fix wasm clippy
* add changelog for the moved functions
* actually deprecate the old export
* refer to locking mutexes and acquiring critical sections consistently
* remove unnecessary availability note
* simplify wasm conditional compilation1 parent 6c5d391 commit f46c9c4
File tree
11 files changed
+695
-305
lines changed- newsfragments
- pyo3-ffi/src/cpython
- src
- conversions/std
- sync
- types
11 files changed
+695
-305
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
29 | 37 | | |
30 | 38 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
349 | 351 | | |
350 | 352 | | |
351 | 353 | | |
| |||
0 commit comments