fix: test_factory_constructors.py failure triggered by test_register_duplicate_class (#2564)

* Demonstrate test_factory_constructors.py failure without functional changes from #2335

* Revert "Demonstrate test_factory_constructors.py failure without functional changes from #2335"

This reverts commit ca33a8021fc2a3617c3356b188796528f4594419.

* Fix test crash where registered Python type gets garbage collected

* Clean up some more internal structures when class objects go out of scope

* Reduce length of std::erase_if-in-C++20 comment

* Clean up code for cleaning up type internals

* Move cleaning up of type info in internals to tp_dealloc on pybind11_metaclass
This commit is contained in:
Yannick Jadoul
2020-10-16 22:38:51 +02:00
committed by GitHub
parent c50f90eca6
commit 6364b732e9
2 changed files with 40 additions and 1 deletions

View File

@@ -434,7 +434,6 @@ def test_base_and_derived_nested_scope():
assert m.DerivedWithNested.Nested.get_name() == "DerivedWithNested::Nested"
@pytest.mark.skip("See https://github.com/pybind/pybind11/pull/2564")
def test_register_duplicate_class():
import types