{"action":"created","comment":{"url":"https://api.github.com/repos/boto/boto3/pulls/comments/39305129","id":39305129,"diff_hunk":"@@ -194,6 +194,17 @@ def _load_waiters(self, attrs, model):\n         for waiter in model.waiters:\n             attrs[waiter.name] = self._create_waiter(waiter)\n \n+    def _create_identifier(factory_self, name):\n+        \"\"\"\n+        Creates a read-only property for identifier attributes.\n+        \"\"\"\n+        def identifier(self):\n+            return getattr(self, '_' + name, None)","path":"boto3/resources/factory.py","position":18,"original_position":18,"commit_id":"d17938fc4820f535c121ecc34324f6d952941be9","original_commit_id":"d17938fc4820f535c121ecc34324f6d952941be9","user":{"login":"jamesls","id":368057,"avatar_url":"https://avatars.githubusercontent.com/u/368057?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesls","html_url":"https://github.com/jamesls","followers_url":"https://api.github.com/users/jamesls/followers","following_url":"https://api.github.com/users/jamesls/following{/other_user}","gists_url":"https://api.github.com/users/jamesls/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesls/subscriptions","organizations_url":"https://api.github.com/users/jamesls/orgs","repos_url":"https://api.github.com/users/jamesls/repos","events_url":"https://api.github.com/users/jamesls/events{/privacy}","received_events_url":"https://api.github.com/users/jamesls/received_events","type":"User","site_admin":false},"body":"Should we be returning `None` if the internal attr doesn't exist?  Seems like that would only happen if we had a bug, in which case we'd want it to fail loudly.","created_at":"2015-09-11T19:00:23Z","updated_at":"2015-09-11T19:00:23Z","html_url":"https://github.com/boto/boto3/pull/246#discussion_r39305129","pull_request_url":"https://api.github.com/repos/boto/boto3/pulls/246","_links":{"self":{"href":"https://api.github.com/repos/boto/boto3/pulls/comments/39305129"},"html":{"href":"https://github.com/boto/boto3/pull/246#discussion_r39305129"},"pull_request":{"href":"https://api.github.com/repos/boto/boto3/pulls/246"}}},"pull_request":{"url":"https://api.github.com/repos/boto/boto3/pulls/246","id":44268925,"html_url":"https://github.com/boto/boto3/pull/246","diff_url":"https://github.com/boto/boto3/pull/246.diff","patch_url":"https://github.com/boto/boto3/pull/246.patch","issue_url":"https://api.github.com/repos/boto/boto3/issues/246","number":246,"state":"open","locked":false,"title":"Make resource identifiers immutable","user":{"login":"kyleknap","id":4605355,"avatar_url":"https://avatars.githubusercontent.com/u/4605355?v=3","gravatar_id":"","url":"https://api.github.com/users/kyleknap","html_url":"https://github.com/kyleknap","followers_url":"https://api.github.com/users/kyleknap/followers","following_url":"https://api.github.com/users/kyleknap/following{/other_user}","gists_url":"https://api.github.com/users/kyleknap/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleknap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleknap/subscriptions","organizations_url":"https://api.github.com/users/kyleknap/orgs","repos_url":"https://api.github.com/users/kyleknap/repos","events_url":"https://api.github.com/users/kyleknap/events{/privacy}","received_events_url":"https://api.github.com/users/kyleknap/received_events","type":"User","site_admin":false},"body":"Before you could switch out the identifiers on a resource, which can have unintended affects if you switch the identifier and then make subsequent calls with the resource. Now identifiers are read-only, much like how attributes are read-only:\r\n```py\r\nIn [1]: import boto3\r\n\r\nIn [2]: s3 = boto3.resource('s3')\r\n\r\nIn [3]: bucket = s3.Bucket('mybucketfoo')\r\n\r\nIn [4]: bucket.name = 'foo'\r\n---------------------------------------------------------------------------\r\nAttributeError                            Traceback (most recent call last)\r\n<ipython-input-4-5d85c15550cd> in <module>()\r\n----> 1 bucket.name = 'foo'\r\n\r\nAttributeError: can't set attribute\r\n\r\n```\r\n\r\ncc @jamesls @mtdowling @rayluo ","created_at":"2015-09-04T22:57:40Z","updated_at":"2015-09-11T19:00:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"47173b8a2d451a463d42511467884d0a1ff5b271","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/boto/boto3/pulls/246/commits","review_comments_url":"https://api.github.com/repos/boto/boto3/pulls/246/comments","review_comment_url":"https://api.github.com/repos/boto/boto3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/boto/boto3/issues/246/comments","statuses_url":"https://api.github.com/repos/boto/boto3/statuses/d17938fc4820f535c121ecc34324f6d952941be9","head":{"label":"kyleknap:immutable-identifier","ref":"immutable-identifier","sha":"d17938fc4820f535c121ecc34324f6d952941be9","user":{"login":"kyleknap","id":4605355,"avatar_url":"https://avatars.githubusercontent.com/u/4605355?v=3","gravatar_id":"","url":"https://api.github.com/users/kyleknap","html_url":"https://github.com/kyleknap","followers_url":"https://api.github.com/users/kyleknap/followers","following_url":"https://api.github.com/users/kyleknap/following{/other_user}","gists_url":"https://api.github.com/users/kyleknap/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleknap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleknap/subscriptions","organizations_url":"https://api.github.com/users/kyleknap/orgs","repos_url":"https://api.github.com/users/kyleknap/repos","events_url":"https://api.github.com/users/kyleknap/events{/privacy}","received_events_url":"https://api.github.com/users/kyleknap/received_events","type":"User","site_admin":false},"repo":{"id":27099187,"name":"boto3","full_name":"kyleknap/boto3","owner":{"login":"kyleknap","id":4605355,"avatar_url":"https://avatars.githubusercontent.com/u/4605355?v=3","gravatar_id":"","url":"https://api.github.com/users/kyleknap","html_url":"https://github.com/kyleknap","followers_url":"https://api.github.com/users/kyleknap/followers","following_url":"https://api.github.com/users/kyleknap/following{/other_user}","gists_url":"https://api.github.com/users/kyleknap/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleknap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleknap/subscriptions","organizations_url":"https://api.github.com/users/kyleknap/orgs","repos_url":"https://api.github.com/users/kyleknap/repos","events_url":"https://api.github.com/users/kyleknap/events{/privacy}","received_events_url":"https://api.github.com/users/kyleknap/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kyleknap/boto3","description":"**Developer Preview** AWS SDK for Python","fork":true,"url":"https://api.github.com/repos/kyleknap/boto3","forks_url":"https://api.github.com/repos/kyleknap/boto3/forks","keys_url":"https://api.github.com/repos/kyleknap/boto3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kyleknap/boto3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kyleknap/boto3/teams","hooks_url":"https://api.github.com/repos/kyleknap/boto3/hooks","issue_events_url":"https://api.github.com/repos/kyleknap/boto3/issues/events{/number}","events_url":"https://api.github.com/repos/kyleknap/boto3/events","assignees_url":"https://api.github.com/repos/kyleknap/boto3/assignees{/user}","branches_url":"https://api.github.com/repos/kyleknap/boto3/branches{/branch}","tags_url":"https://api.github.com/repos/kyleknap/boto3/tags","blobs_url":"https://api.github.com/repos/kyleknap/boto3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kyleknap/boto3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kyleknap/boto3/git/refs{/sha}","trees_url":"https://api.github.com/repos/kyleknap/boto3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kyleknap/boto3/statuses/{sha}","languages_url":"https://api.github.com/repos/kyleknap/boto3/languages","stargazers_url":"https://api.github.com/repos/kyleknap/boto3/stargazers","contributors_url":"https://api.github.com/repos/kyleknap/boto3/contributors","subscribers_url":"https://api.github.com/repos/kyleknap/boto3/subscribers","subscription_url":"https://api.github.com/repos/kyleknap/boto3/subscription","commits_url":"https://api.github.com/repos/kyleknap/boto3/commits{/sha}","git_commits_url":"https://api.github.com/repos/kyleknap/boto3/git/commits{/sha}","comments_url":"https://api.github.com/repos/kyleknap/boto3/comments{/number}","issue_comment_url":"https://api.github.com/repos/kyleknap/boto3/issues/comments{/number}","contents_url":"https://api.github.com/repos/kyleknap/boto3/contents/{+path}","compare_url":"https://api.github.com/repos/kyleknap/boto3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kyleknap/boto3/merges","archive_url":"https://api.github.com/repos/kyleknap/boto3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kyleknap/boto3/downloads","issues_url":"https://api.github.com/repos/kyleknap/boto3/issues{/number}","pulls_url":"https://api.github.com/repos/kyleknap/boto3/pulls{/number}","milestones_url":"https://api.github.com/repos/kyleknap/boto3/milestones{/number}","notifications_url":"https://api.github.com/repos/kyleknap/boto3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kyleknap/boto3/labels{/name}","releases_url":"https://api.github.com/repos/kyleknap/boto3/releases{/id}","created_at":"2014-11-24T22:59:31Z","updated_at":"2015-05-07T22:01:00Z","pushed_at":"2015-09-04T22:59:46Z","git_url":"git://github.com/kyleknap/boto3.git","ssh_url":"git@github.com:kyleknap/boto3.git","clone_url":"https://github.com/kyleknap/boto3.git","svn_url":"https://github.com/kyleknap/boto3","homepage":"http://aws.amazon.com/sdk-for-python/","size":945,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"boto:develop","ref":"develop","sha":"314104da31ab09825d4d1d9289977b431ffa6048","user":{"login":"boto","id":327752,"avatar_url":"https://avatars.githubusercontent.com/u/327752?v=3","gravatar_id":"","url":"https://api.github.com/users/boto","html_url":"https://github.com/boto","followers_url":"https://api.github.com/users/boto/followers","following_url":"https://api.github.com/users/boto/following{/other_user}","gists_url":"https://api.github.com/users/boto/gists{/gist_id}","starred_url":"https://api.github.com/users/boto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boto/subscriptions","organizations_url":"https://api.github.com/users/boto/orgs","repos_url":"https://api.github.com/users/boto/repos","events_url":"https://api.github.com/users/boto/events{/privacy}","received_events_url":"https://api.github.com/users/boto/received_events","type":"Organization","site_admin":false},"repo":{"id":24774658,"name":"boto3","full_name":"boto/boto3","owner":{"login":"boto","id":327752,"avatar_url":"https://avatars.githubusercontent.com/u/327752?v=3","gravatar_id":"","url":"https://api.github.com/users/boto","html_url":"https://github.com/boto","followers_url":"https://api.github.com/users/boto/followers","following_url":"https://api.github.com/users/boto/following{/other_user}","gists_url":"https://api.github.com/users/boto/gists{/gist_id}","starred_url":"https://api.github.com/users/boto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boto/subscriptions","organizations_url":"https://api.github.com/users/boto/orgs","repos_url":"https://api.github.com/users/boto/repos","events_url":"https://api.github.com/users/boto/events{/privacy}","received_events_url":"https://api.github.com/users/boto/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/boto/boto3","description":"AWS SDK for Python","fork":false,"url":"https://api.github.com/repos/boto/boto3","forks_url":"https://api.github.com/repos/boto/boto3/forks","keys_url":"https://api.github.com/repos/boto/boto3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/boto/boto3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/boto/boto3/teams","hooks_url":"https://api.github.com/repos/boto/boto3/hooks","issue_events_url":"https://api.github.com/repos/boto/boto3/issues/events{/number}","events_url":"https://api.github.com/repos/boto/boto3/events","assignees_url":"https://api.github.com/repos/boto/boto3/assignees{/user}","branches_url":"https://api.github.com/repos/boto/boto3/branches{/branch}","tags_url":"https://api.github.com/repos/boto/boto3/tags","blobs_url":"https://api.github.com/repos/boto/boto3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/boto/boto3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/boto/boto3/git/refs{/sha}","trees_url":"https://api.github.com/repos/boto/boto3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/boto/boto3/statuses/{sha}","languages_url":"https://api.github.com/repos/boto/boto3/languages","stargazers_url":"https://api.github.com/repos/boto/boto3/stargazers","contributors_url":"https://api.github.com/repos/boto/boto3/contributors","subscribers_url":"https://api.github.com/repos/boto/boto3/subscribers","subscription_url":"https://api.github.com/repos/boto/boto3/subscription","commits_url":"https://api.github.com/repos/boto/boto3/commits{/sha}","git_commits_url":"https://api.github.com/repos/boto/boto3/git/commits{/sha}","comments_url":"https://api.github.com/repos/boto/boto3/comments{/number}","issue_comment_url":"https://api.github.com/repos/boto/boto3/issues/comments{/number}","contents_url":"https://api.github.com/repos/boto/boto3/contents/{+path}","compare_url":"https://api.github.com/repos/boto/boto3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/boto/boto3/merges","archive_url":"https://api.github.com/repos/boto/boto3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/boto/boto3/downloads","issues_url":"https://api.github.com/repos/boto/boto3/issues{/number}","pulls_url":"https://api.github.com/repos/boto/boto3/pulls{/number}","milestones_url":"https://api.github.com/repos/boto/boto3/milestones{/number}","notifications_url":"https://api.github.com/repos/boto/boto3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/boto/boto3/labels{/name}","releases_url":"https://api.github.com/repos/boto/boto3/releases{/id}","created_at":"2014-10-03T21:38:03Z","updated_at":"2015-09-11T17:41:15Z","pushed_at":"2015-09-08T17:57:14Z","git_url":"git://github.com/boto/boto3.git","ssh_url":"git@github.com:boto/boto3.git","clone_url":"https://github.com/boto/boto3.git","svn_url":"https://github.com/boto/boto3","homepage":"http://aws.amazon.com/sdk-for-python/","size":2256,"stargazers_count":424,"watchers_count":424,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":68,"mirror_url":null,"open_issues_count":44,"forks":68,"open_issues":44,"watchers":424,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/boto/boto3/pulls/246"},"html":{"href":"https://github.com/boto/boto3/pull/246"},"issue":{"href":"https://api.github.com/repos/boto/boto3/issues/246"},"comments":{"href":"https://api.github.com/repos/boto/boto3/issues/246/comments"},"review_comments":{"href":"https://api.github.com/repos/boto/boto3/pulls/246/comments"},"review_comment":{"href":"https://api.github.com/repos/boto/boto3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/boto/boto3/pulls/246/commits"},"statuses":{"href":"https://api.github.com/repos/boto/boto3/statuses/d17938fc4820f535c121ecc34324f6d952941be9"}}}}