Use copy.deepcopy for copying dicts

Bug #1503851 reported by Winson Chan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mistral
Fix Released
Undecided
Winson Chan

Bug Description

copy.copy only copies reference and so if the object has dict or nested dicts, these instances can be modified by code that has reference to the original dict.

Changed in mistral:
assignee: nobody → Winson Chan (winson-c-chan)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to mistral (master)

Fix proposed to branch: master
Review: https://review.openstack.org/232180

Changed in mistral:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mistral (master)

Reviewed: https://review.openstack.org/232180
Committed: https://git.openstack.org/cgit/openstack/mistral/commit/?id=55540e116e7c76088c0772894df9bbe15672fd20
Submitter: Jenkins
Branch: master

commit 55540e116e7c76088c0772894df9bbe15672fd20
Author: Winson Chan <email address hidden>
Date: Wed Oct 7 19:55:31 2015 +0000

    Replace copy.copy with copy.deepcopy

    The function copy.copy only copies reference and so if the object has dict
    or nested dicts, these instances can be modified by code that has reference
    to the original dict.

    Change-Id: Ib2680f09b5a5d45fd7180e95ab5fedef05664c5b
    Closes-Bug: #1503851

Changed in mistral:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to mistral (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/233976

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mistral (stable/liberty)

Reviewed: https://review.openstack.org/233976
Committed: https://git.openstack.org/cgit/openstack/mistral/commit/?id=631abddd8d8c70a74e298a4e3d906ae8ed8945d8
Submitter: Jenkins
Branch: stable/liberty

commit 631abddd8d8c70a74e298a4e3d906ae8ed8945d8
Author: Winson Chan <email address hidden>
Date: Wed Oct 7 19:55:31 2015 +0000

    Replace copy.copy with copy.deepcopy

    The function copy.copy only copies reference and so if the object has dict
    or nested dicts, these instances can be modified by code that has reference
    to the original dict.

    Change-Id: Ib2680f09b5a5d45fd7180e95ab5fedef05664c5b
    Closes-Bug: #1503851
    (cherry picked from commit 55540e116e7c76088c0772894df9bbe15672fd20)

tags: added: in-stable-liberty
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/mistral 2.0.0.0b1

This issue was fixed in the openstack/mistral 2.0.0.0b1 development milestone.

Changed in mistral:
status: Fix Committed → 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.