[rhinstaller/blivet/pulls/165 master] Master format copy

mulkieran installerbot-noreply at redhat.com
Wed Jun 24 19:46:22 UTC 2015


The tasks objects are somewhat special, because they refer back to their FS object. So, there could be some reason for treating them especially.

In favor of using deepcopy everywhere:
Doing so may correct some subtle logical bugs in our code having nothing to do with tasks.
It avoids implementing a ```__copy__``` method, which may itself be buggy.

Against using deepcopy everywhere:
It is expensive and probably a bit buggy itself.
We may find that we have to implement a version of ```__deepcopy__``` and then use variable_copy(), like in some of the Device classes. This would happen if traversal reaches some kind of object that can  not itself be deepcopied.

I think it is a difficult call. But the conservative approach is to try using deepcopy everywhere, knowing that the other approach is a viable alternative. This way, no new code is added to solve the problem.

The first two patches are probably worth considering separately. They discard a bunch of boilerplate which I think has been revealed as quite pointless.
-- 
To view this pull request on github, visit https://github.com/rhinstaller/blivet/pull/165


More information about the anaconda-patches mailing list