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.
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
Replace dynamic uses of on_trait_change with observe part 2 #663
Replace dynamic uses of on_trait_change with observe part 2 #663
Changes from 10 commits
de4f35a
7ee8432
b2dc673
c72be9e
f346414
901a321
dbd19b7
078b521
77d426d
cc3f76c
d64e94f
361fa1d
9fbf726
5dc3f89
d014927
61a06ae
db9a6de
d8f0f13
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BEWARE: extended_name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meaning what, exactly? We can't be sure that
name
won't break when passed toobserve
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, a quick search of the code base for
extended_name
only gives this result here and the corresponding same thing in the wx file. Any downstream users that set this trait may run into problems if the extended name they are passing does not conform to the new mini language, and that is effectively out of our hands ...A similar scenario was encountered in pyface and we mentioned it in the release announcement. I imagine the vast majority of users would not be affected (I dont even know how many users of this code we have in total). Nonetheless, it leaves a door open for potential breaks.
Another thing to worry about here though that I'm not sure what we would want to do for: The traitsUI code for
Editor
contains the code that would theoretically remove this listener (in either thedispose
method or the_update_editor
method itself. I also just realize I made a dumb mistake! The method being observed is_update_editor
notupdate_editor
which is defined in traitsUI. We are still in the process of updating traitsUI to observe, so that method will need its signature changed... I believe we will need that around first, before we can make this change as this code won't work currently. It must be uncovered in the test suite hence we don't see a failure here