{"action":"created","issue":{"url":"https://api.github.com/repos/sangoma/sandswitches/issues/1","repository_url":"https://api.github.com/repos/sangoma/sandswitches","labels_url":"https://api.github.com/repos/sangoma/sandswitches/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/sangoma/sandswitches/issues/1/comments","events_url":"https://api.github.com/repos/sangoma/sandswitches/issues/1/events","html_url":"https://github.com/sangoma/sandswitches/issues/1","id":178496426,"number":1,"title":"Figure out why we need to __getitem__","user":{"login":"tgoodlet","id":291685,"avatar_url":"https://avatars.githubusercontent.com/u/291685?v=3","gravatar_id":"","url":"https://api.github.com/users/tgoodlet","html_url":"https://github.com/tgoodlet","followers_url":"https://api.github.com/users/tgoodlet/followers","following_url":"https://api.github.com/users/tgoodlet/following{/other_user}","gists_url":"https://api.github.com/users/tgoodlet/gists{/gist_id}","starred_url":"https://api.github.com/users/tgoodlet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgoodlet/subscriptions","organizations_url":"https://api.github.com/users/tgoodlet/orgs","repos_url":"https://api.github.com/users/tgoodlet/repos","events_url":"https://api.github.com/users/tgoodlet/events{/privacy}","received_events_url":"https://api.github.com/users/tgoodlet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-09-22T00:50:25Z","updated_at":"2016-09-23T21:27:37Z","closed_at":null,"body":"@vodik made a note and I can't remember why I needed it to get things working but the `__getitem__` call [here](https://github.com/sangoma/sandswitches/blob/master/sandswitches/orms.py#L122) seems superfluous."},"comment":{"url":"https://api.github.com/repos/sangoma/sandswitches/issues/comments/249306672","html_url":"https://github.com/sangoma/sandswitches/issues/1#issuecomment-249306672","issue_url":"https://api.github.com/repos/sangoma/sandswitches/issues/1","id":249306672,"user":{"login":"vodik","id":216803,"avatar_url":"https://avatars.githubusercontent.com/u/216803?v=3","gravatar_id":"","url":"https://api.github.com/users/vodik","html_url":"https://github.com/vodik","followers_url":"https://api.github.com/users/vodik/followers","following_url":"https://api.github.com/users/vodik/following{/other_user}","gists_url":"https://api.github.com/users/vodik/gists{/gist_id}","starred_url":"https://api.github.com/users/vodik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vodik/subscriptions","organizations_url":"https://api.github.com/users/vodik/orgs","repos_url":"https://api.github.com/users/vodik/repos","events_url":"https://api.github.com/users/vodik/events{/privacy}","received_events_url":"https://api.github.com/users/vodik/received_events","type":"User","site_admin":false},"created_at":"2016-09-23T21:27:37Z","updated_at":"2016-09-23T21:27:37Z","body":">> Calling setitem on the ElemMap class can trigger a call to etree.SubElement (this will make a copy of your data - something arguably setitem really shouldn't be doing).\r\n\r\n> No, etree.SubElement is only called when there exists no element currently for key. This makes sense because we need to extend the XML config to include our new data.\r\n\r\nWell key word was *can*.\r\n\r\n> I don't think that's a good idea. That code in virt-manager is needlessly complex and convoluted imho. Also I want to be able to modify the etree in place such that I can component wise render to XML easily without having to render the entire tree or section copies.\r\n\r\nI agree its overly complicated, but I wouldn't argue its due to the approach, its consequences to how they chose to expose/architect details.\r\n\r\nI really do thing you want to do a full serialise/deserialise rather than this live editing. If you don't want to do that, just drop `__getitem__`/`__setitem__`. You're code violates reasonable expectations of how those methods should work."}}
{"actor":{"display_login":"vodik"}}