Skip to content

Several improvements for consistency of Python2 / Python3 conversions.#6144

Merged
aaltay merged 4 commits into
apache:masterfrom
tvalentyn:py3_cleanups
Aug 10, 2018
Merged

Several improvements for consistency of Python2 / Python3 conversions.#6144
aaltay merged 4 commits into
apache:masterfrom
tvalentyn:py3_cleanups

Conversation

@tvalentyn

@tvalentyn tvalentyn commented Aug 4, 2018

Copy link
Copy Markdown
Contributor

[BEAM-1251]
Use (str, future.builtins.unicode) where six.string_types was used in the past.
For Py2/Py3 compatibility, add complimentary ne methods which are autogenerated in Py3.
Use past.builtins.unicode where six.text_type was used.
Use bytes where six.binary_type was used.

Post-Commit Tests Status (on master branch)

Lang SDK Apex Dataflow Flink Gearpump Samza Spark
Go Build Status --- --- --- --- --- ---
Java Build Status Build Status Build Status Build Status Build Status Build Status Build Status
Python Build Status --- Build Status
Build Status
--- --- --- ---

@tvalentyn tvalentyn force-pushed the py3_cleanups branch 3 times, most recently from 89656c6 to f7a77bb Compare August 4, 2018 05:11
@tvalentyn

Copy link
Copy Markdown
Contributor Author

R: @Fematich , @udim

@udim udim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@tvalentyn

Copy link
Copy Markdown
Contributor Author

@Fematich would you have time to take a look at this PR before next week?

@Fematich

Copy link
Copy Markdown
Contributor

Looks good to me! I was only wondering if the change from six.binary_type to bytes on line 177 in pubsub.py could introduce issues for the coders, but this should be equivalent.

@udim

udim commented Aug 10, 2018

Copy link
Copy Markdown
Member

@Fematich six.binary_type is str and bytes is str in Python 2.7, so it's equivalent for existing code.

@tvalentyn

Copy link
Copy Markdown
Contributor Author

Thanks, @Fematich and @udim.

@aaltay aaltay merged commit c7ce77d into apache:master Aug 10, 2018
@tvalentyn tvalentyn deleted the py3_cleanups branch August 10, 2018 19:25
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.

4 participants