refactor: module -> module_ with typedef (#2544)
* WIP: module -> module_ without typedef
* refactor: allow py::module to work again
diff --git a/tests/test_modules.cpp b/tests/test_modules.cpp
index c1475fa..897cf89 100644
--- a/tests/test_modules.cpp
+++ b/tests/test_modules.cpp
@@ -13,6 +13,7 @@
TEST_SUBMODULE(modules, m) {
// test_nested_modules
+ // This is intentionally "py::module" to verify it still can be used in place of "py::module_"
py::module m_sub = m.def_submodule("subsubmodule");
m_sub.def("submodule_func", []() { return "submodule_func()"; });
@@ -50,6 +51,7 @@
.def_readwrite("a1", &B::a1) // def_readonly uses an internal reference return policy by default
.def_readwrite("a2", &B::a2);
+ // This is intentionally "py::module" to verify it still can be used in place of "py::module_"
m.attr("OD") = py::module::import("collections").attr("OrderedDict");
// test_duplicate_registration
@@ -60,7 +62,7 @@
class Dupe3 { };
class DupeException { };
- auto dm = py::module("dummy");
+ auto dm = py::module_("dummy");
auto failures = py::list();
py::class_<Dupe1>(dm, "Dupe1");