Merge branch 'main' into avm99963-monorail

Merged commit 34d8229ae2b51fb1a15bd208e6fe6185c94f6266

GitOrigin-RevId: 7ee0917f93a577e475f8e09526dd144d245593f4
diff --git a/features/pubsub.py b/features/pubsub.py
index c7c28d9..64f4305 100644
--- a/features/pubsub.py
+++ b/features/pubsub.py
@@ -1,7 +1,6 @@
-# Copyright 2019 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file or at
-# https://developers.google.com/open-source/licenses/bsd
+# Copyright 2019 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
 
 """Task handlers for publishing issue updates onto a pub/sub topic.
 
@@ -11,7 +10,6 @@
 from __future__ import division
 from __future__ import absolute_import
 
-import httplib2
 import logging
 import sys
 
@@ -26,7 +24,7 @@
 from framework import jsonfeed
 
 
-class PublishPubsubIssueChangeTask(jsonfeed.FlaskInternalTask):
+class PublishPubsubIssueChangeTask(jsonfeed.InternalTask):
   """JSON servlet that pushes issue update messages onto a pub/sub topic."""
 
   def HandleRequest(self, mr):
@@ -77,8 +75,8 @@
 def set_up_pubsub_api():
   """Attempts to build and return a pub/sub API client."""
   try:
-    return build('pubsub', 'v1', http=httplib2.Http(),
-        credentials=GoogleCredentials.get_application_default())
+    return build(
+        'pubsub', 'v1', credentials=GoogleCredentials.get_application_default())
   except (Oauth2ClientError, ApiClientError):
     logging.error("Error setting up Pub/Sub API: %s" % sys.exc_info()[0])
     return None