]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- document / work around that dialect_options isn't necessarily there
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 5 Dec 2014 17:18:11 +0000 (12:18 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 5 Dec 2014 17:18:11 +0000 (12:18 -0500)
lib/sqlalchemy/engine/reflection.py
lib/sqlalchemy/testing/suite/test_reflection.py

index ebc96f5ddf2b7f315b675d9f04812b20754548fa..25f084c15701e31c1a57ec5e318fd6e329ce95fa 100644 (file)
@@ -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`.
index e58b6f068d19deff53b3307d35e0134c0f3c6e01..3edbdeb8c0816b0c8fd714cd9eb8b580c1b7669f 100644 (file)
@@ -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