From a9c87816ce8c6abfbb913c382e70a89caae4ec69 Mon Sep 17 00:00:00 2001 From: Ian Bell <ian.bell@nist.gov> Date: Wed, 19 Oct 2022 12:31:11 -0400 Subject: [PATCH] Slightly more helpful deprecation warning --- interface/pybind11_wrapper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/pybind11_wrapper.cpp b/interface/pybind11_wrapper.cpp index 10f5541..61e0d08 100644 --- a/interface/pybind11_wrapper.cpp +++ b/interface/pybind11_wrapper.cpp @@ -49,7 +49,7 @@ inline auto call_method_factory(py::module &m, const std::string& attribute) { auto f = [attribute](const py::object& model, const py::args& args, const py::kwargs& kwargs) { std::string warning_string = ("Calling the top-level function " + attribute + " is deprecated" + - " and much slower than calling the same-named method on the model instance"); + " and much slower than calling the same-named method of the model instance"); PyErr_WarnEx(PyExc_DeprecationWarning, warning_string.c_str(), 1); return model.attr(attribute.c_str())(*args, **kwargs); }; -- GitLab