From 3b7eae4040eba65e8a6167eb802849273eca588b Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Thu, 25 May 2017 16:17:54 -0700 Subject: [PATCH] [BEAM-2366] Don't try to pickle gen_protos in tests. Tests that pickle the main session but are run from setup.py attempt to pickle everything visible in setup.py. --- sdks/python/setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sdks/python/setup.py b/sdks/python/setup.py index 8a8ce482742a..596c8c51afb0 100644 --- a/sdks/python/setup.py +++ b/sdks/python/setup.py @@ -36,8 +36,6 @@ from pkg_resources import get_distribution, DistributionNotFound -import gen_protos - def get_version(): global_names = {} @@ -127,6 +125,9 @@ def get_version(): # We must generate protos after setup_requires are installed. def generate_protos_first(original_cmd): + # See https://issues.apache.org/jira/browse/BEAM-2366 + # pylint: disable=wrong-import-position + import gen_protos class cmd(original_cmd, object): def run(self): gen_protos.generate_proto_files()