mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
feat: deprecate public constructors of module_ class (#2552)
* Deprecated public constructors of module * Turn documentation comment of module_::add_object into valid doxygen documentation * Move definition of PYBIND11_DETAIL_MODULE_STATIC_DEF and PYBIND11_DETAIL_MODULE_CREATE macros up * Move detail::create_top_level_module to module_::create_extension_module, and unify Python 2 and 3 signature again * Throw error_already_set if module creation fails in module_::create_extension_module * Mention module_::create_extension_module in deprecation warning message of module_::module_
This commit is contained in:
@@ -62,7 +62,8 @@ TEST_SUBMODULE(modules, m) {
|
||||
class Dupe3 { };
|
||||
class DupeException { };
|
||||
|
||||
auto dm = py::module_("dummy");
|
||||
// Go ahead and leak, until we have a non-leaking py::module_ constructor
|
||||
auto dm = py::module_::create_extension_module("dummy", nullptr, new py::module_::module_def);
|
||||
auto failures = py::list();
|
||||
|
||||
py::class_<Dupe1>(dm, "Dupe1");
|
||||
|
||||
Reference in New Issue
Block a user