You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pub/Sub: System test failures on Python 2.7 (invalid syntax) #7841
tests/unit/pubsub_v1/subscriber/test_subscriber_client.py:18: in <module>
from google.cloud.pubsub_v1 import subscriber
google/cloud/pubsub_v1/__init__.py:19: in <module>
from google.cloud.pubsub_v1 import subscriber
google/cloud/pubsub_v1/subscriber/__init__.py:17: in <module>
from google.cloud.pubsub_v1.subscriber.client import Client
google/cloud/pubsub_v1/subscriber/client.py:30: in <module>
from google.cloud.pubsub_v1.subscriber._protocol import streaming_pull_manager
E File "/tmpfs/src/github/google-cloud-python/pubsub/google/cloud/pubsub_v1/subscriber/_protocol/streaming_pull_manager.py", line 198
E print(f"{messages_percent}, {bytes_percent}")
E ^
E SyntaxError: invalid syntax
Looks like streaming_pull_manager.py is using a format string, which isn't valid Python 2.7 syntax. Needs to use "{}, {}".format(...), instead.
I confirm those are bebugging leftover. They are safe to remove/reverted to what's there before. I was just noticing this one too and commented on the commit.
Activity
plamut commentedon May 1, 2019
How did that end up in the codebase, didn't the tests catch this before merging?
Anyhow, will have a look at it tomorrow, should be an easy fix. Thanks for bringing it up!
plamut commentedon May 1, 2019
Found the commit that brought this in.
What are all those
print()calls instreaming_pull_manager.pyfor anyway? They seem like some debugging leftovers to me...anguillanneuf commentedon May 1, 2019
I confirm those are bebugging leftover. They are safe to remove/reverted to what's there before. I was just noticing this one too and commented on the commit.
sduskis commentedon May 2, 2019
Thanks for taking care of this, @tswast, @anguillanneuf and @plamut