From f9242ca4e971a53583edfaec1ce961fad1978a3e Mon Sep 17 00:00:00 2001 From: cclauss Date: Sat, 30 Jun 2018 10:25:49 +0200 Subject: [PATCH 1/2] [BEAM-3761] Define cmp() in Python 3 Signed-off-by: cclauss --- sdks/python/apache_beam/transforms/window.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sdks/python/apache_beam/transforms/window.py b/sdks/python/apache_beam/transforms/window.py index a67e2cf1b50b..5bc047b48c7a 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 From 779558e0da9dac998f2c189cf15b54310daf6984 Mon Sep 17 00:00:00 2001 From: cclauss Date: Tue, 10 Jul 2018 07:58:24 +0200 Subject: [PATCH 2/2] [BEAM-3959] Add Python 3 undefined names to flake8 --- sdks/python/scripts/run_mini_py3lint.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sdks/python/scripts/run_mini_py3lint.sh b/sdks/python/scripts/run_mini_py3lint.sh index 63e71771d734..0729c7ba2cfc 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