{"action":"created","comment":{"url":"https://api.github.com/repos/python/cpython/pulls/comments/193918661","pull_request_review_id":126992591,"id":193918661,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MzkxODY2MQ==","diff_hunk":"@@ -984,6 +1061,7 @@ mbiencoder_dealloc(MultibyteIncrementalEncoderObject *self)\n {\n     PyObject_GC_UnTrack(self);\n     ERROR_DECREF(self->errors);\n+    Py_CLEAR(self->pending);","path":"Modules/cjkcodecs/multibytecodec.c","position":102,"original_position":102,"commit_id":"3c18d614981880c1c67cda61554a526406f05bc4","original_commit_id":"3c18d614981880c1c67cda61554a526406f05bc4","user":{"login":"libcthorne","id":10205039,"node_id":"MDQ6VXNlcjEwMjA1MDM5","avatar_url":"https://avatars1.githubusercontent.com/u/10205039?v=4","gravatar_id":"","url":"https://api.github.com/users/libcthorne","html_url":"https://github.com/libcthorne","followers_url":"https://api.github.com/users/libcthorne/followers","following_url":"https://api.github.com/users/libcthorne/following{/other_user}","gists_url":"https://api.github.com/users/libcthorne/gists{/gist_id}","starred_url":"https://api.github.com/users/libcthorne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libcthorne/subscriptions","organizations_url":"https://api.github.com/users/libcthorne/orgs","repos_url":"https://api.github.com/users/libcthorne/repos","events_url":"https://api.github.com/users/libcthorne/events{/privacy}","received_events_url":"https://api.github.com/users/libcthorne/received_events","type":"User","site_admin":false},"body":"I think this is necessary for the case where the encoder gets garbage collected while there are still pending bytes. I'm not sure why it wasn't here before though...","created_at":"2018-06-07T23:39:16Z","updated_at":"2018-06-07T23:39:16Z","html_url":"https://github.com/python/cpython/pull/6984#discussion_r193918661","pull_request_url":"https://api.github.com/repos/python/cpython/pulls/6984","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/python/cpython/pulls/comments/193918661"},"html":{"href":"https://github.com/python/cpython/pull/6984#discussion_r193918661"},"pull_request":{"href":"https://api.github.com/repos/python/cpython/pulls/6984"}}},"pull_request":{"url":"https://api.github.com/repos/python/cpython/pulls/6984","id":189175051,"node_id":"MDExOlB1bGxSZXF1ZXN0MTg5MTc1MDUx","html_url":"https://github.com/python/cpython/pull/6984","diff_url":"https://github.com/python/cpython/pull/6984.diff","patch_url":"https://github.com/python/cpython/pull/6984.patch","issue_url":"https://api.github.com/repos/python/cpython/issues/6984","number":6984,"state":"open","locked":false,"title":"bpo-33578: Implement multibyte encoder/decoder state methods","user":{"login":"libcthorne","id":10205039,"node_id":"MDQ6VXNlcjEwMjA1MDM5","avatar_url":"https://avatars1.githubusercontent.com/u/10205039?v=4","gravatar_id":"","url":"https://api.github.com/users/libcthorne","html_url":"https://github.com/libcthorne","followers_url":"https://api.github.com/users/libcthorne/followers","following_url":"https://api.github.com/users/libcthorne/following{/other_user}","gists_url":"https://api.github.com/users/libcthorne/gists{/gist_id}","starred_url":"https://api.github.com/users/libcthorne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libcthorne/subscriptions","organizations_url":"https://api.github.com/users/libcthorne/orgs","repos_url":"https://api.github.com/users/libcthorne/repos","events_url":"https://api.github.com/users/libcthorne/events{/privacy}","received_events_url":"https://api.github.com/users/libcthorne/received_events","type":"User","site_admin":false},"body":"This implements getstate and setstate for the cjkcodecs multibyte incremental encoders/decoders, primarily to fix issues with seek/tell.\r\n\r\nThe encoder getstate/setstate is slightly tricky as the \"state\" is pending bytes + MultibyteCodec_State but only an integer can be returned. The approach I've taken is to encode this data into a long, similar to how .tell() encodes a \"cookie_type\" as a long.\r\n\r\nThis is my first PR here, so please let me know if I've messed anything up. Thanks.\r\n\r\n<!-- issue-number: bpo-33578 -->\r\nhttps://bugs.python.org/issue33578\r\n<!-- /issue-number -->\r\n","created_at":"2018-05-19T07:06:56Z","updated_at":"2018-06-07T23:39:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fd82e33dba173debe8c81002e6c3f858ed289a1b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":536945472,"node_id":"MDU6TGFiZWw1MzY5NDU0NzI=","url":"https://api.github.com/repos/python/cpython/labels/CLA%20signed","name":"CLA signed","color":"0e8a16","default":false},{"id":666979871,"node_id":"MDU6TGFiZWw2NjY5Nzk4NzE=","url":"https://api.github.com/repos/python/cpython/labels/awaiting%20core%20review","name":"awaiting core review","color":"fbca04","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/python/cpython/pulls/6984/commits","review_comments_url":"https://api.github.com/repos/python/cpython/pulls/6984/comments","review_comment_url":"https://api.github.com/repos/python/cpython/pulls/comments{/number}","comments_url":"https://api.github.com/repos/python/cpython/issues/6984/comments","statuses_url":"https://api.github.com/repos/python/cpython/statuses/3c18d614981880c1c67cda61554a526406f05bc4","head":{"label":"libcthorne:fix-multibyte-state","ref":"fix-multibyte-state","sha":"3c18d614981880c1c67cda61554a526406f05bc4","user":{"login":"libcthorne","id":10205039,"node_id":"MDQ6VXNlcjEwMjA1MDM5","avatar_url":"https://avatars1.githubusercontent.com/u/10205039?v=4","gravatar_id":"","url":"https://api.github.com/users/libcthorne","html_url":"https://github.com/libcthorne","followers_url":"https://api.github.com/users/libcthorne/followers","following_url":"https://api.github.com/users/libcthorne/following{/other_user}","gists_url":"https://api.github.com/users/libcthorne/gists{/gist_id}","starred_url":"https://api.github.com/users/libcthorne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libcthorne/subscriptions","organizations_url":"https://api.github.com/users/libcthorne/orgs","repos_url":"https://api.github.com/users/libcthorne/repos","events_url":"https://api.github.com/users/libcthorne/events{/privacy}","received_events_url":"https://api.github.com/users/libcthorne/received_events","type":"User","site_admin":false},"repo":{"id":107049857,"node_id":"MDEwOlJlcG9zaXRvcnkxMDcwNDk4NTc=","name":"cpython","full_name":"libcthorne/cpython","owner":{"login":"libcthorne","id":10205039,"node_id":"MDQ6VXNlcjEwMjA1MDM5","avatar_url":"https://avatars1.githubusercontent.com/u/10205039?v=4","gravatar_id":"","url":"https://api.github.com/users/libcthorne","html_url":"https://github.com/libcthorne","followers_url":"https://api.github.com/users/libcthorne/followers","following_url":"https://api.github.com/users/libcthorne/following{/other_user}","gists_url":"https://api.github.com/users/libcthorne/gists{/gist_id}","starred_url":"https://api.github.com/users/libcthorne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libcthorne/subscriptions","organizations_url":"https://api.github.com/users/libcthorne/orgs","repos_url":"https://api.github.com/users/libcthorne/repos","events_url":"https://api.github.com/users/libcthorne/events{/privacy}","received_events_url":"https://api.github.com/users/libcthorne/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/libcthorne/cpython","description":"The Python programming language","fork":true,"url":"https://api.github.com/repos/libcthorne/cpython","forks_url":"https://api.github.com/repos/libcthorne/cpython/forks","keys_url":"https://api.github.com/repos/libcthorne/cpython/keys{/key_id}","collaborators_url":"https://api.github.com/repos/libcthorne/cpython/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/libcthorne/cpython/teams","hooks_url":"https://api.github.com/repos/libcthorne/cpython/hooks","issue_events_url":"https://api.github.com/repos/libcthorne/cpython/issues/events{/number}","events_url":"https://api.github.com/repos/libcthorne/cpython/events","assignees_url":"https://api.github.com/repos/libcthorne/cpython/assignees{/user}","branches_url":"https://api.github.com/repos/libcthorne/cpython/branches{/branch}","tags_url":"https://api.github.com/repos/libcthorne/cpython/tags","blobs_url":"https://api.github.com/repos/libcthorne/cpython/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/libcthorne/cpython/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/libcthorne/cpython/git/refs{/sha}","trees_url":"https://api.github.com/repos/libcthorne/cpython/git/trees{/sha}","statuses_url":"https://api.github.com/repos/libcthorne/cpython/statuses/{sha}","languages_url":"https://api.github.com/repos/libcthorne/cpython/languages","stargazers_url":"https://api.github.com/repos/libcthorne/cpython/stargazers","contributors_url":"https://api.github.com/repos/libcthorne/cpython/contributors","subscribers_url":"https://api.github.com/repos/libcthorne/cpython/subscribers","subscription_url":"https://api.github.com/repos/libcthorne/cpython/subscription","commits_url":"https://api.github.com/repos/libcthorne/cpython/commits{/sha}","git_commits_url":"https://api.github.com/repos/libcthorne/cpython/git/commits{/sha}","comments_url":"https://api.github.com/repos/libcthorne/cpython/comments{/number}","issue_comment_url":"https://api.github.com/repos/libcthorne/cpython/issues/comments{/number}","contents_url":"https://api.github.com/repos/libcthorne/cpython/contents/{+path}","compare_url":"https://api.github.com/repos/libcthorne/cpython/compare/{base}...{head}","merges_url":"https://api.github.com/repos/libcthorne/cpython/merges","archive_url":"https://api.github.com/repos/libcthorne/cpython/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/libcthorne/cpython/downloads","issues_url":"https://api.github.com/repos/libcthorne/cpython/issues{/number}","pulls_url":"https://api.github.com/repos/libcthorne/cpython/pulls{/number}","milestones_url":"https://api.github.com/repos/libcthorne/cpython/milestones{/number}","notifications_url":"https://api.github.com/repos/libcthorne/cpython/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/libcthorne/cpython/labels{/name}","releases_url":"https://api.github.com/repos/libcthorne/cpython/releases{/id}","deployments_url":"https://api.github.com/repos/libcthorne/cpython/deployments","created_at":"2017-10-15T21:17:49Z","updated_at":"2018-05-12T14:17:19Z","pushed_at":"2018-06-07T23:30:17Z","git_url":"git://github.com/libcthorne/cpython.git","ssh_url":"git@github.com:libcthorne/cpython.git","clone_url":"https://github.com/libcthorne/cpython.git","svn_url":"https://github.com/libcthorne/cpython","homepage":"https://www.python.org/","size":231960,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"python:master","ref":"master","sha":"bed523ba03c4525c9c79a6df700284b6c43024b3","user":{"login":"python","id":1525981,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MjU5ODE=","avatar_url":"https://avatars3.githubusercontent.com/u/1525981?v=4","gravatar_id":"","url":"https://api.github.com/users/python","html_url":"https://github.com/python","followers_url":"https://api.github.com/users/python/followers","following_url":"https://api.github.com/users/python/following{/other_user}","gists_url":"https://api.github.com/users/python/gists{/gist_id}","starred_url":"https://api.github.com/users/python/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/python/subscriptions","organizations_url":"https://api.github.com/users/python/orgs","repos_url":"https://api.github.com/users/python/repos","events_url":"https://api.github.com/users/python/events{/privacy}","received_events_url":"https://api.github.com/users/python/received_events","type":"Organization","site_admin":false},"repo":{"id":81598961,"node_id":"MDEwOlJlcG9zaXRvcnk4MTU5ODk2MQ==","name":"cpython","full_name":"python/cpython","owner":{"login":"python","id":1525981,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MjU5ODE=","avatar_url":"https://avatars3.githubusercontent.com/u/1525981?v=4","gravatar_id":"","url":"https://api.github.com/users/python","html_url":"https://github.com/python","followers_url":"https://api.github.com/users/python/followers","following_url":"https://api.github.com/users/python/following{/other_user}","gists_url":"https://api.github.com/users/python/gists{/gist_id}","starred_url":"https://api.github.com/users/python/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/python/subscriptions","organizations_url":"https://api.github.com/users/python/orgs","repos_url":"https://api.github.com/users/python/repos","events_url":"https://api.github.com/users/python/events{/privacy}","received_events_url":"https://api.github.com/users/python/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/python/cpython","description":"The Python programming language","fork":false,"url":"https://api.github.com/repos/python/cpython","forks_url":"https://api.github.com/repos/python/cpython/forks","keys_url":"https://api.github.com/repos/python/cpython/keys{/key_id}","collaborators_url":"https://api.github.com/repos/python/cpython/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/python/cpython/teams","hooks_url":"https://api.github.com/repos/python/cpython/hooks","issue_events_url":"https://api.github.com/repos/python/cpython/issues/events{/number}","events_url":"https://api.github.com/repos/python/cpython/events","assignees_url":"https://api.github.com/repos/python/cpython/assignees{/user}","branches_url":"https://api.github.com/repos/python/cpython/branches{/branch}","tags_url":"https://api.github.com/repos/python/cpython/tags","blobs_url":"https://api.github.com/repos/python/cpython/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/python/cpython/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/python/cpython/git/refs{/sha}","trees_url":"https://api.github.com/repos/python/cpython/git/trees{/sha}","statuses_url":"https://api.github.com/repos/python/cpython/statuses/{sha}","languages_url":"https://api.github.com/repos/python/cpython/languages","stargazers_url":"https://api.github.com/repos/python/cpython/stargazers","contributors_url":"https://api.github.com/repos/python/cpython/contributors","subscribers_url":"https://api.github.com/repos/python/cpython/subscribers","subscription_url":"https://api.github.com/repos/python/cpython/subscription","commits_url":"https://api.github.com/repos/python/cpython/commits{/sha}","git_commits_url":"https://api.github.com/repos/python/cpython/git/commits{/sha}","comments_url":"https://api.github.com/repos/python/cpython/comments{/number}","issue_comment_url":"https://api.github.com/repos/python/cpython/issues/comments{/number}","contents_url":"https://api.github.com/repos/python/cpython/contents/{+path}","compare_url":"https://api.github.com/repos/python/cpython/compare/{base}...{head}","merges_url":"https://api.github.com/repos/python/cpython/merges","archive_url":"https://api.github.com/repos/python/cpython/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/python/cpython/downloads","issues_url":"https://api.github.com/repos/python/cpython/issues{/number}","pulls_url":"https://api.github.com/repos/python/cpython/pulls{/number}","milestones_url":"https://api.github.com/repos/python/cpython/milestones{/number}","notifications_url":"https://api.github.com/repos/python/cpython/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/python/cpython/labels{/name}","releases_url":"https://api.github.com/repos/python/cpython/releases{/id}","deployments_url":"https://api.github.com/repos/python/cpython/deployments","created_at":"2017-02-10T19:23:51Z","updated_at":"2018-06-07T23:29:46Z","pushed_at":"2018-06-07T23:34:13Z","git_url":"git://github.com/python/cpython.git","ssh_url":"git@github.com:python/cpython.git","clone_url":"https://github.com/python/cpython.git","svn_url":"https://github.com/python/cpython","homepage":"https://www.python.org/","size":239519,"stargazers_count":18034,"watchers_count":18034,"language":"Python","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5598,"mirror_url":null,"archived":false,"open_issues_count":727,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":5598,"open_issues":727,"watchers":18034,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/python/cpython/pulls/6984"},"html":{"href":"https://github.com/python/cpython/pull/6984"},"issue":{"href":"https://api.github.com/repos/python/cpython/issues/6984"},"comments":{"href":"https://api.github.com/repos/python/cpython/issues/6984/comments"},"review_comments":{"href":"https://api.github.com/repos/python/cpython/pulls/6984/comments"},"review_comment":{"href":"https://api.github.com/repos/python/cpython/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/python/cpython/pulls/6984/commits"},"statuses":{"href":"https://api.github.com/repos/python/cpython/statuses/3c18d614981880c1c67cda61554a526406f05bc4"}},"author_association":"NONE"}}
{"actor":{"display_login":"libcthorne"}}