We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
py.run
The following code crashes on 3.8:
test_write_unraisable() { #[pyfunction] fn report_unraisable(py: Python<'_>) { use pyo3::exceptions::PyRuntimeError; let err = PyRuntimeError::new_err("foo"); err.write_unraisable(py, None); let err = PyRuntimeError::new_err("bar"); err.write_unraisable(py, Some(py.NotImplemented().as_ref(py))); } Python::with_gil(|py| { let report_unraisable = wrap_pyfunction!(report_unraisable, py).unwrap(); let locals = PyDict::new(py); locals .set_item("report_unraisable", report_unraisable) .unwrap(); let source = r#"if True: import sys captured = [] def report(data): captured.append(list(data)) original_hook = sys.unraisablehook try: sys.unraisablehook = report report_unraisable() assert len(captured) == 2 assert captured[0][0] is RuntimeError assert str(captured[0][1]) == 'foo' assert captured[0][4] is None assert captured[1][0] is RuntimeError assert str(captured[1][1]) == 'bar' assert captured[1][4] is NotImplemented finally: sys.unraisablehook = original_hook "#; py.run(source, Some(locals), None).unwrap(); }); }
(From #2889)
I'm not yet sure what's going on here. Probably worth investigating sometime.
The text was updated successfully, but these errors were encountered:
abi3
__complex__
No longer reproduces on main. Probably was fixed by #3378 (thanks @GoldsteinE!)
main
Sorry, something went wrong.
No branches or pull requests
The following code crashes on 3.8:
(From #2889)
I'm not yet sure what's going on here. Probably worth investigating sometime.
The text was updated successfully, but these errors were encountered: