summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/plugin
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2021-01-14 18:07:14 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2021-01-15 00:29:12 -0500
commit44034f19ac27ccd4a0e57dfa3d2d6b494dc9b133 (patch)
tree9837f4818d8e345fc36fe99cd888825832a6b98e /lib/sqlalchemy/testing/plugin
parent41ca37734aa4f293ac5fb63c239d78185c8ec983 (diff)
downloadsqlalchemy-44034f19ac27ccd4a0e57dfa3d2d6b494dc9b133.tar.gz
Create explicit GC ordering between ConnectionFairy/ConnectionRecord
Fixed issue where connection pool would not return connections to the pool or otherwise be finalized upon garbage collection under pypy if the checked out connection fell out of scope without being closed. This is a long standing issue due to pypy's difference in GC behavior that does not call weakref finalizers if they are relative to another object that is also being garbage collected. A strong reference to the related record is now maintained so that the weakref has a strong-referenced "base" to trigger off of. Fixes: #5842 Change-Id: Id5448fdacb6cceaac1ea40b2fbc851f052ed8e86
Diffstat (limited to 'lib/sqlalchemy/testing/plugin')
-rw-r--r--lib/sqlalchemy/testing/plugin/plugin_base.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/sqlalchemy/testing/plugin/plugin_base.py b/lib/sqlalchemy/testing/plugin/plugin_base.py
index 7851fbb3e..858814f91 100644
--- a/lib/sqlalchemy/testing/plugin/plugin_base.py
+++ b/lib/sqlalchemy/testing/plugin/plugin_base.py
@@ -586,6 +586,7 @@ def stop_test_class(cls):
def stop_test_class_outside_fixtures(cls):
+ engines.testing_reaper.stop_test_class_outside_fixtures()
provision.stop_test_class_outside_fixtures(config, config.db, cls)
try:
if not options.low_connections: