__deepcopy__ works incorrect with recursion

Bug #1602314 reported by Sergey Skripnick
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.versionedobjects
Fix Released
Undecided
Sergey Skripnick

Bug Description

When copying objects with self references, __deepcopy__ does unnecessary actions, like rewriting same properties many times.

Changed in oslo.versionedobjects:
assignee: nobody → Sergey Skripnick (eyerediskin)
affects: oslo.versionedobjects → glance
affects: glance → oslo.versionedobjects
Revision history for this message
Sergey Skripnick (eyerediskin) wrote :
summary: - __deepcopy__ dealing wrong with recursion
+ __deepcopy__ works incorrect with recursion
Revision history for this message
Sergey Skripnick (eyerediskin) wrote :

Deepcopy should remember which objects are already created when going into recursion. There is a 'memo' dict for this purpose:

https://github.com/python/cpython/blob/2d264235f6e066611b412f7c2e1603866e0f7f1b/Lib/copy.py#L236-L241

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/oslo.versionedobjects 1.19.0

This issue was fixed in the openstack/oslo.versionedobjects 1.19.0 release.

Ben Nemec (bnemec)
Changed in oslo.versionedobjects:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.