.. changelog::
:version: 0.8.1
+ .. change::
+ :tags: feature, sql
+
+ Loosened the check on dialect-specific argument names
+ passed to Table(); since we want to support external dialects
+ and also want to support args without a certain dialect
+ being installed, it only checks the format of the arg now,
+ rather than looking for that dialect in sqlalchemy.dialects.
+
.. change::
:tags: bug, sql
def _validate_dialect_kwargs(kwargs, name):
# validate remaining kwargs that they all specify DB prefixes
- if len([k for k in kwargs
- if not re.match(
- r'^(?:%s)_' %
- '|'.join(dialects.__all__), k
- )
- ]):
- raise TypeError(
- "Invalid argument(s) for %s: %r" % (name, kwargs.keys()))
+
+ for k in kwargs:
+ m = re.match('^(.+?)_.*', k)
+ if m is None:
+ raise TypeError("Additional arguments should be "
+ "named <dialectname>_<argument>, got '%s'" % k)
+
inspection._self_inspects(SchemaItem)