[
https://issues.apache.org/jira/browse/BEAM-3761?focusedWorklogId=121535&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-121535
]
ASF GitHub Bot logged work on BEAM-3761:
----------------------------------------
Author: ASF GitHub Bot
Created on: 10/Jul/18 18:39
Start Date: 10/Jul/18 18:39
Worklog Time Spent: 10m
Work Description: charlesccychen closed pull request #5843: [BEAM-3761]
Define cmp() in Python 3
URL: https://github.com/apache/beam/pull/5843
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/sdks/python/apache_beam/transforms/window.py
b/sdks/python/apache_beam/transforms/window.py
index a67e2cf1b50..5bc047b48c7 100644
--- a/sdks/python/apache_beam/transforms/window.py
+++ b/sdks/python/apache_beam/transforms/window.py
@@ -53,6 +53,7 @@
from google.protobuf import duration_pb2
from google.protobuf import timestamp_pb2
+from past.builtins import cmp
from apache_beam.coders import coders
from apache_beam.portability import common_urns
diff --git a/sdks/python/scripts/run_mini_py3lint.sh
b/sdks/python/scripts/run_mini_py3lint.sh
index 63e71771d73..0729c7ba2cf 100755
--- a/sdks/python/scripts/run_mini_py3lint.sh
+++ b/sdks/python/scripts/run_mini_py3lint.sh
@@ -48,5 +48,4 @@ if test $# -gt 0; then
fi
echo "Running flake8 for module $MODULE:"
-# TODO(BEAM-3959): Add F821 (undefined names) as soon as that test passes
-flake8 $MODULE --count --select=E9,F822,F823 --show-source --statistics
+flake8 $MODULE --count --select=E9,F821,F822,F823 --show-source --statistics
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 121535)
Time Spent: 14h 10m (was: 14h)
> Fix Python 3 cmp function
> -------------------------
>
> Key: BEAM-3761
> URL: https://issues.apache.org/jira/browse/BEAM-3761
> Project: Beam
> Issue Type: Improvement
> Components: sdk-py-core
> Reporter: holdenk
> Priority: Major
> Time Spent: 14h 10m
> Remaining Estimate: 0h
>
> Various functions don't exist in Python 3 that did in python 2. This Jira is
> to fix the use of cmp (which often will involve rewriting __cmp__ as well).
>
> Note: there are existing PRs for basestring and unicode (
> [https://github.com/apache/beam/pull/4697|https://github.com/apache/beam/pull/4697,]
> , [https://github.com/apache/beam/pull/4730] )
>
> Note once all of the missing names/functions are fixed we can enable F821 in
> falke8 python 3.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)