{"action":"created","comment":{"url":"https://api.github.com/repos/apache/beam/pulls/comments/96502376","pull_request_review_id":17080288,"id":96502376,"diff_hunk":"@@ -588,7 +683,9 @@ def infer_output_type(self, input_type):\n         self.fn.infer_output_type(input_type))\n \n   def make_fn(self, fn):\n-    return fn if isinstance(fn, DoFn) else CallableWrapperDoFn(fn)\n+    if isinstance(fn, DoFn) or isinstance(fn, NewDoFn):","path":"sdks/python/apache_beam/transforms/core.py","position":146,"original_position":146,"commit_id":"c79864da447b835a93c04061d20bec9d3afd678e","original_commit_id":"53e3e6a7411acf9513ec39655d946a8209528208","user":{"login":"robertwb","id":486017,"avatar_url":"https://avatars.githubusercontent.com/u/486017?v=3","gravatar_id":"","url":"https://api.github.com/users/robertwb","html_url":"https://github.com/robertwb","followers_url":"https://api.github.com/users/robertwb/followers","following_url":"https://api.github.com/users/robertwb/following{/other_user}","gists_url":"https://api.github.com/users/robertwb/gists{/gist_id}","starred_url":"https://api.github.com/users/robertwb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertwb/subscriptions","organizations_url":"https://api.github.com/users/robertwb/orgs","repos_url":"https://api.github.com/users/robertwb/repos","events_url":"https://api.github.com/users/robertwb/events{/privacy}","received_events_url":"https://api.github.com/users/robertwb/received_events","type":"User","site_admin":false},"body":"same","created_at":"2017-01-17T20:24:55Z","updated_at":"2017-01-17T20:25:55Z","html_url":"https://github.com/apache/beam/pull/1782#discussion_r96502376","pull_request_url":"https://api.github.com/repos/apache/beam/pulls/1782","_links":{"self":{"href":"https://api.github.com/repos/apache/beam/pulls/comments/96502376"},"html":{"href":"https://github.com/apache/beam/pull/1782#discussion_r96502376"},"pull_request":{"href":"https://api.github.com/repos/apache/beam/pulls/1782"}}},"pull_request":{"url":"https://api.github.com/repos/apache/beam/pulls/1782","id":101775904,"html_url":"https://github.com/apache/beam/pull/1782","diff_url":"https://github.com/apache/beam/pull/1782.diff","patch_url":"https://github.com/apache/beam/pull/1782.patch","issue_url":"https://api.github.com/repos/apache/beam/issues/1782","number":1782,"state":"open","locked":false,"title":"[BEAM-886] Implement annotation based NewDoFn in Python SDK","user":{"login":"sb2nov","id":1517779,"avatar_url":"https://avatars.githubusercontent.com/u/1517779?v=3","gravatar_id":"","url":"https://api.github.com/users/sb2nov","html_url":"https://github.com/sb2nov","followers_url":"https://api.github.com/users/sb2nov/followers","following_url":"https://api.github.com/users/sb2nov/following{/other_user}","gists_url":"https://api.github.com/users/sb2nov/gists{/gist_id}","starred_url":"https://api.github.com/users/sb2nov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sb2nov/subscriptions","organizations_url":"https://api.github.com/users/sb2nov/orgs","repos_url":"https://api.github.com/users/sb2nov/repos","events_url":"https://api.github.com/users/sb2nov/events{/privacy}","received_events_url":"https://api.github.com/users/sb2nov/received_events","type":"User","site_admin":false},"body":"- Implement the new annotation based DoFn in python see https://s.apache.org/a-new-dofn \r\n- Migrate all the cases of DoFn to NewDoFn\r\n- CallableWrapperDoFn now extends NewDoFn\r\n- Typechecking is also handled using the NewDoFn\r\n- All unittests pass locally\r\n\r\nFuture Work:\r\n- Remove OldDoFn completely from the code\r\n- Deprecate the use of Context and pass state directly to the process method\r\n\r\nR: @robertwb PTAL\r\n\r\n---\r\n\r\nBe sure to do all of the following to help us incorporate your contribution\r\nquickly and easily:\r\n\r\n - [x] Make sure the PR title is formatted like:\r\n   `[BEAM-<Jira issue #>] Description of pull request`\r\n - [x] Make sure tests pass via `mvn clean verify`. (Even better, enable\r\n       Travis-CI on your fork and ensure the whole test matrix passes).\r\n - [x] Replace `<Jira issue #>` in the title with the actual Jira issue\r\n       number, if there is one.\r\n - [ ] If this contribution is large, please file an Apache\r\n       [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.txt).\r\n\r\n---\r\n","created_at":"2017-01-16T23:57:02Z","updated_at":"2017-01-17T20:25:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0c9fea355b39c3b909d3222916c49602e7697ea2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/beam/pulls/1782/commits","review_comments_url":"https://api.github.com/repos/apache/beam/pulls/1782/comments","review_comment_url":"https://api.github.com/repos/apache/beam/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/beam/issues/1782/comments","statuses_url":"https://api.github.com/repos/apache/beam/statuses/c79864da447b835a93c04061d20bec9d3afd678e","head":{"label":"sb2nov:BEAM-prototype-new-dofn","ref":"BEAM-prototype-new-dofn","sha":"c79864da447b835a93c04061d20bec9d3afd678e","user":{"login":"sb2nov","id":1517779,"avatar_url":"https://avatars.githubusercontent.com/u/1517779?v=3","gravatar_id":"","url":"https://api.github.com/users/sb2nov","html_url":"https://github.com/sb2nov","followers_url":"https://api.github.com/users/sb2nov/followers","following_url":"https://api.github.com/users/sb2nov/following{/other_user}","gists_url":"https://api.github.com/users/sb2nov/gists{/gist_id}","starred_url":"https://api.github.com/users/sb2nov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sb2nov/subscriptions","organizations_url":"https://api.github.com/users/sb2nov/orgs","repos_url":"https://api.github.com/users/sb2nov/repos","events_url":"https://api.github.com/users/sb2nov/events{/privacy}","received_events_url":"https://api.github.com/users/sb2nov/received_events","type":"User","site_admin":false},"repo":{"id":70828505,"name":"incubator-beam","full_name":"sb2nov/incubator-beam","owner":{"login":"sb2nov","id":1517779,"avatar_url":"https://avatars.githubusercontent.com/u/1517779?v=3","gravatar_id":"","url":"https://api.github.com/users/sb2nov","html_url":"https://github.com/sb2nov","followers_url":"https://api.github.com/users/sb2nov/followers","following_url":"https://api.github.com/users/sb2nov/following{/other_user}","gists_url":"https://api.github.com/users/sb2nov/gists{/gist_id}","starred_url":"https://api.github.com/users/sb2nov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sb2nov/subscriptions","organizations_url":"https://api.github.com/users/sb2nov/orgs","repos_url":"https://api.github.com/users/sb2nov/repos","events_url":"https://api.github.com/users/sb2nov/events{/privacy}","received_events_url":"https://api.github.com/users/sb2nov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sb2nov/incubator-beam","description":"Mirror of Apache Beam (Incubating)","fork":true,"url":"https://api.github.com/repos/sb2nov/incubator-beam","forks_url":"https://api.github.com/repos/sb2nov/incubator-beam/forks","keys_url":"https://api.github.com/repos/sb2nov/incubator-beam/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sb2nov/incubator-beam/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sb2nov/incubator-beam/teams","hooks_url":"https://api.github.com/repos/sb2nov/incubator-beam/hooks","issue_events_url":"https://api.github.com/repos/sb2nov/incubator-beam/issues/events{/number}","events_url":"https://api.github.com/repos/sb2nov/incubator-beam/events","assignees_url":"https://api.github.com/repos/sb2nov/incubator-beam/assignees{/user}","branches_url":"https://api.github.com/repos/sb2nov/incubator-beam/branches{/branch}","tags_url":"https://api.github.com/repos/sb2nov/incubator-beam/tags","blobs_url":"https://api.github.com/repos/sb2nov/incubator-beam/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sb2nov/incubator-beam/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sb2nov/incubator-beam/git/refs{/sha}","trees_url":"https://api.github.com/repos/sb2nov/incubator-beam/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sb2nov/incubator-beam/statuses/{sha}","languages_url":"https://api.github.com/repos/sb2nov/incubator-beam/languages","stargazers_url":"https://api.github.com/repos/sb2nov/incubator-beam/stargazers","contributors_url":"https://api.github.com/repos/sb2nov/incubator-beam/contributors","subscribers_url":"https://api.github.com/repos/sb2nov/incubator-beam/subscribers","subscription_url":"https://api.github.com/repos/sb2nov/incubator-beam/subscription","commits_url":"https://api.github.com/repos/sb2nov/incubator-beam/commits{/sha}","git_commits_url":"https://api.github.com/repos/sb2nov/incubator-beam/git/commits{/sha}","comments_url":"https://api.github.com/repos/sb2nov/incubator-beam/comments{/number}","issue_comment_url":"https://api.github.com/repos/sb2nov/incubator-beam/issues/comments{/number}","contents_url":"https://api.github.com/repos/sb2nov/incubator-beam/contents/{+path}","compare_url":"https://api.github.com/repos/sb2nov/incubator-beam/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sb2nov/incubator-beam/merges","archive_url":"https://api.github.com/repos/sb2nov/incubator-beam/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sb2nov/incubator-beam/downloads","issues_url":"https://api.github.com/repos/sb2nov/incubator-beam/issues{/number}","pulls_url":"https://api.github.com/repos/sb2nov/incubator-beam/pulls{/number}","milestones_url":"https://api.github.com/repos/sb2nov/incubator-beam/milestones{/number}","notifications_url":"https://api.github.com/repos/sb2nov/incubator-beam/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sb2nov/incubator-beam/labels{/name}","releases_url":"https://api.github.com/repos/sb2nov/incubator-beam/releases{/id}","deployments_url":"https://api.github.com/repos/sb2nov/incubator-beam/deployments","created_at":"2016-10-13T16:58:24Z","updated_at":"2016-11-15T00:01:21Z","pushed_at":"2017-01-17T19:50:18Z","git_url":"git://github.com/sb2nov/incubator-beam.git","ssh_url":"git@github.com:sb2nov/incubator-beam.git","clone_url":"https://github.com/sb2nov/incubator-beam.git","svn_url":"https://github.com/sb2nov/incubator-beam","homepage":null,"size":26385,"stargazers_count":1,"watchers_count":1,"language":"Java","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":1,"default_branch":"master"}},"base":{"label":"apache:python-sdk","ref":"python-sdk","sha":"f25c0e434e9abcc94c9377c412e403ac92444013","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":50904245,"name":"beam","full_name":"apache/beam","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/beam","description":"Mirror of Apache Beam","fork":false,"url":"https://api.github.com/repos/apache/beam","forks_url":"https://api.github.com/repos/apache/beam/forks","keys_url":"https://api.github.com/repos/apache/beam/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/beam/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/beam/teams","hooks_url":"https://api.github.com/repos/apache/beam/hooks","issue_events_url":"https://api.github.com/repos/apache/beam/issues/events{/number}","events_url":"https://api.github.com/repos/apache/beam/events","assignees_url":"https://api.github.com/repos/apache/beam/assignees{/user}","branches_url":"https://api.github.com/repos/apache/beam/branches{/branch}","tags_url":"https://api.github.com/repos/apache/beam/tags","blobs_url":"https://api.github.com/repos/apache/beam/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/beam/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/beam/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/beam/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/beam/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/beam/languages","stargazers_url":"https://api.github.com/repos/apache/beam/stargazers","contributors_url":"https://api.github.com/repos/apache/beam/contributors","subscribers_url":"https://api.github.com/repos/apache/beam/subscribers","subscription_url":"https://api.github.com/repos/apache/beam/subscription","commits_url":"https://api.github.com/repos/apache/beam/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/beam/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/beam/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/beam/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/beam/contents/{+path}","compare_url":"https://api.github.com/repos/apache/beam/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/beam/merges","archive_url":"https://api.github.com/repos/apache/beam/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/beam/downloads","issues_url":"https://api.github.com/repos/apache/beam/issues{/number}","pulls_url":"https://api.github.com/repos/apache/beam/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/beam/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/beam/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/beam/labels{/name}","releases_url":"https://api.github.com/repos/apache/beam/releases{/id}","deployments_url":"https://api.github.com/repos/apache/beam/deployments","created_at":"2016-02-02T08:00:06Z","updated_at":"2017-01-17T15:45:07Z","pushed_at":"2017-01-17T20:02:22Z","git_url":"git://github.com/apache/beam.git","ssh_url":"git@github.com:apache/beam.git","clone_url":"https://github.com/apache/beam.git","svn_url":"https://github.com/apache/beam","homepage":"","size":26590,"stargazers_count":691,"watchers_count":691,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":384,"mirror_url":"git://git.apache.org/beam.git","open_issues_count":65,"forks":384,"open_issues":65,"watchers":691,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/beam/pulls/1782"},"html":{"href":"https://github.com/apache/beam/pull/1782"},"issue":{"href":"https://api.github.com/repos/apache/beam/issues/1782"},"comments":{"href":"https://api.github.com/repos/apache/beam/issues/1782/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/beam/pulls/1782/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/beam/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/beam/pulls/1782/commits"},"statuses":{"href":"https://api.github.com/repos/apache/beam/statuses/c79864da447b835a93c04061d20bec9d3afd678e"}}}}
{"actor":{"display_login":"robertwb"}}