From: Mike Bayer Date: Fri, 5 Dec 2014 17:18:11 +0000 (-0500) Subject: - document / work around that dialect_options isn't necessarily there X-Git-Tag: rel_1_0_0b1~189^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d204e61f63756f2bbd3322377a283fc995e562ec;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - document / work around that dialect_options isn't necessarily there --- diff --git a/lib/sqlalchemy/engine/reflection.py b/lib/sqlalchemy/engine/reflection.py index ebc96f5ddf..25f084c157 100644 --- a/lib/sqlalchemy/engine/reflection.py +++ b/lib/sqlalchemy/engine/reflection.py @@ -395,7 +395,10 @@ class Inspector(object): boolean dialect_options - dict of dialect-specific index options + dict of dialect-specific index options. May not be present + for all dialects. + + .. versionadded:: 1.0.0 :param table_name: string name of the table. For special quoting, use :class:`.quoted_name`. diff --git a/lib/sqlalchemy/testing/suite/test_reflection.py b/lib/sqlalchemy/testing/suite/test_reflection.py index e58b6f068d..3edbdeb8c0 100644 --- a/lib/sqlalchemy/testing/suite/test_reflection.py +++ b/lib/sqlalchemy/testing/suite/test_reflection.py @@ -515,6 +515,8 @@ class ComponentReflectionTest(fixtures.TablesTest): def test_get_temp_table_indexes(self): insp = inspect(self.metadata.bind) indexes = insp.get_indexes('user_tmp') + for ind in indexes: + ind.pop('dialect_options', None) eq_( # TODO: we need to add better filtering for indexes/uq constraints # that are doubled up