{"action":"created","comment":{"url":"https://api.github.com/repos/channelcat/sanic/pulls/comments/92848466","pull_request_review_id":13372223,"id":92848466,"diff_hunk":"@@ -1,5 +1,11 @@\n-class Config:\n-    LOGO = \"\"\"\n+import os\n+import types\n+\n+\n+class Config(dict):\n+    def __init__(self, defaults=None):\n+        dict.__init__(self, defaults or {})","path":"sanic/config.py","position":9,"original_position":9,"commit_id":"04798cbf5b0976b840430f19c61cd870df28a650","original_commit_id":"04798cbf5b0976b840430f19c61cd870df28a650","user":{"login":"AntonDnepr","id":7930813,"avatar_url":"https://avatars.githubusercontent.com/u/7930813?v=3","gravatar_id":"","url":"https://api.github.com/users/AntonDnepr","html_url":"https://github.com/AntonDnepr","followers_url":"https://api.github.com/users/AntonDnepr/followers","following_url":"https://api.github.com/users/AntonDnepr/following{/other_user}","gists_url":"https://api.github.com/users/AntonDnepr/gists{/gist_id}","starred_url":"https://api.github.com/users/AntonDnepr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AntonDnepr/subscriptions","organizations_url":"https://api.github.com/users/AntonDnepr/orgs","repos_url":"https://api.github.com/users/AntonDnepr/repos","events_url":"https://api.github.com/users/AntonDnepr/events{/privacy}","received_events_url":"https://api.github.com/users/AntonDnepr/received_events","type":"User","site_admin":false},"body":"I don't think that built-in dict will inherit a lot of other stuff, but please go with `super` here just in case","created_at":"2016-12-16T17:07:22Z","updated_at":"2016-12-16T17:07:22Z","html_url":"https://github.com/channelcat/sanic/pull/199#discussion_r92848466","pull_request_url":"https://api.github.com/repos/channelcat/sanic/pulls/199","_links":{"self":{"href":"https://api.github.com/repos/channelcat/sanic/pulls/comments/92848466"},"html":{"href":"https://github.com/channelcat/sanic/pull/199#discussion_r92848466"},"pull_request":{"href":"https://api.github.com/repos/channelcat/sanic/pulls/199"}}},"pull_request":{"url":"https://api.github.com/repos/channelcat/sanic/pulls/199","id":98351169,"html_url":"https://github.com/channelcat/sanic/pull/199","diff_url":"https://github.com/channelcat/sanic/pull/199.diff","patch_url":"https://github.com/channelcat/sanic/pull/199.patch","issue_url":"https://api.github.com/repos/channelcat/sanic/issues/199","number":199,"state":"open","locked":false,"title":"added methods to load config from a file","user":{"login":"Tim-Erwin","id":802148,"avatar_url":"https://avatars.githubusercontent.com/u/802148?v=3","gravatar_id":"","url":"https://api.github.com/users/Tim-Erwin","html_url":"https://github.com/Tim-Erwin","followers_url":"https://api.github.com/users/Tim-Erwin/followers","following_url":"https://api.github.com/users/Tim-Erwin/following{/other_user}","gists_url":"https://api.github.com/users/Tim-Erwin/gists{/gist_id}","starred_url":"https://api.github.com/users/Tim-Erwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tim-Erwin/subscriptions","organizations_url":"https://api.github.com/users/Tim-Erwin/orgs","repos_url":"https://api.github.com/users/Tim-Erwin/repos","events_url":"https://api.github.com/users/Tim-Erwin/events{/privacy}","received_events_url":"https://api.github.com/users/Tim-Erwin/received_events","type":"User","site_admin":false},"body":"Sanic is lacking an easy way to configure an application. This adds basically the a simplified version of Flasks configuration. I added `__getattr__` and `__setattr__` in order to preserve the possibility to access the values with dot-notation.\r\n\r\nAs a side-effect the `ROUTER_CACHE_SIZE` got moved to `router.py`. First of all it doesn't really work with the new config class. Second, it was misleading in the first place, because it suggested that it was configurable - but it wasn't (except by changing the code in config.py). When changing the config, the `lru_cache` decorator is already fixed and the change has no effect.","created_at":"2016-12-16T15:17:15Z","updated_at":"2016-12-16T17:07:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1e8c39bb32af4815be5355e58f1f0f0bce8504dd","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/channelcat/sanic/pulls/199/commits","review_comments_url":"https://api.github.com/repos/channelcat/sanic/pulls/199/comments","review_comment_url":"https://api.github.com/repos/channelcat/sanic/pulls/comments{/number}","comments_url":"https://api.github.com/repos/channelcat/sanic/issues/199/comments","statuses_url":"https://api.github.com/repos/channelcat/sanic/statuses/04798cbf5b0976b840430f19c61cd870df28a650","head":{"label":"Tim-Erwin:improved_config","ref":"improved_config","sha":"04798cbf5b0976b840430f19c61cd870df28a650","user":{"login":"Tim-Erwin","id":802148,"avatar_url":"https://avatars.githubusercontent.com/u/802148?v=3","gravatar_id":"","url":"https://api.github.com/users/Tim-Erwin","html_url":"https://github.com/Tim-Erwin","followers_url":"https://api.github.com/users/Tim-Erwin/followers","following_url":"https://api.github.com/users/Tim-Erwin/following{/other_user}","gists_url":"https://api.github.com/users/Tim-Erwin/gists{/gist_id}","starred_url":"https://api.github.com/users/Tim-Erwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tim-Erwin/subscriptions","organizations_url":"https://api.github.com/users/Tim-Erwin/orgs","repos_url":"https://api.github.com/users/Tim-Erwin/repos","events_url":"https://api.github.com/users/Tim-Erwin/events{/privacy}","received_events_url":"https://api.github.com/users/Tim-Erwin/received_events","type":"User","site_admin":false},"repo":{"id":76661455,"name":"sanic","full_name":"Tim-Erwin/sanic","owner":{"login":"Tim-Erwin","id":802148,"avatar_url":"https://avatars.githubusercontent.com/u/802148?v=3","gravatar_id":"","url":"https://api.github.com/users/Tim-Erwin","html_url":"https://github.com/Tim-Erwin","followers_url":"https://api.github.com/users/Tim-Erwin/followers","following_url":"https://api.github.com/users/Tim-Erwin/following{/other_user}","gists_url":"https://api.github.com/users/Tim-Erwin/gists{/gist_id}","starred_url":"https://api.github.com/users/Tim-Erwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tim-Erwin/subscriptions","organizations_url":"https://api.github.com/users/Tim-Erwin/orgs","repos_url":"https://api.github.com/users/Tim-Erwin/repos","events_url":"https://api.github.com/users/Tim-Erwin/events{/privacy}","received_events_url":"https://api.github.com/users/Tim-Erwin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Tim-Erwin/sanic","description":"Python 3.5+ web server that's written to go fast","fork":true,"url":"https://api.github.com/repos/Tim-Erwin/sanic","forks_url":"https://api.github.com/repos/Tim-Erwin/sanic/forks","keys_url":"https://api.github.com/repos/Tim-Erwin/sanic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Tim-Erwin/sanic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Tim-Erwin/sanic/teams","hooks_url":"https://api.github.com/repos/Tim-Erwin/sanic/hooks","issue_events_url":"https://api.github.com/repos/Tim-Erwin/sanic/issues/events{/number}","events_url":"https://api.github.com/repos/Tim-Erwin/sanic/events","assignees_url":"https://api.github.com/repos/Tim-Erwin/sanic/assignees{/user}","branches_url":"https://api.github.com/repos/Tim-Erwin/sanic/branches{/branch}","tags_url":"https://api.github.com/repos/Tim-Erwin/sanic/tags","blobs_url":"https://api.github.com/repos/Tim-Erwin/sanic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Tim-Erwin/sanic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Tim-Erwin/sanic/git/refs{/sha}","trees_url":"https://api.github.com/repos/Tim-Erwin/sanic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Tim-Erwin/sanic/statuses/{sha}","languages_url":"https://api.github.com/repos/Tim-Erwin/sanic/languages","stargazers_url":"https://api.github.com/repos/Tim-Erwin/sanic/stargazers","contributors_url":"https://api.github.com/repos/Tim-Erwin/sanic/contributors","subscribers_url":"https://api.github.com/repos/Tim-Erwin/sanic/subscribers","subscription_url":"https://api.github.com/repos/Tim-Erwin/sanic/subscription","commits_url":"https://api.github.com/repos/Tim-Erwin/sanic/commits{/sha}","git_commits_url":"https://api.github.com/repos/Tim-Erwin/sanic/git/commits{/sha}","comments_url":"https://api.github.com/repos/Tim-Erwin/sanic/comments{/number}","issue_comment_url":"https://api.github.com/repos/Tim-Erwin/sanic/issues/comments{/number}","contents_url":"https://api.github.com/repos/Tim-Erwin/sanic/contents/{+path}","compare_url":"https://api.github.com/repos/Tim-Erwin/sanic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Tim-Erwin/sanic/merges","archive_url":"https://api.github.com/repos/Tim-Erwin/sanic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Tim-Erwin/sanic/downloads","issues_url":"https://api.github.com/repos/Tim-Erwin/sanic/issues{/number}","pulls_url":"https://api.github.com/repos/Tim-Erwin/sanic/pulls{/number}","milestones_url":"https://api.github.com/repos/Tim-Erwin/sanic/milestones{/number}","notifications_url":"https://api.github.com/repos/Tim-Erwin/sanic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Tim-Erwin/sanic/labels{/name}","releases_url":"https://api.github.com/repos/Tim-Erwin/sanic/releases{/id}","deployments_url":"https://api.github.com/repos/Tim-Erwin/sanic/deployments","created_at":"2016-12-16T14:51:44Z","updated_at":"2016-12-16T14:51:45Z","pushed_at":"2016-12-16T16:05:27Z","git_url":"git://github.com/Tim-Erwin/sanic.git","ssh_url":"git@github.com:Tim-Erwin/sanic.git","clone_url":"https://github.com/Tim-Erwin/sanic.git","svn_url":"https://github.com/Tim-Erwin/sanic","homepage":"","size":265,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"channelcat:master","ref":"master","sha":"545d9eb59b72f2f3abe516a20efbab890a3b1a5a","user":{"login":"channelcat","id":474989,"avatar_url":"https://avatars.githubusercontent.com/u/474989?v=3","gravatar_id":"","url":"https://api.github.com/users/channelcat","html_url":"https://github.com/channelcat","followers_url":"https://api.github.com/users/channelcat/followers","following_url":"https://api.github.com/users/channelcat/following{/other_user}","gists_url":"https://api.github.com/users/channelcat/gists{/gist_id}","starred_url":"https://api.github.com/users/channelcat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/channelcat/subscriptions","organizations_url":"https://api.github.com/users/channelcat/orgs","repos_url":"https://api.github.com/users/channelcat/repos","events_url":"https://api.github.com/users/channelcat/events{/privacy}","received_events_url":"https://api.github.com/users/channelcat/received_events","type":"User","site_admin":false},"repo":{"id":59720190,"name":"sanic","full_name":"channelcat/sanic","owner":{"login":"channelcat","id":474989,"avatar_url":"https://avatars.githubusercontent.com/u/474989?v=3","gravatar_id":"","url":"https://api.github.com/users/channelcat","html_url":"https://github.com/channelcat","followers_url":"https://api.github.com/users/channelcat/followers","following_url":"https://api.github.com/users/channelcat/following{/other_user}","gists_url":"https://api.github.com/users/channelcat/gists{/gist_id}","starred_url":"https://api.github.com/users/channelcat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/channelcat/subscriptions","organizations_url":"https://api.github.com/users/channelcat/orgs","repos_url":"https://api.github.com/users/channelcat/repos","events_url":"https://api.github.com/users/channelcat/events{/privacy}","received_events_url":"https://api.github.com/users/channelcat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/channelcat/sanic","description":"Python 3.5+ web server that's written to go fast","fork":false,"url":"https://api.github.com/repos/channelcat/sanic","forks_url":"https://api.github.com/repos/channelcat/sanic/forks","keys_url":"https://api.github.com/repos/channelcat/sanic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/channelcat/sanic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/channelcat/sanic/teams","hooks_url":"https://api.github.com/repos/channelcat/sanic/hooks","issue_events_url":"https://api.github.com/repos/channelcat/sanic/issues/events{/number}","events_url":"https://api.github.com/repos/channelcat/sanic/events","assignees_url":"https://api.github.com/repos/channelcat/sanic/assignees{/user}","branches_url":"https://api.github.com/repos/channelcat/sanic/branches{/branch}","tags_url":"https://api.github.com/repos/channelcat/sanic/tags","blobs_url":"https://api.github.com/repos/channelcat/sanic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/channelcat/sanic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/channelcat/sanic/git/refs{/sha}","trees_url":"https://api.github.com/repos/channelcat/sanic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/channelcat/sanic/statuses/{sha}","languages_url":"https://api.github.com/repos/channelcat/sanic/languages","stargazers_url":"https://api.github.com/repos/channelcat/sanic/stargazers","contributors_url":"https://api.github.com/repos/channelcat/sanic/contributors","subscribers_url":"https://api.github.com/repos/channelcat/sanic/subscribers","subscription_url":"https://api.github.com/repos/channelcat/sanic/subscription","commits_url":"https://api.github.com/repos/channelcat/sanic/commits{/sha}","git_commits_url":"https://api.github.com/repos/channelcat/sanic/git/commits{/sha}","comments_url":"https://api.github.com/repos/channelcat/sanic/comments{/number}","issue_comment_url":"https://api.github.com/repos/channelcat/sanic/issues/comments{/number}","contents_url":"https://api.github.com/repos/channelcat/sanic/contents/{+path}","compare_url":"https://api.github.com/repos/channelcat/sanic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/channelcat/sanic/merges","archive_url":"https://api.github.com/repos/channelcat/sanic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/channelcat/sanic/downloads","issues_url":"https://api.github.com/repos/channelcat/sanic/issues{/number}","pulls_url":"https://api.github.com/repos/channelcat/sanic/pulls{/number}","milestones_url":"https://api.github.com/repos/channelcat/sanic/milestones{/number}","notifications_url":"https://api.github.com/repos/channelcat/sanic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/channelcat/sanic/labels{/name}","releases_url":"https://api.github.com/repos/channelcat/sanic/releases{/id}","deployments_url":"https://api.github.com/repos/channelcat/sanic/deployments","created_at":"2016-05-26T04:38:22Z","updated_at":"2016-12-16T16:51:59Z","pushed_at":"2016-12-16T16:05:27Z","git_url":"git://github.com/channelcat/sanic.git","ssh_url":"git@github.com:channelcat/sanic.git","clone_url":"https://github.com/channelcat/sanic.git","svn_url":"https://github.com/channelcat/sanic","homepage":"","size":263,"stargazers_count":2847,"watchers_count":2847,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":199,"mirror_url":null,"open_issues_count":41,"forks":199,"open_issues":41,"watchers":2847,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/channelcat/sanic/pulls/199"},"html":{"href":"https://github.com/channelcat/sanic/pull/199"},"issue":{"href":"https://api.github.com/repos/channelcat/sanic/issues/199"},"comments":{"href":"https://api.github.com/repos/channelcat/sanic/issues/199/comments"},"review_comments":{"href":"https://api.github.com/repos/channelcat/sanic/pulls/199/comments"},"review_comment":{"href":"https://api.github.com/repos/channelcat/sanic/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/channelcat/sanic/pulls/199/commits"},"statuses":{"href":"https://api.github.com/repos/channelcat/sanic/statuses/04798cbf5b0976b840430f19c61cd870df28a650"}}}}
{"actor":{"display_login":"AntonDnepr"}}