Mike Bayer  committed 3bf6064

- small fix to BoundMetaData to accept unicode or string URLs

  • Participants
  • Parent commits 14a92b4
  • Branches default

Comments (0)

Files changed (3)

   - fixed argument passing to straight textual execute() on engine, connection.
   can handle *args or a list instance for positional, **kwargs or a dict instance
   for named args, or a list of list or dicts to invoke executemany()
+  - small fix to BoundMetaData to accept unicode or string URLs
 - orm:
   - another refactoring to relationship calculation.  Allows more accurate ORM behavior
   with relationships from/to/between mappers, particularly polymorphic mappers,

File lib/sqlalchemy/engine/

     the given string is parsed according to the rfc1738 spec.
     if an existing URL object is passed, just returns the object."""
-    if isinstance(name_or_url, str) or isinstance(name_or_url, unicode):
+    if isinstance(name_or_url, basestring):
         return _parse_rfc1738_args(name_or_url)
         return name_or_url

File lib/sqlalchemy/

     """builds upon MetaData to provide the capability to bind to an Engine implementation."""
     def __init__(self, engine_or_url, name=None, **kwargs):
         super(BoundMetaData, self).__init__(name, **kwargs)
-        if isinstance(engine_or_url, str):
+        if isinstance(engine_or_url, basestring):
             self._engine = sqlalchemy.create_engine(engine_or_url, **kwargs)
             self._engine = engine_or_url