[BEAM-1251] Change unicode --> six.text_type for Python 3#4697
Conversation
0b7cc25 to
8e8ca07
Compare
7ff98d8 to
193ea24
Compare
|
Python Precommits are broken for now (fix incoming). As advice, it'd be good for you to add a reviewer for your PR. I'll take a look in the next few days. |
|
How do I "add a reviewer"? |
|
There was some breakage in the Python SDK earlier. Could you rebase to master branch? |
193ea24 to
b713651
Compare
|
Jenkins retest this please |
dde3cb3 to
103e9b3
Compare
| from apache_beam.transforms.display import DisplayDataItem | ||
| from apache_beam.transforms.display import HasDisplayData | ||
| from apache_beam.transforms.display import (DisplayData, DisplayDataItem, | ||
| HasDisplayData) |
There was a problem hiding this comment.
Nit: Lint is complaining about these:
import apache_beam as beam
from apache_beam.options.pipeline_options import PipelineOptions
-from apache_beam.transforms.display import (DisplayData, DisplayDataItem,
- HasDisplayData)
+from apache_beam.transforms.display import DisplayData
+from apache_beam.transforms.display import DisplayDataItem
+from apache_beam.transforms.display import HasDisplayData
| from datetime import datetime | ||
|
|
||
| import six | ||
|
|
There was a problem hiding this comment.
Nit: Lint is complaining of the ordering of this import:
+import hamcrest as hc
import six
-
-import hamcrest as hc
from hamcrest.core.base_matcher import BaseMatcher
There was a problem hiding this comment.
This one complains when the hamcrest imports are split but also complains when they are put together. The desired order is also different than iSort. A bit difficult to find the correct order.
103e9b3 to
a29ce85
Compare
|
So now it is saying: But when I move import six up in between the two hamcrest imports, it will complain that they can not be split. Trying that now... |
a29ce85 to
1a5f292
Compare
|
Now... |
26822f3 to
d5eeab4
Compare
|
Hopefully the # pylint: disable=ungrouped-imports and # pylint: enable=ungrouped-imports trick that I learned from @luke-zhu should placate pylint and this PR should be good to go. |
d5eeab4 to
cd1f728
Compare
|
Glad that worked. I've added https://issues.apache.org/jira/browse/BEAM-3745 to track this. |
|
Can someone please advise how I can fix the failing test? |
|
Looks like the problem is unrelated. It's on the java branch and I saw that a different build on the same computer (beam 5) failed similarly here: https://builds.apache.org/job/beam_PreCommit_Java_GradleBuild/2529/console You could also type in "retest this please" to the the checks again |
247bdce to
42c125a
Compare
42c125a to
80fb5ff
Compare
|
@aaltay Your review please? |
|
On update linter rules to keep from backsliding see #4798 On the reviewer tips, they only work if you have the commit bit which I do not have and do not need. |
Thank you, will review it there.
You can add R; .. as a comment to the PR. Beam committer typically look for that tagging. You do not need to be a committer to do that. |
unicode was removed in Python 3 because all str are Unicode so this PR: