{"action":"created","issue":{"url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/1331","repository_url":"https://api.github.com/repos/mitmproxy/mitmproxy","labels_url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/1331/labels{/name}","comments_url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/1331/comments","events_url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/1331/events","html_url":"https://github.com/mitmproxy/mitmproxy/pull/1331","id":164648481,"number":1331,"title":"Test Implementation of Immutable Options","user":{"login":"mhils","id":1019198,"avatar_url":"https://avatars.githubusercontent.com/u/1019198?v=3","gravatar_id":"","url":"https://api.github.com/users/mhils","html_url":"https://github.com/mhils","followers_url":"https://api.github.com/users/mhils/followers","following_url":"https://api.github.com/users/mhils/following{/other_user}","gists_url":"https://api.github.com/users/mhils/gists{/gist_id}","starred_url":"https://api.github.com/users/mhils/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhils/subscriptions","organizations_url":"https://api.github.com/users/mhils/orgs","repos_url":"https://api.github.com/users/mhils/repos","events_url":"https://api.github.com/users/mhils/events{/privacy}","received_events_url":"https://api.github.com/users/mhils/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mitmproxy/mitmproxy/labels/in%20progress","name":"in progress","color":"ededed"},{"url":"https://api.github.com/repos/mitmproxy/mitmproxy/labels/waiting%20for%20feedback","name":"waiting for feedback","color":"fef2c0"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-07-09T04:08:14Z","updated_at":"2016-07-14T01:03:25Z","closed_at":"2016-07-14T01:03:25Z","pull_request":{"url":"https://api.github.com/repos/mitmproxy/mitmproxy/pulls/1331","html_url":"https://github.com/mitmproxy/mitmproxy/pull/1331","diff_url":"https://github.com/mitmproxy/mitmproxy/pull/1331.diff","patch_url":"https://github.com/mitmproxy/mitmproxy/pull/1331.patch"},"body":"I had a bit of a headache with the blinker Signals in the refactor branch. This is an experimental PR which brings immutable options. The idea is that options can only be changed  by calling `Master.update_options(new_options)`, which then calls `configure(new_options)` for all Addons. If any of these calls raises an exeception, we call `configure(old_options)` to roll back the existing changes. Compared to the refactor approach, we force a stricter chain of command here - not anybody can subscribe to updates anymore.\r\nOne direct advantage of this is that we can compare the current options with `new_options` in each configure call. This may also be very useful if we want to include the ProxyConfig in the options, as we can ensure that ProxyConfig does not change for existing connections.\r\n\r\n@cortesi: This is still very exploratory here. Thoughts?"},"comment":{"url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/comments/232529530","html_url":"https://github.com/mitmproxy/mitmproxy/pull/1331#issuecomment-232529530","issue_url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/1331","id":232529530,"user":{"login":"cortesi","id":22544,"avatar_url":"https://avatars.githubusercontent.com/u/22544?v=3","gravatar_id":"","url":"https://api.github.com/users/cortesi","html_url":"https://github.com/cortesi","followers_url":"https://api.github.com/users/cortesi/followers","following_url":"https://api.github.com/users/cortesi/following{/other_user}","gists_url":"https://api.github.com/users/cortesi/gists{/gist_id}","starred_url":"https://api.github.com/users/cortesi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cortesi/subscriptions","organizations_url":"https://api.github.com/users/cortesi/orgs","repos_url":"https://api.github.com/users/cortesi/repos","events_url":"https://api.github.com/users/cortesi/events{/privacy}","received_events_url":"https://api.github.com/users/cortesi/received_events","type":"User","site_admin":false},"created_at":"2016-07-14T01:03:25Z","updated_at":"2016-07-14T01:03:25Z","body":"A cleaner Options implementation is now in base. ;)"}}
{"actor":{"display_login":"cortesi"}}