{"action":"created","issue":{"url":"https://api.github.com/repos/ipython/ipython/issues/7602","labels_url":"https://api.github.com/repos/ipython/ipython/issues/7602/labels{/name}","comments_url":"https://api.github.com/repos/ipython/ipython/issues/7602/comments","events_url":"https://api.github.com/repos/ipython/ipython/issues/7602/events","html_url":"https://github.com/ipython/ipython/pull/7602","id":55553472,"number":7602,"title":"Validation on the python side","user":{"login":"SylvainCorlay","id":2397974,"avatar_url":"https://avatars.githubusercontent.com/u/2397974?v=3","gravatar_id":"","url":"https://api.github.com/users/SylvainCorlay","html_url":"https://github.com/SylvainCorlay","followers_url":"https://api.github.com/users/SylvainCorlay/followers","following_url":"https://api.github.com/users/SylvainCorlay/following{/other_user}","gists_url":"https://api.github.com/users/SylvainCorlay/gists{/gist_id}","starred_url":"https://api.github.com/users/SylvainCorlay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SylvainCorlay/subscriptions","organizations_url":"https://api.github.com/users/SylvainCorlay/orgs","repos_url":"https://api.github.com/users/SylvainCorlay/repos","events_url":"https://api.github.com/users/SylvainCorlay/events{/privacy}","received_events_url":"https://api.github.com/users/SylvainCorlay/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ipython/ipython/labels/needs-review","name":"needs-review","color":"bfe5bf"},{"url":"https://api.github.com/repos/ipython/ipython/labels/widgets","name":"widgets","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/ipython/ipython/milestones/13","labels_url":"https://api.github.com/repos/ipython/ipython/milestones/13/labels","id":532467,"number":13,"title":"3.0","description":"IPython 3.0 \"Early\" 2015","creator":{"login":"Carreau","id":335567,"avatar_url":"https://avatars.githubusercontent.com/u/335567?v=3","gravatar_id":"","url":"https://api.github.com/users/Carreau","html_url":"https://github.com/Carreau","followers_url":"https://api.github.com/users/Carreau/followers","following_url":"https://api.github.com/users/Carreau/following{/other_user}","gists_url":"https://api.github.com/users/Carreau/gists{/gist_id}","starred_url":"https://api.github.com/users/Carreau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Carreau/subscriptions","organizations_url":"https://api.github.com/users/Carreau/orgs","repos_url":"https://api.github.com/users/Carreau/repos","events_url":"https://api.github.com/users/Carreau/events{/privacy}","received_events_url":"https://api.github.com/users/Carreau/received_events","type":"User","site_admin":false},"open_issues":22,"closed_issues":1041,"state":"open","created_at":"2014-01-10T13:22:15Z","updated_at":"2015-01-27T00:24:29Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-01-26T23:30:45Z","updated_at":"2015-01-27T00:26:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ipython/ipython/pulls/7602","html_url":"https://github.com/ipython/ipython/pull/7602","diff_url":"https://github.com/ipython/ipython/pull/7602.diff","patch_url":"https://github.com/ipython/ipython/pull/7602.patch"},"body":"This is a simple fix for  #6814. In general, whenever a widget model may be modified by both the backend *and* the frontend, if there is a validation stage that transform the set values, the logic should be implemented on both sides. \r\n\r\nOn this regard, but outside of the scope of this small PR: \r\n- I don't think that what we currently have for the validation of values in widgets is good enough, because the validation happens AFTER we set the value, and it does not prevent the assignment. \r\n- Ideally, we should be able to hook up the custom validation logic in the traitlet validation, via the traitlet type metadata, so that in case of error, the assignment does not actually happen. \r\n    - EDIT: See #7603 for the early validation  hook"},"comment":{"url":"https://api.github.com/repos/ipython/ipython/issues/comments/71567526","html_url":"https://github.com/ipython/ipython/pull/7602#issuecomment-71567526","issue_url":"https://api.github.com/repos/ipython/ipython/issues/7602","id":71567526,"user":{"login":"SylvainCorlay","id":2397974,"avatar_url":"https://avatars.githubusercontent.com/u/2397974?v=3","gravatar_id":"","url":"https://api.github.com/users/SylvainCorlay","html_url":"https://github.com/SylvainCorlay","followers_url":"https://api.github.com/users/SylvainCorlay/followers","following_url":"https://api.github.com/users/SylvainCorlay/following{/other_user}","gists_url":"https://api.github.com/users/SylvainCorlay/gists{/gist_id}","starred_url":"https://api.github.com/users/SylvainCorlay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SylvainCorlay/subscriptions","organizations_url":"https://api.github.com/users/SylvainCorlay/orgs","repos_url":"https://api.github.com/users/SylvainCorlay/repos","events_url":"https://api.github.com/users/SylvainCorlay/events{/privacy}","received_events_url":"https://api.github.com/users/SylvainCorlay/received_events","type":"User","site_admin":false},"created_at":"2015-01-27T00:26:27Z","updated_at":"2015-01-27T00:26:27Z","body":"Yes I think too. I doubt the other logic will replace this one for IPython 3.0. "}}