From abae9f5fb050e57e506e5af68e9ced2c88af8fc9 Mon Sep 17 00:00:00 2001 From: cclauss Date: Thu, 8 Mar 2018 22:59:23 +0100 Subject: [PATCH] [BEAM-1251] Change unicode --> six.text_type for Python 3 - again --- sdks/python/apache_beam/io/gcp/pubsub.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sdks/python/apache_beam/io/gcp/pubsub.py b/sdks/python/apache_beam/io/gcp/pubsub.py index c6d93d03af94..d5afee95580a 100644 --- a/sdks/python/apache_beam/io/gcp/pubsub.py +++ b/sdks/python/apache_beam/io/gcp/pubsub.py @@ -26,6 +26,8 @@ import re +from six import text_type + from apache_beam import coders from apache_beam.io.iobase import Read from apache_beam.io.iobase import Write @@ -184,7 +186,7 @@ def expand(self, pcoll): | _ReadFromPubSub(self.topic, self.subscription, self.id_label, with_attributes=False) | 'DecodeString' >> Map(lambda b: b.decode('utf-8'))) - p.element_type = unicode + p.element_type = text_type return p