In some circumstances, ephemeral class objects that are created within
the scope of a test method don't seem to be garbage collected directly
on exit. Filter out classes created outside of the sqlalchemy package.
Fixes: #7450
Signed-off-by: Nils Philippsen <nils@tiptoe.de>
or "inherit_cache" not in cls.__dict__
)
and not issubclass(cls, (Annotated))
+ and cls.__module__.startswith("sqlalchemy.")
and "orm" not in cls.__module__
and "compiler" not in cls.__module__
and "crud" not in cls.__module__