Fix copy(HasTraits) by copying _trait_values dict#482
Merged
minrk merged 4 commits intoipython:masterfrom Apr 2, 2018
Merged
Conversation
Contributor
Author
|
All test-cases pass, except from Appveyor on Windows (expecting #483 to merge for that). |
Member
|
Makes sense. I'm not sure what to do when cross_validation_lock is held. It does make sense to clear it, but what's the state going to be if a HasTraits is copied in the middle of pending changes? Should the cross-validation be forced to finish as part of the copy? |
ankostis
added a commit
to ankostis/traitlets
that referenced
this pull request
Mar 22, 2018
- As agreed by rmorshea(ipython#481 (comment)) & minrk(ipython#482 (comment)). - Added FIXME remark about pending resolution of what to do in case the lock is held.
Contributor
Author
|
Ok, pinned the
Maybe raise an exception, to fail early? |
Contributor
Author
|
Btw, I have pushed a relevant commit about |
clones have shared `_trait_values` with original.
- As agreed by rmorshea(ipython#481 (comment)) & minrk(ipython#482 (comment)). - Added FIXME remark about pending resolution of what to do in case the lock is held.
Member
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
_cross_validation_lock' lock back toFalse`(asked also in copy(HasTraits) creates a clone with shared state from the original #481).