-
Notifications
You must be signed in to change notification settings - Fork 4.5k
[BEAM-3141][WIP] Support the coders in Python 3 #4078
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
Conversation
669c3f9 to
220857d
Compare
|
SUCCESS --none-- |
|
FAILURE --none-- |
|
SUCCESS --none-- |
580ba38 to
76917c1
Compare
|
What are the next steps for this PR - is it ready for review? If so please specify reviewers. |
| vlist = [self.decode_from_stream(stream, True) for _ in range(vlen)] | ||
| if t == LIST_TYPE: | ||
| return vlist | ||
| return list(vlist) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So explicitly converts the generator into a list for Py3.
| stream.write_byte(FLOAT_TYPE) | ||
| stream.write_bigendian_double(value) | ||
| elif t is str: | ||
| elif t is bytes: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is bytes available in Python 2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, it's the same as string in Python 2 :)
| span_micros = value.end.micros - value.start.micros | ||
| out.write_bigendian_uint64(self._from_normal_time(value.end.micros / 1000)) | ||
| out.write_var_int64(span_micros / 1000) | ||
| out.write_bigendian_uint64(self._from_normal_time(old_div(value.end.micros, 1000))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer // to a function call.
76917c1 to
3dcab1e
Compare
…cting avro) and add future geq 0.16.0
…ame.game_stats_test.GameStatsTest, fix some rethrows. lambda expansion, imports, and metaclass
…ookup as a string
…GameStatsTest to run, fix serialized values map over, switch some exception re-throws, iteritems, and handle peaking at the eval context.
21738e4 to
1bb0328
Compare
|
Gentle west-coast daylight hour ping :) |
|
@holdenk I was assuming that this was still a WIP PR and not paying much attention in my review list because of the PR title. Other reviewers might be doing that too. I will try to review it this or next week. |
|
Closing in favor of #4730 |
|
Note: once the dust settles I may cherry-pick some parts of this forward into a new coder related PR but keeping the large change up-to-date when we've switched to using six seems not overly useful. |
This adds support for the coders in Python 3 as well as fixes some other issues that were blocking
GameStatsTest/