{"action":"created","comment":{"url":"https://api.github.com/repos/aio-libs/aiohttp/pulls/comments/183241177","pull_request_review_id":114205572,"id":183241177,"diff_hunk":"@@ -664,6 +665,18 @@ def app(self):\n         \"\"\"Application instance.\"\"\"\n         return self._match_info.current_app\n \n+    @property\n+    def config_dict(self):\n+        lst = self._match_info.apps\n+        app = self.app\n+        idx = lst.index(app)\n+        sublist = list(reversed(lst[:idx + 1]))\n+        return ChainedProps(sublist)\n+\n+    @property\n+    def config(self):\n+        return Namespace(self.config_dict)","path":"aiohttp/web_request.py","position":24,"original_position":24,"commit_id":"801419d46ffb92c7c81867342d5f0f8ef9caf2b2","original_commit_id":"a73c0af76c94a7b6954ab340c861432c5c88f192","user":{"login":"kxepal","id":785983,"avatar_url":"https://avatars0.githubusercontent.com/u/785983?v=4","gravatar_id":"","url":"https://api.github.com/users/kxepal","html_url":"https://github.com/kxepal","followers_url":"https://api.github.com/users/kxepal/followers","following_url":"https://api.github.com/users/kxepal/following{/other_user}","gists_url":"https://api.github.com/users/kxepal/gists{/gist_id}","starred_url":"https://api.github.com/users/kxepal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kxepal/subscriptions","organizations_url":"https://api.github.com/users/kxepal/orgs","repos_url":"https://api.github.com/users/kxepal/repos","events_url":"https://api.github.com/users/kxepal/events{/privacy}","received_events_url":"https://api.github.com/users/kxepal/received_events","type":"User","site_admin":false},"body":"Yes, they don't do keys autocomplete unless you explicitly define those keys in the same scope. However, their ability to autocomplete custom attributes is limited and based on type knowledge and similar usages. \r\n\r\nHowever, for pylint you will have to put Namespace class into  `ignored-classes` since it will think that it's your fault since you're referencing to unknown class instance attribute.","created_at":"2018-04-22T15:41:37Z","updated_at":"2018-04-22T15:41:37Z","html_url":"https://github.com/aio-libs/aiohttp/pull/2949#discussion_r183241177","pull_request_url":"https://api.github.com/repos/aio-libs/aiohttp/pulls/2949","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/aio-libs/aiohttp/pulls/comments/183241177"},"html":{"href":"https://github.com/aio-libs/aiohttp/pull/2949#discussion_r183241177"},"pull_request":{"href":"https://api.github.com/repos/aio-libs/aiohttp/pulls/2949"}},"in_reply_to_id":183240494},"pull_request":{"url":"https://api.github.com/repos/aio-libs/aiohttp/pulls/2949","id":183277117,"html_url":"https://github.com/aio-libs/aiohttp/pull/2949","diff_url":"https://github.com/aio-libs/aiohttp/pull/2949.diff","patch_url":"https://github.com/aio-libs/aiohttp/pull/2949.patch","issue_url":"https://api.github.com/repos/aio-libs/aiohttp/issues/2949","number":2949,"state":"open","locked":false,"title":"Request config","user":{"login":"asvetlov","id":356399,"avatar_url":"https://avatars0.githubusercontent.com/u/356399?v=4","gravatar_id":"","url":"https://api.github.com/users/asvetlov","html_url":"https://github.com/asvetlov","followers_url":"https://api.github.com/users/asvetlov/followers","following_url":"https://api.github.com/users/asvetlov/following{/other_user}","gists_url":"https://api.github.com/users/asvetlov/gists{/gist_id}","starred_url":"https://api.github.com/users/asvetlov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asvetlov/subscriptions","organizations_url":"https://api.github.com/users/asvetlov/orgs","repos_url":"https://api.github.com/users/asvetlov/repos","events_url":"https://api.github.com/users/asvetlov/events{/privacy}","received_events_url":"https://api.github.com/users/asvetlov/received_events","type":"User","site_admin":false},"body":"<!-- Thank you for your contribution! -->\r\n\r\n## What do these changes do?\r\n\r\nAdd `request.config` and `request.config_dict` properties.\r\nBoth props do lookup into parent app if the name is not found in sub-application.\r\n`.config` is a namespace (`req.config.key`) but `.config_dict` is a mapping (`req.config_dict['key']`).\r\n\r\nBoth structures are immutable, to setup config value use `app['key'] = val` on application initialization stage.\r\n<!-- Please give a short brief about these changes. -->\r\n\r\n## Are there changes in behavior for the user?\r\n\r\n<!-- Outline any notable behaviour for the end users. -->\r\nThe change is backward compatible but two new attributes are added to request instance.\r\n## Related issue number\r\n\r\n<!-- Are there any issues opened that will be resolved by merging this change? -->\r\n#2689 \r\n## Checklist\r\n\r\n- [x] I think the code is well written\r\n- [x] Unit tests for the changes exist\r\n- [ ] Documentation reflects the changes\r\n- [ ] If you provide code modification, please add yourself to `CONTRIBUTORS.txt`\r\n  * The format is &lt;Name&gt; &lt;Surname&gt;.\r\n  * Please keep alphabetical order, the file is sorted by names. \r\n- [ ] Add a new news fragment into the `CHANGES` folder\r\n  * name it `<issue_id>.<type>` for example (588.bugfix)\r\n  * if you don't have an `issue_id` change it to the pr id after creating the pr\r\n  * ensure type is one of the following:\r\n    * `.feature`: Signifying a new feature.\r\n    * `.bugfix`: Signifying a bug fix.\r\n    * `.doc`: Signifying a documentation improvement.\r\n    * `.removal`: Signifying a deprecation or removal of public API.\r\n    * `.misc`: A ticket has been closed, but it is not of interest to users.\r\n  * Make sure to use full sentences with correct case and punctuation, for example: \"Fix issue with non-ascii contents in doctest text files.\"\r\n","created_at":"2018-04-22T14:53:39Z","updated_at":"2018-04-22T15:41:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"63f16d5c364d1da035c8fd7c125265c920a59b21","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/aio-libs/aiohttp/pulls/2949/commits","review_comments_url":"https://api.github.com/repos/aio-libs/aiohttp/pulls/2949/comments","review_comment_url":"https://api.github.com/repos/aio-libs/aiohttp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aio-libs/aiohttp/issues/2949/comments","statuses_url":"https://api.github.com/repos/aio-libs/aiohttp/statuses/801419d46ffb92c7c81867342d5f0f8ef9caf2b2","head":{"label":"aio-libs:request-config","ref":"request-config","sha":"801419d46ffb92c7c81867342d5f0f8ef9caf2b2","user":{"login":"aio-libs","id":7049303,"avatar_url":"https://avatars2.githubusercontent.com/u/7049303?v=4","gravatar_id":"","url":"https://api.github.com/users/aio-libs","html_url":"https://github.com/aio-libs","followers_url":"https://api.github.com/users/aio-libs/followers","following_url":"https://api.github.com/users/aio-libs/following{/other_user}","gists_url":"https://api.github.com/users/aio-libs/gists{/gist_id}","starred_url":"https://api.github.com/users/aio-libs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aio-libs/subscriptions","organizations_url":"https://api.github.com/users/aio-libs/orgs","repos_url":"https://api.github.com/users/aio-libs/repos","events_url":"https://api.github.com/users/aio-libs/events{/privacy}","received_events_url":"https://api.github.com/users/aio-libs/received_events","type":"Organization","site_admin":false},"repo":{"id":13258039,"name":"aiohttp","full_name":"aio-libs/aiohttp","owner":{"login":"aio-libs","id":7049303,"avatar_url":"https://avatars2.githubusercontent.com/u/7049303?v=4","gravatar_id":"","url":"https://api.github.com/users/aio-libs","html_url":"https://github.com/aio-libs","followers_url":"https://api.github.com/users/aio-libs/followers","following_url":"https://api.github.com/users/aio-libs/following{/other_user}","gists_url":"https://api.github.com/users/aio-libs/gists{/gist_id}","starred_url":"https://api.github.com/users/aio-libs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aio-libs/subscriptions","organizations_url":"https://api.github.com/users/aio-libs/orgs","repos_url":"https://api.github.com/users/aio-libs/repos","events_url":"https://api.github.com/users/aio-libs/events{/privacy}","received_events_url":"https://api.github.com/users/aio-libs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aio-libs/aiohttp","description":"HTTP client/server framework for asyncio ","fork":false,"url":"https://api.github.com/repos/aio-libs/aiohttp","forks_url":"https://api.github.com/repos/aio-libs/aiohttp/forks","keys_url":"https://api.github.com/repos/aio-libs/aiohttp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aio-libs/aiohttp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aio-libs/aiohttp/teams","hooks_url":"https://api.github.com/repos/aio-libs/aiohttp/hooks","issue_events_url":"https://api.github.com/repos/aio-libs/aiohttp/issues/events{/number}","events_url":"https://api.github.com/repos/aio-libs/aiohttp/events","assignees_url":"https://api.github.com/repos/aio-libs/aiohttp/assignees{/user}","branches_url":"https://api.github.com/repos/aio-libs/aiohttp/branches{/branch}","tags_url":"https://api.github.com/repos/aio-libs/aiohttp/tags","blobs_url":"https://api.github.com/repos/aio-libs/aiohttp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aio-libs/aiohttp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aio-libs/aiohttp/git/refs{/sha}","trees_url":"https://api.github.com/repos/aio-libs/aiohttp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aio-libs/aiohttp/statuses/{sha}","languages_url":"https://api.github.com/repos/aio-libs/aiohttp/languages","stargazers_url":"https://api.github.com/repos/aio-libs/aiohttp/stargazers","contributors_url":"https://api.github.com/repos/aio-libs/aiohttp/contributors","subscribers_url":"https://api.github.com/repos/aio-libs/aiohttp/subscribers","subscription_url":"https://api.github.com/repos/aio-libs/aiohttp/subscription","commits_url":"https://api.github.com/repos/aio-libs/aiohttp/commits{/sha}","git_commits_url":"https://api.github.com/repos/aio-libs/aiohttp/git/commits{/sha}","comments_url":"https://api.github.com/repos/aio-libs/aiohttp/comments{/number}","issue_comment_url":"https://api.github.com/repos/aio-libs/aiohttp/issues/comments{/number}","contents_url":"https://api.github.com/repos/aio-libs/aiohttp/contents/{+path}","compare_url":"https://api.github.com/repos/aio-libs/aiohttp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aio-libs/aiohttp/merges","archive_url":"https://api.github.com/repos/aio-libs/aiohttp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aio-libs/aiohttp/downloads","issues_url":"https://api.github.com/repos/aio-libs/aiohttp/issues{/number}","pulls_url":"https://api.github.com/repos/aio-libs/aiohttp/pulls{/number}","milestones_url":"https://api.github.com/repos/aio-libs/aiohttp/milestones{/number}","notifications_url":"https://api.github.com/repos/aio-libs/aiohttp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aio-libs/aiohttp/labels{/name}","releases_url":"https://api.github.com/repos/aio-libs/aiohttp/releases{/id}","deployments_url":"https://api.github.com/repos/aio-libs/aiohttp/deployments","created_at":"2013-10-01T23:04:01Z","updated_at":"2018-04-22T12:31:52Z","pushed_at":"2018-04-22T15:21:14Z","git_url":"git://github.com/aio-libs/aiohttp.git","ssh_url":"git@github.com:aio-libs/aiohttp.git","clone_url":"https://github.com/aio-libs/aiohttp.git","svn_url":"https://github.com/aio-libs/aiohttp","homepage":"http://docs.aiohttp.org","size":12350,"stargazers_count":5079,"watchers_count":5079,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":835,"mirror_url":null,"archived":false,"open_issues_count":134,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":835,"open_issues":134,"watchers":5079,"default_branch":"master"}},"base":{"label":"aio-libs:master","ref":"master","sha":"e7c11193d598fc15ff6a14964573ef583f874b58","user":{"login":"aio-libs","id":7049303,"avatar_url":"https://avatars2.githubusercontent.com/u/7049303?v=4","gravatar_id":"","url":"https://api.github.com/users/aio-libs","html_url":"https://github.com/aio-libs","followers_url":"https://api.github.com/users/aio-libs/followers","following_url":"https://api.github.com/users/aio-libs/following{/other_user}","gists_url":"https://api.github.com/users/aio-libs/gists{/gist_id}","starred_url":"https://api.github.com/users/aio-libs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aio-libs/subscriptions","organizations_url":"https://api.github.com/users/aio-libs/orgs","repos_url":"https://api.github.com/users/aio-libs/repos","events_url":"https://api.github.com/users/aio-libs/events{/privacy}","received_events_url":"https://api.github.com/users/aio-libs/received_events","type":"Organization","site_admin":false},"repo":{"id":13258039,"name":"aiohttp","full_name":"aio-libs/aiohttp","owner":{"login":"aio-libs","id":7049303,"avatar_url":"https://avatars2.githubusercontent.com/u/7049303?v=4","gravatar_id":"","url":"https://api.github.com/users/aio-libs","html_url":"https://github.com/aio-libs","followers_url":"https://api.github.com/users/aio-libs/followers","following_url":"https://api.github.com/users/aio-libs/following{/other_user}","gists_url":"https://api.github.com/users/aio-libs/gists{/gist_id}","starred_url":"https://api.github.com/users/aio-libs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aio-libs/subscriptions","organizations_url":"https://api.github.com/users/aio-libs/orgs","repos_url":"https://api.github.com/users/aio-libs/repos","events_url":"https://api.github.com/users/aio-libs/events{/privacy}","received_events_url":"https://api.github.com/users/aio-libs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aio-libs/aiohttp","description":"HTTP client/server framework for asyncio ","fork":false,"url":"https://api.github.com/repos/aio-libs/aiohttp","forks_url":"https://api.github.com/repos/aio-libs/aiohttp/forks","keys_url":"https://api.github.com/repos/aio-libs/aiohttp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aio-libs/aiohttp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aio-libs/aiohttp/teams","hooks_url":"https://api.github.com/repos/aio-libs/aiohttp/hooks","issue_events_url":"https://api.github.com/repos/aio-libs/aiohttp/issues/events{/number}","events_url":"https://api.github.com/repos/aio-libs/aiohttp/events","assignees_url":"https://api.github.com/repos/aio-libs/aiohttp/assignees{/user}","branches_url":"https://api.github.com/repos/aio-libs/aiohttp/branches{/branch}","tags_url":"https://api.github.com/repos/aio-libs/aiohttp/tags","blobs_url":"https://api.github.com/repos/aio-libs/aiohttp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aio-libs/aiohttp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aio-libs/aiohttp/git/refs{/sha}","trees_url":"https://api.github.com/repos/aio-libs/aiohttp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aio-libs/aiohttp/statuses/{sha}","languages_url":"https://api.github.com/repos/aio-libs/aiohttp/languages","stargazers_url":"https://api.github.com/repos/aio-libs/aiohttp/stargazers","contributors_url":"https://api.github.com/repos/aio-libs/aiohttp/contributors","subscribers_url":"https://api.github.com/repos/aio-libs/aiohttp/subscribers","subscription_url":"https://api.github.com/repos/aio-libs/aiohttp/subscription","commits_url":"https://api.github.com/repos/aio-libs/aiohttp/commits{/sha}","git_commits_url":"https://api.github.com/repos/aio-libs/aiohttp/git/commits{/sha}","comments_url":"https://api.github.com/repos/aio-libs/aiohttp/comments{/number}","issue_comment_url":"https://api.github.com/repos/aio-libs/aiohttp/issues/comments{/number}","contents_url":"https://api.github.com/repos/aio-libs/aiohttp/contents/{+path}","compare_url":"https://api.github.com/repos/aio-libs/aiohttp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aio-libs/aiohttp/merges","archive_url":"https://api.github.com/repos/aio-libs/aiohttp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aio-libs/aiohttp/downloads","issues_url":"https://api.github.com/repos/aio-libs/aiohttp/issues{/number}","pulls_url":"https://api.github.com/repos/aio-libs/aiohttp/pulls{/number}","milestones_url":"https://api.github.com/repos/aio-libs/aiohttp/milestones{/number}","notifications_url":"https://api.github.com/repos/aio-libs/aiohttp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aio-libs/aiohttp/labels{/name}","releases_url":"https://api.github.com/repos/aio-libs/aiohttp/releases{/id}","deployments_url":"https://api.github.com/repos/aio-libs/aiohttp/deployments","created_at":"2013-10-01T23:04:01Z","updated_at":"2018-04-22T12:31:52Z","pushed_at":"2018-04-22T15:21:14Z","git_url":"git://github.com/aio-libs/aiohttp.git","ssh_url":"git@github.com:aio-libs/aiohttp.git","clone_url":"https://github.com/aio-libs/aiohttp.git","svn_url":"https://github.com/aio-libs/aiohttp","homepage":"http://docs.aiohttp.org","size":12350,"stargazers_count":5079,"watchers_count":5079,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":835,"mirror_url":null,"archived":false,"open_issues_count":134,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":835,"open_issues":134,"watchers":5079,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aio-libs/aiohttp/pulls/2949"},"html":{"href":"https://github.com/aio-libs/aiohttp/pull/2949"},"issue":{"href":"https://api.github.com/repos/aio-libs/aiohttp/issues/2949"},"comments":{"href":"https://api.github.com/repos/aio-libs/aiohttp/issues/2949/comments"},"review_comments":{"href":"https://api.github.com/repos/aio-libs/aiohttp/pulls/2949/comments"},"review_comment":{"href":"https://api.github.com/repos/aio-libs/aiohttp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aio-libs/aiohttp/pulls/2949/commits"},"statuses":{"href":"https://api.github.com/repos/aio-libs/aiohttp/statuses/801419d46ffb92c7c81867342d5f0f8ef9caf2b2"}},"author_association":"OWNER"}}
{"actor":{"display_login":"kxepal"}}