From: Mike Bayer Date: Mon, 23 Jan 2012 00:21:51 +0000 (-0500) Subject: - [bug] Fixed large_collection.py to close the X-Git-Tag: rel_0_7_5~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4da470d921931d2384fd0bfe72a9ac5c9b9def9;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - [bug] Fixed large_collection.py to close the session before dropping tables. [ticket:2346] --- diff --git a/CHANGES b/CHANGES index b28618d23d..983aa82d67 100644 --- a/CHANGES +++ b/CHANGES @@ -94,6 +94,9 @@ CHANGES as an event listener, instead of a metaclass + SessionExtension. [ticket:2313] + - [bug] Fixed large_collection.py to close the + session before dropping tables. [ticket:2346] + 0.7.4 ===== - orm diff --git a/examples/large_collection/large_collection.py b/examples/large_collection/large_collection.py index a251861d6f..20c3b52185 100644 --- a/examples/large_collection/large_collection.py +++ b/examples/large_collection/large_collection.py @@ -47,7 +47,7 @@ mapper(Organization, org_table, properties = { mapper(Member, member_table) if __name__ == '__main__': - engine = create_engine("mysql://scott:tiger@localhost/test", echo=True) + engine = create_engine("postgresql://scott:tiger@localhost/test", echo=True) meta.create_all(engine) # expire_on_commit=False means the session contents @@ -89,6 +89,7 @@ if __name__ == '__main__': print "-------------------------\nno Member rows should remain:\n" print sess.query(Member).count() + sess.close() print "------------------------\ndone. dropping tables." meta.drop_all(engine) \ No newline at end of file