and return values as Python UUID() objects rather than
strings. Currently, the UUID type is only known to
work with psycopg2. [ticket:1956]
-
+
+ - Fixed bug whereby KeyError would occur with non-ENUM
+ supported PG versions after a pool dispose+recreate
+ would occur, [ticket:1989]
+
- mysql
- Fixed error handling for Jython + zxjdbc, such that
has_table() property works again. Regression from
self.supports_native_enum = self.server_version_info >= (8, 3)
if not self.supports_native_enum:
self.colspecs = self.colspecs.copy()
- del self.colspecs[ENUM]
+ # pop base Enum type
+ self.colspecs.pop(sqltypes.Enum, None)
+ # psycopg2, others may have placed ENUM here as well
+ self.colspecs.pop(ENUM, None)
def on_connect(self):
if self.isolation_level is not None:
metadata.drop_all()
assert not testing.db.dialect.has_type(testing.db,
'fourfivesixtype')
+
+ def test_no_support(self):
+ def server_version_info(self):
+ return (8, 2)
+
+ e = engines.testing_engine()
+ dialect = e.dialect
+ dialect._get_server_version_info = server_version_info
+
+ assert dialect.supports_native_enum
+ e.connect()
+ assert not dialect.supports_native_enum
+
+ # initialize is called again on new pool
+ e.dispose()
+ e.connect()
+ assert not dialect.supports_native_enum
+
def test_reflection(self):
metadata = MetaData(testing.db)