diff --git a/robotpy_build/include/robotpy_build.h b/robotpy_build/include/robotpy_build.h index b585fb96..0efd2cfb 100644 --- a/robotpy_build/include/robotpy_build.h +++ b/robotpy_build/include/robotpy_build.h @@ -14,11 +14,6 @@ namespace rpygen { struct EmptyTrampolineCfg {}; }; -// robotpy-build specific extensions waiting for inclusion into pybind11 -namespace rpybuild_ext { -using py::raise_from; -} // namespace rpybuild_ext - #define RPYBUILD_BAD_TRAMPOLINE \ "has an abstract trampoline -- and they must never be abstract! One of " \ "the generated override methods doesn't match the original class or its " \ diff --git a/tests/cpp/rpytest/ft/__init__.py b/tests/cpp/rpytest/ft/__init__.py index a1c25b0d..2851c37c 100644 --- a/tests/cpp/rpytest/ft/__init__.py +++ b/tests/cpp/rpytest/ft/__init__.py @@ -114,8 +114,6 @@ fnSimpleDefaultParam, get123, important_retval, - raise_from, - raise_from_already_set, subpkg, ) @@ -232,8 +230,6 @@ "fnSimpleDefaultParam", "get123", "important_retval", - "raise_from", - "raise_from_already_set", "subpkg", ] diff --git a/tests/cpp/rpytest/ft/src/ft.cpp b/tests/cpp/rpytest/ft/src/ft.cpp index 94c0d113..c16827fb 100644 --- a/tests/cpp/rpytest/ft/src/ft.cpp +++ b/tests/cpp/rpytest/ft/src/ft.cpp @@ -4,20 +4,4 @@ RPYBUILD_PYBIND11_MODULE(m) { initWrapper(m); - - m.def("raise_from", []() { - PyErr_SetString(PyExc_ValueError, "inner"); - rpybuild_ext::raise_from(PyExc_ValueError, "outer"); - throw py::error_already_set(); - }); - - m.def("raise_from_already_set", []() { - try { - PyErr_SetString(PyExc_ValueError, "inner"); - throw py::error_already_set(); - } catch (py::error_already_set& e) { - rpybuild_ext::raise_from(e, PyExc_ValueError, "outer"); - throw py::error_already_set(); - } - }); } \ No newline at end of file diff --git a/tests/test_ft_misc.py b/tests/test_ft_misc.py index 77193eff..5daf9f7d 100644 --- a/tests/test_ft_misc.py +++ b/tests/test_ft_misc.py @@ -2,25 +2,6 @@ import pytest import re -# -# main module -# - - -def test_raise_from(): - with pytest.raises(ValueError) as excinfo: - ft.raise_from() - assert str(excinfo.value) == "outer" - assert str(excinfo.value.__cause__) == "inner" - - -def test_raise_from_already_set(): - with pytest.raises(ValueError) as excinfo: - ft.raise_from_already_set() - assert str(excinfo.value) == "outer" - assert str(excinfo.value.__cause__) == "inner" - - # # abstract.h #