boto/boto — pull request #2764 by kyleknap (2014-11-17 19:33:20+00:00)
Title: Fix bug that prevented initializing a dynamo item from existing item

Switching from Boto 2.27 to 2.34 breaks the ability to create an Item by passing another directly into the ‘data’ field.

In 2.27 you can do (where item is dynamodb2.items.Item, and history_table is a separate table):
history_item = Item(history_table, data=item)
history_item.save()

But with 2.33 you get an exception during save() -> mark_clean() -> copy.deepcopy(). An exception here would make it seem like the save was unsuccessful, but it actually does save to the database.

To maintain backwards compatability and clear confusion on DB state by the exceptions that get raised, here is a fix.

cc @danielgtaylor @jamesls