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-3552] Support Python 3 in the metrics, internal, typehints, and utils modules. #4515
Conversation
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.
Thanks! Just some minor comments.
@@ -60,8 +60,8 @@ def test_non_function(self): | |||
[1, 2, 3] | beam.Map(str.upper) | |||
|
|||
def test_loose_bounds(self): | |||
@typehints.with_input_types(typehints.Union[int, float, long]) | |||
@typehints.with_output_types(basestring) | |||
@typehints.with_input_types(typehints.Union[int, float, int]) |
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.
redundant int
@typehints.with_input_types(typehints.Union[int, float, long]) | ||
@typehints.with_output_types(basestring) | ||
@typehints.with_input_types(typehints.Union[int, float, int]) | ||
@typehints.with_output_types(type) |
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.
This should be just str.
Great, I've made the changes and squashed it down to 1 commit. |
Hi @robertwb, I've resolved recent merge conflicts. The unit tests that don't pass in Python 3 are the trivial inference tests and the ones in utils/ regarding using rich comparisons instead cmp (blocked by the Cython version). |
Thanks! We should consider how we're going to test these to keep it working going forward. |
Great, I will add JIRA issues regarding the problems remaining in the above modules. I don't have too much experience with this type of migration, but t seems that until we can get rid of all major blockers (SyntaxError, NameError, ImportError, etc.) in the modules, it will be hard to test that Beam works correctly on Python3. |
Follow this checklist to help us incorporate your contribution quickly and easily:
[] Make sure there is a JIRA issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes.
[] Each commit in the pull request should have a meaningful subject line and body.
[] Format the pull request title like
[BEAM-XXX] Fixes bug in ApproximateQuantiles
, where you replaceBEAM-XXX
with the appropriate JIRA issue.[] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[] Run
mvn clean verify
to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.If this contribution is large, please file an Apache Individual Contributor License Agreement.
Ensures that the unit tests in these modules which don't depend on other modules pass.
The changes include: