From: Mike Bayer Date: Mon, 3 May 2010 23:32:34 +0000 (-0400) Subject: merge tip X-Git-Tag: rel_0_6_1~29 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=41d2e24c4ab6cf58f922c8c1c0eb7a6ac593168e;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git merge tip --- 41d2e24c4ab6cf58f922c8c1c0eb7a6ac593168e diff --cc CHANGES index 5bbc0bb815,0bc7275b96..9bd3095101 --- a/CHANGES +++ b/CHANGES @@@ -26,9 -33,12 +33,15 @@@ CHANGE be used. This will impact decimal accuracy and some unicode handling issues. [ticket:1775] + - Fixed use_ansi=False mode, which was producing broken + WHERE clauses in pretty much all cases. [ticket:1790] + + - oracle_xe 5 doesn't accept a Python unicode object in + its connect string in normal Python 2.x mode - so we coerce + to str() directly. non-ascii characters aren't supported + in connect strings here since we don't know what encoding + we could use. [ticket:1670] + - firebird - Added a label to the query used within has_table() and has_sequence() to work with older versions of Firebird diff --cc test/engine/test_reconnect.py index 6afd715155,117ef05eea..dddc445ac6 --- a/test/engine/test_reconnect.py +++ b/test/engine/test_reconnect.py @@@ -54,8 -54,8 +54,9 @@@ class MockReconnectTest(TestBase) global db, dbapi dbapi = MockDBAPI() -- # create engine using our current dburi -- db = tsa.create_engine('postgresql://foo:bar@localhost/test', module=dbapi, _initialize=False) ++ db = tsa.create_engine( ++ 'postgresql://foo:bar@localhost/test', ++ module=dbapi, _initialize=False) # monkeypatch disconnect checker db.dialect.is_disconnect = lambda e: isinstance(e, MockDisconnect) @@@ -177,6 -177,34 +178,38 @@@ assert not conn.invalidated assert len(dbapi.connections) == 1 + class CursorErrTest(TestBase): + + def setup(self): + global db, dbapi + + class MDBAPI(MockDBAPI): + def connect(self, *args, **kwargs): + return MConn(self) + + class MConn(MockConnection): + def cursor(self): + return MCursor(self) + + class MCursor(MockCursor): + def close(self): + raise Exception("explode") + + dbapi = MDBAPI() + - # create engine using our current dburi - db = tsa.create_engine('postgresql://foo:bar@localhost/test', module=dbapi, _initialize=False) ++ db = tsa.create_engine( ++ 'postgresql://foo:bar@localhost/test', ++ module=dbapi, _initialize=False) + + def test_cursor_explode(self): + conn = db.connect() + result = conn.execute("select foo") + result.close() + conn.close() ++ ++ def teardown(self): ++ db.dispose() + engine = None class RealReconnectTest(TestBase): def setup(self):