Replace on_trait_change with observe #732
Labels
difficulty: intermediate
Issues which need some context about the package.
type: refactoring
Issues related to refactoring
The new Traits
observe
framework has a number of advantages and bugfixes compared to the olderon_trait_change
listeners. We should migrate the codebase to use the new framework wherever possible.Because function signatures of observers are different from trait change handlers, we can't make the change in a completely automated way. As a result it is best if we do this in a series of steps to make review easier.
Further, to reduce errors and boilerplate, it makes sense to introduce standard ways to connect and disconnect dynamic observers (for example, via flagging standard metadata).
@on_trait_change
usages to@observe
(about 50 places it is used) (Convert on_trait_change decorators to observe decorators #864)on_trait_change
usages toobserve
(about 200 places it is used)on_trait_change
usages that fit into standard frameworkon_trait_change
usageson_trait_change
usagesThe text was updated successfully, but these errors were encountered: