From 975c1ac2cfdac0ce4403c0b56ad19f2ee7241f1a Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Wed, 15 Jan 2020 17:09:20 +0200 Subject: [PATCH] fix: replace unsafe six.PY3 with PY2 for better future compatibility with Python 4 (#10081) * fix: fix for Python 4: replace unsafe six.PY3 with PY2 * Fix wording --- synth.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/synth.py b/synth.py index a65bf2bf4..88ac4a8d4 100644 --- a/synth.py +++ b/synth.py @@ -127,10 +127,10 @@ "google/cloud/pubsub_v1/gapic/publisher_client.py", "class PublisherClient", """# TODO: remove conditional import after Python 2 support is dropped -if six.PY3: - from collections.abc import Mapping -else: +if six.PY2: from collections import Mapping +else: + from collections.abc import Mapping def _merge_dict(d1, d2):