be inserted into the query in the case that the :class:`.Bundle`
construct were used as the selection criteria.
+ .. change:: repr_for_url_reflect
+ :tags: bug, sql
+
+ The engine URL embedded in the exception for "could not reflect"
+ in :meth:`.MetaData.reflect` now conceals the password; also
+ the ``__repr__`` for :class:`.TLEngine` now acts like that of
+ :class:`.Engine`, concealing the URL password. Pull request courtesy
+ Valery Yundin.
+
.. change:: pg_timestamp_zero_prec
:tags: bug, postgresql
self._connections.trans = []
def __repr__(self):
- return 'TLEngine(%s)' % str(self.url)
+ return 'TLEngine(%r)' % self.url
s = schema and (" schema '%s'" % schema) or ''
raise exc.InvalidRequestError(
'Could not reflect: requested table(s) not available '
- 'in %s%s: (%s)' %
- (bind.engine.url, s, ', '.join(missing)))
+ 'in %r%s: (%s)' %
+ (bind.engine, s, ', '.join(missing)))
load = [name for name in only if extend_existing or
name not in current]
self.assert_(set(m3.tables.keys()) == set(['rt_c']))
m4 = MetaData(testing.db)
- try:
- m4.reflect(only=['rt_a', 'rt_f'])
- self.assert_(False)
- except sa.exc.InvalidRequestError as e:
- self.assert_(e.args[0].endswith('(rt_f)'))
+
+ assert_raises_message(
+ sa.exc.InvalidRequestError,
+ r"Could not reflect: requested table\(s\) not available in "
+ r"Engine\(.*?\): \(rt_f\)",
+ m4.reflect, only=['rt_a', 'rt_f']
+ )
m5 = MetaData(testing.db)
m5.reflect(only=[])