{"action":"closed","issue":{"url":"https://api.github.com/repos/shx2/figura/issues/3","repository_url":"https://api.github.com/repos/shx2/figura","labels_url":"https://api.github.com/repos/shx2/figura/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/shx2/figura/issues/3/comments","events_url":"https://api.github.com/repos/shx2/figura/issues/3/events","html_url":"https://github.com/shx2/figura/issues/3","id":167791320,"number":3,"title":"ConfigOverrideSet behavior is inconsistent when using dicts","user":{"login":"sagiepud","id":9789496,"avatar_url":"https://avatars.githubusercontent.com/u/9789496?v=3","gravatar_id":"","url":"https://api.github.com/users/sagiepud","html_url":"https://github.com/sagiepud","followers_url":"https://api.github.com/users/sagiepud/followers","following_url":"https://api.github.com/users/sagiepud/following{/other_user}","gists_url":"https://api.github.com/users/sagiepud/gists{/gist_id}","starred_url":"https://api.github.com/users/sagiepud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sagiepud/subscriptions","organizations_url":"https://api.github.com/users/sagiepud/orgs","repos_url":"https://api.github.com/users/sagiepud/repos","events_url":"https://api.github.com/users/sagiepud/events{/privacy}","received_events_url":"https://api.github.com/users/sagiepud/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-27T07:43:36Z","updated_at":"2016-07-27T19:46:08Z","closed_at":"2016-07-27T19:46:08Z","body":"The problem is demonstrated in the following example: \r\nThis behavior makes sense to me - \r\n```python\r\nconfig = ConfigContainer(a = 1) \r\nconfig.nested1 = ConfigContainer(b = 1)  # nested1 is a ConfigContainer\r\nover1 = ConfigOverrideSet(nested1__b = 2, nested2__c = 2)\r\nconfig.apply_overrides(over1)  # nested1 and nested2 are ConfigContainer's\r\n```\r\nThis does not - \r\n```python\r\nconfig = ConfigContainer(a = 1)\r\nconfig.nested1 = ConfigContainer(b = 1)  # nested1 is a ConfigContainer\r\nover2 = ConfigOverrideSet({'nested1': {'b': 2}, 'nested2': {'c': 2}})\r\nconfig.apply_overrides(over2)  # nested1 and nested2 are dicts\r\n```\r\n\r\nSince using dicts as overrides seems to be supported (the new values do override their originals), I'd expect that applying the overrides wouldn't disrupt the ConfigContainer's structure. I imagine this could be handled either in the ConfigOverrideSet ctor, or in the apply_overrides function. "}}
{"actor":{"display_login":"shx2"}}