Hi all,
I'm updating an app from SA 1.3 to 1.4 and getting a SADeprecationWarning:
The Column.copy() method is deprecated and will be removed in a
future release. (deprecated since: 1.4)
The code triggering the warning is based on the versioned_history example:
https://docs.sqlalchemy.org/en/14/_modules/examples/versioned_history/history_meta.html
...and here's the offending function:
def _col_copy(col):
orig = col
col = col.copy()
orig.info["history_copy"] = col
col.unique = False
col.default = col.server_default = None
col.autoincrement = False
return col
For the moment I've switched to calling the private _copy() method
instead, but is there any recommendation of a better approach?
(I did see the issue at
https://github.com/sqlalchemy/sqlalchemy/issues/5953 and understand
why the copy() method was deprecated)
Thanks a lot,
Simon