Ryan Morshead

Results 329 comments of Ryan Morshead

@krey would `hold_trait_notifications` accomplish this? I know the given example is about validation, but I know that `@observe` handlers are also put on hold: https://traitlets.readthedocs.io/en/stable/using_traitlets.html?highlight=hold_trait_notifications#validation

@krey those are definitely problems that should be addressed, however I think a past proposal for a [`mute_trait_notifications`](https://github.com/ipython/traitlets/pull/60) context manager might suite you needs. The version from the proposal is...

This also seems related to https://github.com/ipython/traitlets/issues/389

@ankostis I think you're right about setting `_cross_validation_lock` to `False`. The only way `_cross_validation_lock` would be `True` is if the object were copied inside a `hold_trait_notifications` context, in which case...

@Carreau it looks like Jupyter should bump the [minimum version of `traitlets`](https://github.com/jupyter/notebook/blob/master/setup.py#L119) it depends on (assuming the upgrade does in fact fix this).

@pganssle, would this be better solved by a trait specified in this manner `Encode("utf-8")`?

@pganssle I was imagining it as a new trait. I see your point though, and may be able to implement this shortly.

@pganssle https://github.com/ipython/traitlets/pull/466 proposes an `Instance.cast` method that could be generalized in `TraitType` and used to capture methods decorated with `@cast("my_trait")`.

The closest thing to "future-state" observation is this: ```python checked = 0 class X(HasTraits): a = Int(1) b = Int(10) c = Int(100) @observe("a", "b", "c") def abc_increase(self, change): global...

@jasongrout, as for whether there could be true "future-state" observation or validation? The answer is, "No." That is, unless we're willing to fundamentally change how notifications are held, squashed and...