Provides access to Python deprecation utilities from C++.
For example usages, please see deprecation_example/cc_module_py.cc
.
#include <memory>
#include <optional>
#include <string>
#include <utility>
#include "drake/bindings/pydrake/common/wrap_function.h"
#include "drake/bindings/pydrake/pydrake_pybind.h"
Namespaces | |
drake | |
drake::pydrake | |
For more high-level information, see the Python Bindings technical notes. | |
Functions | |
void | DeprecateAttribute (py::object cls, py::str name, py::str message, std::optional< std::string > date={}) |
Deprecates an attribute name of a class cls . More... | |
void | WarnDeprecated (const std::string &message, std::optional< std::string > date={}) |
Raises a deprecation warning. More... | |
template<typename Func > | |
auto | WrapDeprecated (std::string message, Func &&func) |
Wraps any callable (function pointer, method pointer, lambda, etc.) to emit a deprecation message. More... | |
template<typename Class , typename... Args> | |
auto | py_init_deprecated (std::string message) |
Deprecated wrapping of py::init<> . More... | |
template<typename Func > | |
auto | py_init_deprecated (std::string message, Func &&func) |
Deprecated wrapping of py::init(factory) . More... | |
template<typename Class > | |
auto | DeprecatedParamInit (std::string message) |
The deprecated flavor of ParamInit<>. More... | |