Skip to content

Instantly share code, notes, and snippets.

View ngoldbaum's full-sized avatar

Nathan Goldbaum ngoldbaum

View GitHub Profile
Checking cryptography-rust v0.1.0 (/Users/goldbaum/Documents/cryptography/src/rust)
warning: use of deprecated trait `pyo3::ToPyObject`: `ToPyObject` is going to be replaced by `IntoPyObject`. See the migration guide (https://pyo3.rs/v0.23/migration) for more information.
--> src/rust/src/asn1.rs:9:11
|
9 | use pyo3::ToPyObject;
| ^^^^^^^^^^
|
= note: `#[warn(deprecated)]` on by default
warning: use of deprecated type alias `pyo3::types::PyLong`: use `PyInt` instead
diff --git a/pyo3-build-config/src/impl_.rs b/pyo3-build-config/src/impl_.rs
index a473f888..e57204f2 100644
--- a/pyo3-build-config/src/impl_.rs
+++ b/pyo3-build-config/src/impl_.rs
@@ -386,13 +386,7 @@ print("gil_disabled", get_config_var("Py_GIL_DISABLED"))
};
let lib_dir = get_key!(sysconfigdata, "LIBDIR").ok().map(str::to_string);
let gil_disabled = match sysconfigdata.get_value("Py_GIL_DISABLED") {
- Some(value) => {
- if value == "1" {
Fatal Python error: PyInterpreterState_Get: the function must be called with the GIL held, after Python initialization and before Python finalization, but the GIL is released (the current Python thread state is NULL)
Python runtime state: unknown
diff --git a/pyo3-macros-backend/src/pyclass.rs b/pyo3-macros-backend/src/pyclass.rs
index 96bfbb9e..ae3082e3 100644
--- a/pyo3-macros-backend/src/pyclass.rs
+++ b/pyo3-macros-backend/src/pyclass.rs
@@ -2317,7 +2317,7 @@ impl<'a> PyClassImplsBuilder<'a> {
cls.span() =>
const _: () = {
use #pyo3_path::impl_::pyclass::*;
- assert_pyclass_sync::<#cls, { IsSync::<#cls>::VALUE }>();
+ assert_pyclass_sync::<#cls>();
pub fn with_critical_section<F, R>(object: &Bound<'_, PyAny>, f: F) -> R
where
F: FnOnce() -> R,
{
#[cfg(Py_GIL_DISABLED)]
{
struct Guard(crate::ffi::PyCriticalSection);
impl Drop for Guard {
fn drop(&mut self) {
This file has been truncated, but you can view the full file.
thread #1, name = 'main', queue = 'com.apple.main-thread'
frame #0: 0x0000000193b60d88 libsystem_kernel.dylib`semaphore_timedwait_trap + 8
frame #1: 0x00000001939f1a00 libdispatch.dylib`_dispatch_sema4_timedwait + 64
frame #2: 0x00000001939f1ffc libdispatch.dylib`_dispatch_semaphore_wait_slow + 76
frame #3: 0x000000010030417c pyo3-97f8571082c6d82b`std::thread::park_timeout::h3094a03c38ba3b52 [inlined] std::sys::sync::thread_parking::darwin::Parker::park_timeout::h96aa039ec5b0172e at darwin.rs:95:23 [opt]
frame #4: 0x0000000100304128 pyo3-97f8571082c6d82b`std::thread::park_timeout::h3094a03c38ba3b52 at mod.rs:1193:9 [opt]
frame #5: 0x000000010026dee0 pyo3-97f8571082c6d82b`std::sync::mpmc::list::Channel$LT$T$GT$::recv::_$u7b$$u7b$closure$u7d$$u7d$::hc33f0b5eb0ca8722 [inlined] std::sync::mpmc::context::Context::wait_until::hcdc22f8b88ad8315 at context.rs:130:21 [opt]
frame #6: 0x000000010026de98 pyo3-97f8571082c6d82b`std::sync::mpmc::list::Channel$LT$T$GT$::recv::_$u7b$$u7b$closure$
#0 0x0000743573005f62 in _Py_qbsr_goal_reached (qsbr=0x0, goal=23) at ./Include/internal/pycore_qsbr.h:103
#1 0x0000743573006350 in _Py_qsbr_poll (qsbr=0x0, goal=23) at Python/qsbr.c:165
#2 0x0000743572e1d24f in process_queue (head=0x7435733aa518 <_PyRuntime+214488>, qsbr=0x0, keep_empty=false) at Objects/obmalloc.c:1188
#3 0x0000743572e1d390 in process_interp_queue (queue=0x7435733aa510 <_PyRuntime+214480>, qsbr=0x0) at Objects/obmalloc.c:1218
#4 0x0000743572e1d43c in _PyMem_ProcessDelayed (tstate=0x74355c0443c0) at Objects/obmalloc.c:1237
#5 0x0000743572f9cc45 in process_delayed_frees (interp=0x7435733955c0 <_PyRuntime+128640>) at Python/gc_free_threading.c:351
#6 0x0000743572f9ea1c in gc_collect_internal (interp=0x7435733955c0 <_PyRuntime+128640>, state=0x7434f25f0740, generation=0) at Python/gc_free_threading.c:1109
#7 0x0000743572f9ee39 in gc_collect_main (tstate=0x7434bc008620, generation=0, reason=_Py_GC_REASON_HEAP) at Python/gc_free_threading.c:1225
#8 0x0000743572f9fce6 in _Py_RunGC (tstate
#[test]
fn test_pymutex_blocks() {
let mutex = OnceLock::<PyMutex<()>>::new();
let first_thread_locked_once = OnceLock::<bool>::new();
let second_thread_locked_once = OnceLock::<bool>::new();
let finished = OnceLock::<bool>::new();
let (sender, receiver) = sync_channel::<bool>(0);
mutex.get_or_init(|| PyMutex::new(()));
import pytest
import warnings
import threading
def raise_warning():
warnings.warn(RuntimeWarning())
def test_pytest_warns():
This file has been truncated, but you can view the full file.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by python configure 3.14, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ ./configure --prefix=/Users/goldbaum/.pyenv/versions/3.13-dev --enable-shared --libdir=/Users/goldbaum/.pyenv/versions/3.13-dev/lib --with-openssl=/opt/homebrew/opt/openssl@3 --with-dsymutil --disable-gil
## --------- ##
## Platform. ##