copy_field only makes a shallow copy of tagged values dictionary
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lazr.restful |
New
|
Undecided
|
Unassigned |
Bug Description
An idiom I use from time to time in Launchpad is something like this in an interface, with _api_get_path being a property in the corresponding model:
git_path = TextLine(
"The path of the Git branch containing a snap/snapcraft.
_api_git_path = exported(
TextLine(
It would be nice to be able to write the second assignment as something like this instead:
_api_git_path = exported(
Unfortunately this fails in confusing ways because copy_field only makes a shallow copy of the field's Element.
If possible, I think copy_attribute (and hence copy_field) should do a deep copy rather than a shallow copy, but it's possible that that might break other things. Failing that, it should at least arrange for there to be separate Element.