Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BEAM-3142] Apply futurize on gen_protos #4077

Merged
merged 4 commits into from
Jan 19, 2018

Conversation

holdenk
Copy link
Contributor

@holdenk holdenk commented Nov 5, 2017

Python 3 removes relative import support, we can apply futurize on the generated protos to fix the imports. It's less than ideal, but it works.

@holdenk holdenk changed the title [BEAM-3142] Apply futurize on gen_protos [BEAM-3142][WIP] Apply futurize on gen_protos Nov 5, 2017
@holdenk
Copy link
Contributor Author

holdenk commented Nov 8, 2017

cc @aaltay any idea why this would fail here (or how to get the log file out of jenkins)? It hasn't even it the point of changes when it fails to generate.

@asfgit
Copy link

asfgit commented Nov 14, 2017

SUCCESS

--none--

2 similar comments
@asfgit
Copy link

asfgit commented Nov 14, 2017

SUCCESS

--none--

@asfgit
Copy link

asfgit commented Nov 14, 2017

SUCCESS

--none--

@aaltay
Copy link
Member

aaltay commented Nov 28, 2017

Hey @holdenk, sorry I missed the question earlier. Do you still have the issue?

@holdenk holdenk changed the title [BEAM-3142][WIP] Apply futurize on gen_protos [BEAM-3142] Apply futurize on gen_protos Dec 1, 2017
@holdenk
Copy link
Contributor Author

holdenk commented Dec 1, 2017

No, its working now I did some poking in another PR to get the logs sorted out.

@@ -111,6 +111,15 @@ def generate_proto_files(force=False):
'%s' % ret_code)


if sys.version_info[0] >= 3:
ret_code = subprocess.call(
["futurize", "-0", "-wv", "--no-diff", out_dir])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you expand the arguments to their long form: futurize --both-stages --write --verbose --no-diff ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

@holdenk holdenk force-pushed the BEAM-3142-fix-proto-gen-for-py3 branch from d967dc6 to 0a1737a Compare December 29, 2017 02:42
@holdenk
Copy link
Contributor Author

holdenk commented Jan 8, 2018

ping? would be nice to get this in.

@holdenk
Copy link
Contributor Author

holdenk commented Jan 11, 2018

and re-ping? @aaltay @ehudm ?

@aaltay
Copy link
Member

aaltay commented Jan 12, 2018

LGTM. Should we use futurize for Python 2 as well and remove the branch?

@robertwb
Copy link
Contributor

Is this sufficient? Or should we be generating (and somehow selectively choosing) proto files generated targeting Py3?

@holdenk
Copy link
Contributor Author

holdenk commented Jan 19, 2018

Futurizing for Python2 would require futurize to be installed by Python2 users so I'd say no.

@aaltay
Copy link
Member

aaltay commented Jan 19, 2018

This PR has been open for a while, I will merge it. If the changes are not sufficient we can revisit.

@aaltay aaltay merged commit a91f7ad into apache:master Jan 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants