Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shallow copy another alignment property (#1408282) #530

Merged

Conversation

AdamWill
Copy link
Contributor

Several blivet classes use custom deepcopy methods to avoid
deep copying some parted objects which we know can't be deep
copied. Unfortunately the list of attributes excepted from deep
copying for DiskLabel was missing one parted Alignment object,
and with Python 3.6, we blow up trying to deepcopy that. This
fixes the problem by adding that attribute to the list of ones
we know have to be shallow copied.

Several blivet classes use custom __deepcopy__ methods to avoid
deep copying some parted objects which we know can't be deep
copied. Unfortunately the list of attributes excepted from deep
copying for `DiskLabel` was missing one parted Alignment object,
and with Python 3.6, we blow up trying to deepcopy that. This
fixes the problem by adding that attribute to the list of ones
we know have to be shallow copied.
@AdamWill
Copy link
Contributor Author

AdamWill commented Dec 22, 2016

FWIW I think 93c805d initially introduced this problem, because it changed the set of alignment attributes that DiskLabel instances have, and missed one of them out of the shallow list when updating that. But we didn't immediately notice because Python 3.5 would claim to pickle the disk label alignment; it sounds like it actually didn't do it properly, but apparently we never actually used the unpickled version so we didn't notice the problem.

@vojtechtrefny
Copy link
Member

Jenkins, ok to test.

Copy link
Member

@vojtechtrefny vojtechtrefny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@vojtechtrefny vojtechtrefny merged commit 9af64f0 into storaged-project:2.1-devel Jan 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants