Skip to content

disable cross-validation of defaults#434

Merged
minrk merged 1 commit intoipython:masterfrom
minrk:no-validate-defaults
Aug 9, 2017
Merged

disable cross-validation of defaults#434
minrk merged 1 commit intoipython:masterfrom
minrk:no-validate-defaults

Conversation

@minrk
Copy link
Member

@minrk minrk commented Aug 8, 2017

it causes loads of problems with nontrivial validation/observer combinations, including prematurely validating unused values and infinite recursion.

Given that validation of default values should only have an effect when those default values are initially invalid, there seems to be little benefit to introducing the complexity of validating defaults that may not be used.

With this change, ipywidgets tests pass again.

Closes #363
closes #435

#435 is an attempt to fix the problems without removing cross-validation of defaults. I think it's probably better to not cross-validate defaults, but it does get reported as a bug (#428), so we might give it a try.

@rmorshea
Copy link
Contributor

rmorshea commented Aug 8, 2017

As mentioned in other threads, I agree that the cross-validation of defaults creates too many issues downstream for it to be a worthwhile feature (though it could be done in a backwards compatible way with @default). Given that, I had also felt that it might be simpler from a user's perspective to have non-validated defaults (i.e. no validation phase for defaults). However that may be too large a change to condone. Certainly for now, a simple reversion is probably the way to go.

@minrk
Copy link
Member Author

minrk commented Aug 9, 2017

@rmorshea thanks!

@minrk minrk merged commit 32ca2b6 into ipython:master Aug 9, 2017
@minrk minrk deleted the no-validate-defaults branch August 9, 2017 10:49
@minrk minrk mentioned this pull request Aug 9, 2017
@Carreau Carreau added this to the 5.0 milestone Jun 4, 2020
@Carreau Carreau added 5.0-re-review Need to re-review for potential API impact changes. 5.0-no-incidence change that has noincidence on 5.0 compat (eg: doc) and removed 5.0-re-review Need to re-review for potential API impact changes. labels Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5.0-no-incidence change that has noincidence on 5.0 compat (eg: doc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Traitlets master breaks ipywidgets

3 participants