{"action":"created","issue":{"url":"https://api.github.com/repos/jupyter-widgets/ipywidgets/issues/1748","repository_url":"https://api.github.com/repos/jupyter-widgets/ipywidgets","labels_url":"https://api.github.com/repos/jupyter-widgets/ipywidgets/issues/1748/labels{/name}","comments_url":"https://api.github.com/repos/jupyter-widgets/ipywidgets/issues/1748/comments","events_url":"https://api.github.com/repos/jupyter-widgets/ipywidgets/issues/1748/events","html_url":"https://github.com/jupyter-widgets/ipywidgets/issues/1748","id":264683002,"node_id":"MDU6SXNzdWUyNjQ2ODMwMDI=","number":1748,"title":"serializers returning an object with buffer key in it get treated as buffers","user":{"login":"maartenbreddels","id":1765949,"node_id":"MDQ6VXNlcjE3NjU5NDk=","avatar_url":"https://avatars0.githubusercontent.com/u/1765949?v=4","gravatar_id":"","url":"https://api.github.com/users/maartenbreddels","html_url":"https://github.com/maartenbreddels","followers_url":"https://api.github.com/users/maartenbreddels/followers","following_url":"https://api.github.com/users/maartenbreddels/following{/other_user}","gists_url":"https://api.github.com/users/maartenbreddels/gists{/gist_id}","starred_url":"https://api.github.com/users/maartenbreddels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maartenbreddels/subscriptions","organizations_url":"https://api.github.com/users/maartenbreddels/orgs","repos_url":"https://api.github.com/users/maartenbreddels/repos","events_url":"https://api.github.com/users/maartenbreddels/events{/privacy}","received_events_url":"https://api.github.com/users/maartenbreddels/received_events","type":"User","site_admin":false},"labels":[{"id":200981683,"node_id":"MDU6TGFiZWwyMDA5ODE2ODM=","url":"https://api.github.com/repos/jupyter-widgets/ipywidgets/labels/bug","name":"bug","color":"b60205","default":true},{"id":222966350,"node_id":"MDU6TGFiZWwyMjI5NjYzNTA=","url":"https://api.github.com/repos/jupyter-widgets/ipywidgets/labels/good%20first%20issue","name":"good first issue","color":"c2e0c6","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/jupyter-widgets/ipywidgets/milestones/19","html_url":"https://github.com/jupyter-widgets/ipywidgets/milestone/19","labels_url":"https://api.github.com/repos/jupyter-widgets/ipywidgets/milestones/19/labels","id":2870715,"node_id":"MDk6TWlsZXN0b25lMjg3MDcxNQ==","number":19,"title":"Patch release","description":"Small changes that warrant at least a patch release. These changes could fix bugs, but should be backwards compatible and should not add major new things.","creator":{"login":"jasongrout","id":192614,"node_id":"MDQ6VXNlcjE5MjYxNA==","avatar_url":"https://avatars0.githubusercontent.com/u/192614?v=4","gravatar_id":"","url":"https://api.github.com/users/jasongrout","html_url":"https://github.com/jasongrout","followers_url":"https://api.github.com/users/jasongrout/followers","following_url":"https://api.github.com/users/jasongrout/following{/other_user}","gists_url":"https://api.github.com/users/jasongrout/gists{/gist_id}","starred_url":"https://api.github.com/users/jasongrout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasongrout/subscriptions","organizations_url":"https://api.github.com/users/jasongrout/orgs","repos_url":"https://api.github.com/users/jasongrout/repos","events_url":"https://api.github.com/users/jasongrout/events{/privacy}","received_events_url":"https://api.github.com/users/jasongrout/received_events","type":"User","site_admin":false},"open_issues":20,"closed_issues":0,"state":"open","created_at":"2017-10-27T20:00:14Z","updated_at":"2018-08-31T20:29:25Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2017-10-11T18:09:02Z","updated_at":"2018-09-07T12:32:51Z","closed_at":null,"author_association":"MEMBER","body":"https://github.com/jupyter-widgets/ipywidgets/blob/24f3312897f2694f10fddd207206af0aae10ecce/packages/base/src/utils.ts#L184 and https://github.com/jupyter-widgets/ipywidgets/blob/24f3312897f2694f10fddd207206af0aae10ecce/packages/base/src/utils.ts#L155 are too generous, they should whitelist specific types etc, I noticed this when I returned \r\n`{'buffer': ar.data.buffer, dtype:arrayToTypes[ar.data.constructor.name], shape:ar.shape}` from a serializer. On the python side I got passed a memory object, instead of a dict.\r\nMight be worth to take a look at https://github.com/jashkenas/underscore/pull/2694/files#diff-0f36b362a0b81d6f4d4bfd8a7413c75dR62 for solving this.\r\n\r\nPS: Btw, a simple workaround is not to name it buffer, but other people may get bitten by this. "},"comment":{"url":"https://api.github.com/repos/jupyter-widgets/ipywidgets/issues/comments/419425061","html_url":"https://github.com/jupyter-widgets/ipywidgets/issues/1748#issuecomment-419425061","issue_url":"https://api.github.com/repos/jupyter-widgets/ipywidgets/issues/1748","id":419425061,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTQyNTA2MQ==","user":{"login":"maartenbreddels","id":1765949,"node_id":"MDQ6VXNlcjE3NjU5NDk=","avatar_url":"https://avatars0.githubusercontent.com/u/1765949?v=4","gravatar_id":"","url":"https://api.github.com/users/maartenbreddels","html_url":"https://github.com/maartenbreddels","followers_url":"https://api.github.com/users/maartenbreddels/followers","following_url":"https://api.github.com/users/maartenbreddels/following{/other_user}","gists_url":"https://api.github.com/users/maartenbreddels/gists{/gist_id}","starred_url":"https://api.github.com/users/maartenbreddels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maartenbreddels/subscriptions","organizations_url":"https://api.github.com/users/maartenbreddels/orgs","repos_url":"https://api.github.com/users/maartenbreddels/repos","events_url":"https://api.github.com/users/maartenbreddels/events{/privacy}","received_events_url":"https://api.github.com/users/maartenbreddels/received_events","type":"User","site_admin":false},"created_at":"2018-09-07T12:32:51Z","updated_at":"2018-09-07T12:32:51Z","author_association":"MEMBER","body":"From js, if you would serialize a json structure like this:\r\n```\r\nvalue = {buffer: new Float32Array([1,2,3]).buffer, shape: [3]}\r\n```\r\nIt things that value itself is a TypedArray, since it's .buffer property is of `ArrayBuffer`, and only value.buffer is send over the wire, and shape will not be send. Maybe there are more issues, I'm not sure."}}
{"actor":{"display_login":"maartenbreddels"}}