pyo3/src
Paul Stemmet 338c71d0ad
src/impl_: add ff unsafe-allow-subinterpreters
Allow the subinterpreter safeguards to be disabled, so that applications
like Ceph's manager can continue to use pyo3 modules without soft
crashing.

Enabling this feature should be done with caution, as any storage of Py
objects in rust statics can lead to undefined behavior.

However, not all consumers of pyo3 use global state, and thus a subset
of them (such as python-bcrypt) are safe to use in subinterpreter
contexts.

References: https://github.com/bazaah/aur-ceph/issues/20
References: https://github.com/PyO3/pyo3/pull/2523
References: https://github.com/pyca/cryptography/issues/9016
References: https://github.com/PyO3/pyo3/discussions/2346#discussioncomment-3246505
References: https://github.com/PyO3/pyo3/discussions/2346#discussioncomment-2911159
References: https://github.com/PyO3/pyo3/issues/3451
Signed-off-by: Paul Stemmet <github@luxolus.com>
2024-03-16 16:12:25 +00:00
..
conversions ci: workaround more aggressive nightly rust lints 2024-02-23 11:59:20 +00:00
err unify 3.12 and pre-3.12 exception handling pathways 2023-09-30 23:27:27 +01:00
ffi add as_ptr and into_ptr inherent methods 2023-08-11 10:49:42 +01:00
impl_ src/impl_: add ff unsafe-allow-subinterpreters 2024-03-16 16:12:25 +00:00
inspect docs: require docs on all public APIs 2022-09-07 07:42:23 +01:00
pycell call PyObject_GC_Untrack before deallocating 2023-09-09 22:29:58 +01:00
pyclass ci: workaround more aggressive nightly rust lints 2024-02-23 11:59:20 +00:00
tests ci: updates for Rust 1.76 2024-02-23 11:59:20 +00:00
types ci: workaround more aggressive nightly rust lints 2024-02-23 11:59:20 +00:00
buffer.rs Update clippy 2023-10-06 23:31:06 +02:00
callback.rs add as_ptr and into_ptr inherent methods 2023-08-11 10:49:42 +01:00
conversion.rs Merge pull request #3358 from alex/ptr-unsafe-trait 2023-09-04 05:05:56 +00:00
derive_utils.rs remove copyright headers from source files 2023-06-03 22:38:54 +01:00
exceptions.rs allow invalid_from_utf8 lint in tests 2023-09-23 12:54:53 +01:00
gil.rs add as_ptr and into_ptr inherent methods 2023-08-11 10:49:42 +01:00
impl_.rs better `Some`-wrapping for default arguments 2023-09-21 21:14:44 +01:00
instance.rs fixes #3325 -- mark `AsPyPointer` as `unsafe trait` 2023-08-18 10:16:34 -04:00
internal_tricks.rs support `text_signature` on `#[new]` 2023-05-04 07:15:11 +01:00
lib.rs ci: workaround more aggressive nightly rust lints 2024-02-23 11:59:20 +00:00
macros.rs prefer inner / _private naming 2023-07-04 21:03:24 +01:00
marker.rs Copy note on using check_signals on non-main thread/interpreter from Python docs. 2023-12-29 22:59:45 +00:00
marshal.rs Add more lints 2022-03-23 08:07:28 +01:00
panic.rs safety: abort on uncaught panics 2022-08-14 13:47:46 +01:00
prelude.rs Remove IntoPyPointer 2023-08-14 16:28:20 -04:00
pycell.rs workaround BaseException issue on Python versions before 3.11 2023-09-10 22:16:17 +02:00
pyclass.rs call PyObject_GC_Untrack before deallocating 2023-09-09 22:29:58 +01:00
pyclass_init.rs add as_ptr and into_ptr inherent methods 2023-08-11 10:49:42 +01:00
sync.rs Enable `GILProtected` access via `PyVisit` 2023-12-29 22:52:22 +00:00
test_utils.rs truncate leap seconds on `chrono` to `datetime` conversions 2023-09-24 20:28:43 +01:00
type_object.rs add as_ptr and into_ptr inherent methods 2023-08-11 10:49:42 +01:00
version.rs Add numeric and object protocol examples 2022-02-23 10:09:45 +01:00