Column.copy and TypeDecorator bug in 1.1 beta

Issue #3584 resolved
Yegor Roganov created an issue

As per https://bitbucket.org/zzzeek/sqlalchemy/commits/ed535649d423 TypeDecorator inherits from SchemaEventTarget, thus this statement

        if isinstance(type_, SchemaEventTarget):
            type_ = type_.copy(**kw)

in Column.copy raises TypeError: copy() got an unexpected keyword argument 'schema' since TypeDecorator.copy doesn't accept any params.

Part of the stacktrace:

  File "alembic/env.py", line 24, in merge_metadata
    t.tometadata(base_metadata)
  File "env/lib/python3.4/site-packages/sqlalchemy/sql/schema.py", line 814, in tometadata
    args.append(c.copy(schema=schema))
  File "env/lib/python3.4/site-packages/sqlalchemy/sql/schema.py", line 1330, in copy
    type_ = type_.copy(**kw)
TypeError: copy() got an unexpected keyword argument 'schema'

Comments (2)

  1. Log in to comment