{"action":"opened","number":2187,"pull_request":{"url":"https://api.github.com/repos/nltk/nltk/pulls/2187","id":232836849,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMyODM2ODQ5","html_url":"https://github.com/nltk/nltk/pull/2187","diff_url":"https://github.com/nltk/nltk/pull/2187.diff","patch_url":"https://github.com/nltk/nltk/pull/2187.patch","issue_url":"https://api.github.com/repos/nltk/nltk/issues/2187","number":2187,"state":"open","locked":false,"title":"add guards to next() calls in punkt.py","user":{"login":"purificant","id":4669013,"node_id":"MDQ6VXNlcjQ2NjkwMTM=","avatar_url":"https://avatars2.githubusercontent.com/u/4669013?v=4","gravatar_id":"","url":"https://api.github.com/users/purificant","html_url":"https://github.com/purificant","followers_url":"https://api.github.com/users/purificant/followers","following_url":"https://api.github.com/users/purificant/following{/other_user}","gists_url":"https://api.github.com/users/purificant/gists{/gist_id}","starred_url":"https://api.github.com/users/purificant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/purificant/subscriptions","organizations_url":"https://api.github.com/users/purificant/orgs","repos_url":"https://api.github.com/users/purificant/repos","events_url":"https://api.github.com/users/purificant/events{/privacy}","received_events_url":"https://api.github.com/users/purificant/received_events","type":"User","site_admin":false},"body":"This PR addresses another instance of https://github.com/nltk/nltk/issues/2148, except that due to the nature of the code, `RuntimeError` should only occur on empty / specially crafted input, which is why no errors have showed up in tests.\r\n\r\nThe PR adds guards around next() calls in generators as suggested in [PEP 479 section on backwards and forwards compatible code](https://www.python.org/dev/peps/pep-0479/#writing-backwards-and-forwards-compatible-code).","created_at":"2018-11-22T01:33:10Z","updated_at":"2018-11-22T01:33:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/nltk/nltk/pulls/2187/commits","review_comments_url":"https://api.github.com/repos/nltk/nltk/pulls/2187/comments","review_comment_url":"https://api.github.com/repos/nltk/nltk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nltk/nltk/issues/2187/comments","statuses_url":"https://api.github.com/repos/nltk/nltk/statuses/514045c299fee9a019b779436d9111368ee531ad","head":{"label":"purificant:punkt_unguarded_next","ref":"punkt_unguarded_next","sha":"514045c299fee9a019b779436d9111368ee531ad","user":{"login":"purificant","id":4669013,"node_id":"MDQ6VXNlcjQ2NjkwMTM=","avatar_url":"https://avatars2.githubusercontent.com/u/4669013?v=4","gravatar_id":"","url":"https://api.github.com/users/purificant","html_url":"https://github.com/purificant","followers_url":"https://api.github.com/users/purificant/followers","following_url":"https://api.github.com/users/purificant/following{/other_user}","gists_url":"https://api.github.com/users/purificant/gists{/gist_id}","starred_url":"https://api.github.com/users/purificant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/purificant/subscriptions","organizations_url":"https://api.github.com/users/purificant/orgs","repos_url":"https://api.github.com/users/purificant/repos","events_url":"https://api.github.com/users/purificant/events{/privacy}","received_events_url":"https://api.github.com/users/purificant/received_events","type":"User","site_admin":false},"repo":{"id":91194879,"node_id":"MDEwOlJlcG9zaXRvcnk5MTE5NDg3OQ==","name":"nltk","full_name":"purificant/nltk","private":false,"owner":{"login":"purificant","id":4669013,"node_id":"MDQ6VXNlcjQ2NjkwMTM=","avatar_url":"https://avatars2.githubusercontent.com/u/4669013?v=4","gravatar_id":"","url":"https://api.github.com/users/purificant","html_url":"https://github.com/purificant","followers_url":"https://api.github.com/users/purificant/followers","following_url":"https://api.github.com/users/purificant/following{/other_user}","gists_url":"https://api.github.com/users/purificant/gists{/gist_id}","starred_url":"https://api.github.com/users/purificant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/purificant/subscriptions","organizations_url":"https://api.github.com/users/purificant/orgs","repos_url":"https://api.github.com/users/purificant/repos","events_url":"https://api.github.com/users/purificant/events{/privacy}","received_events_url":"https://api.github.com/users/purificant/received_events","type":"User","site_admin":false},"html_url":"https://github.com/purificant/nltk","description":"NLTK Source","fork":true,"url":"https://api.github.com/repos/purificant/nltk","forks_url":"https://api.github.com/repos/purificant/nltk/forks","keys_url":"https://api.github.com/repos/purificant/nltk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/purificant/nltk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/purificant/nltk/teams","hooks_url":"https://api.github.com/repos/purificant/nltk/hooks","issue_events_url":"https://api.github.com/repos/purificant/nltk/issues/events{/number}","events_url":"https://api.github.com/repos/purificant/nltk/events","assignees_url":"https://api.github.com/repos/purificant/nltk/assignees{/user}","branches_url":"https://api.github.com/repos/purificant/nltk/branches{/branch}","tags_url":"https://api.github.com/repos/purificant/nltk/tags","blobs_url":"https://api.github.com/repos/purificant/nltk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/purificant/nltk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/purificant/nltk/git/refs{/sha}","trees_url":"https://api.github.com/repos/purificant/nltk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/purificant/nltk/statuses/{sha}","languages_url":"https://api.github.com/repos/purificant/nltk/languages","stargazers_url":"https://api.github.com/repos/purificant/nltk/stargazers","contributors_url":"https://api.github.com/repos/purificant/nltk/contributors","subscribers_url":"https://api.github.com/repos/purificant/nltk/subscribers","subscription_url":"https://api.github.com/repos/purificant/nltk/subscription","commits_url":"https://api.github.com/repos/purificant/nltk/commits{/sha}","git_commits_url":"https://api.github.com/repos/purificant/nltk/git/commits{/sha}","comments_url":"https://api.github.com/repos/purificant/nltk/comments{/number}","issue_comment_url":"https://api.github.com/repos/purificant/nltk/issues/comments{/number}","contents_url":"https://api.github.com/repos/purificant/nltk/contents/{+path}","compare_url":"https://api.github.com/repos/purificant/nltk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/purificant/nltk/merges","archive_url":"https://api.github.com/repos/purificant/nltk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/purificant/nltk/downloads","issues_url":"https://api.github.com/repos/purificant/nltk/issues{/number}","pulls_url":"https://api.github.com/repos/purificant/nltk/pulls{/number}","milestones_url":"https://api.github.com/repos/purificant/nltk/milestones{/number}","notifications_url":"https://api.github.com/repos/purificant/nltk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/purificant/nltk/labels{/name}","releases_url":"https://api.github.com/repos/purificant/nltk/releases{/id}","deployments_url":"https://api.github.com/repos/purificant/nltk/deployments","created_at":"2017-05-13T18:28:15Z","updated_at":"2018-11-22T00:39:37Z","pushed_at":"2018-11-22T01:24:03Z","git_url":"git://github.com/purificant/nltk.git","ssh_url":"git@github.com:purificant/nltk.git","clone_url":"https://github.com/purificant/nltk.git","svn_url":"https://github.com/purificant/nltk","homepage":"http://nltk.org/","size":105646,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"nltk:develop","ref":"develop","sha":"2e548035d7ca96451d9585421a99efa6eb3d4347","user":{"login":"nltk","id":124114,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNDExNA==","avatar_url":"https://avatars0.githubusercontent.com/u/124114?v=4","gravatar_id":"","url":"https://api.github.com/users/nltk","html_url":"https://github.com/nltk","followers_url":"https://api.github.com/users/nltk/followers","following_url":"https://api.github.com/users/nltk/following{/other_user}","gists_url":"https://api.github.com/users/nltk/gists{/gist_id}","starred_url":"https://api.github.com/users/nltk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nltk/subscriptions","organizations_url":"https://api.github.com/users/nltk/orgs","repos_url":"https://api.github.com/users/nltk/repos","events_url":"https://api.github.com/users/nltk/events{/privacy}","received_events_url":"https://api.github.com/users/nltk/received_events","type":"Organization","site_admin":false},"repo":{"id":299862,"node_id":"MDEwOlJlcG9zaXRvcnkyOTk4NjI=","name":"nltk","full_name":"nltk/nltk","private":false,"owner":{"login":"nltk","id":124114,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNDExNA==","avatar_url":"https://avatars0.githubusercontent.com/u/124114?v=4","gravatar_id":"","url":"https://api.github.com/users/nltk","html_url":"https://github.com/nltk","followers_url":"https://api.github.com/users/nltk/followers","following_url":"https://api.github.com/users/nltk/following{/other_user}","gists_url":"https://api.github.com/users/nltk/gists{/gist_id}","starred_url":"https://api.github.com/users/nltk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nltk/subscriptions","organizations_url":"https://api.github.com/users/nltk/orgs","repos_url":"https://api.github.com/users/nltk/repos","events_url":"https://api.github.com/users/nltk/events{/privacy}","received_events_url":"https://api.github.com/users/nltk/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/nltk/nltk","description":"NLTK Source","fork":false,"url":"https://api.github.com/repos/nltk/nltk","forks_url":"https://api.github.com/repos/nltk/nltk/forks","keys_url":"https://api.github.com/repos/nltk/nltk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nltk/nltk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nltk/nltk/teams","hooks_url":"https://api.github.com/repos/nltk/nltk/hooks","issue_events_url":"https://api.github.com/repos/nltk/nltk/issues/events{/number}","events_url":"https://api.github.com/repos/nltk/nltk/events","assignees_url":"https://api.github.com/repos/nltk/nltk/assignees{/user}","branches_url":"https://api.github.com/repos/nltk/nltk/branches{/branch}","tags_url":"https://api.github.com/repos/nltk/nltk/tags","blobs_url":"https://api.github.com/repos/nltk/nltk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nltk/nltk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nltk/nltk/git/refs{/sha}","trees_url":"https://api.github.com/repos/nltk/nltk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nltk/nltk/statuses/{sha}","languages_url":"https://api.github.com/repos/nltk/nltk/languages","stargazers_url":"https://api.github.com/repos/nltk/nltk/stargazers","contributors_url":"https://api.github.com/repos/nltk/nltk/contributors","subscribers_url":"https://api.github.com/repos/nltk/nltk/subscribers","subscription_url":"https://api.github.com/repos/nltk/nltk/subscription","commits_url":"https://api.github.com/repos/nltk/nltk/commits{/sha}","git_commits_url":"https://api.github.com/repos/nltk/nltk/git/commits{/sha}","comments_url":"https://api.github.com/repos/nltk/nltk/comments{/number}","issue_comment_url":"https://api.github.com/repos/nltk/nltk/issues/comments{/number}","contents_url":"https://api.github.com/repos/nltk/nltk/contents/{+path}","compare_url":"https://api.github.com/repos/nltk/nltk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nltk/nltk/merges","archive_url":"https://api.github.com/repos/nltk/nltk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nltk/nltk/downloads","issues_url":"https://api.github.com/repos/nltk/nltk/issues{/number}","pulls_url":"https://api.github.com/repos/nltk/nltk/pulls{/number}","milestones_url":"https://api.github.com/repos/nltk/nltk/milestones{/number}","notifications_url":"https://api.github.com/repos/nltk/nltk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nltk/nltk/labels{/name}","releases_url":"https://api.github.com/repos/nltk/nltk/releases{/id}","deployments_url":"https://api.github.com/repos/nltk/nltk/deployments","created_at":"2009-09-07T10:53:58Z","updated_at":"2018-11-21T19:34:16Z","pushed_at":"2018-11-21T06:48:25Z","git_url":"git://github.com/nltk/nltk.git","ssh_url":"git@github.com:nltk/nltk.git","clone_url":"https://github.com/nltk/nltk.git","svn_url":"https://github.com/nltk/nltk","homepage":"http://nltk.org/","size":346072,"stargazers_count":7143,"watchers_count":7143,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":2008,"mirror_url":null,"archived":false,"open_issues_count":353,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":2008,"open_issues":353,"watchers":7143,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/nltk/nltk/pulls/2187"},"html":{"href":"https://github.com/nltk/nltk/pull/2187"},"issue":{"href":"https://api.github.com/repos/nltk/nltk/issues/2187"},"comments":{"href":"https://api.github.com/repos/nltk/nltk/issues/2187/comments"},"review_comments":{"href":"https://api.github.com/repos/nltk/nltk/pulls/2187/comments"},"review_comment":{"href":"https://api.github.com/repos/nltk/nltk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nltk/nltk/pulls/2187/commits"},"statuses":{"href":"https://api.github.com/repos/nltk/nltk/statuses/514045c299fee9a019b779436d9111368ee531ad"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":50,"deletions":6,"changed_files":2}}
{"actor":{"display_login":"purificant"}}