Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Move Connection._create_scoped_credentials into __init__ of base class #974

Copy link
Copy link

Description

@dhermes
Issue body actions

Right now all 3 packages call it from their constructor

$ git log -1 --pretty=%H
baf58f2e00507dd6ed15971716fd6579c43dfa10
$ git grep -B 1 create_scoped_credentials
gcloud/connection.py-    @staticmethod
gcloud/connection.py:    def _create_scoped_credentials(credentials, scope):
--
gcloud/datastore/connection.py-    def __init__(self, credentials=None, http=None, api_base_url=None):
gcloud/datastore/connection.py:        credentials = self._create_scoped_credentials(credentials, SCOPE)
--
gcloud/pubsub/connection.py-    def __init__(self, credentials=None, http=None):
gcloud/pubsub/connection.py:        credentials = self._create_scoped_credentials(credentials, SCOPE)
--
gcloud/storage/connection.py-    def __init__(self, credentials=None, http=None):
gcloud/storage/connection.py:        credentials = self._create_scoped_credentials(credentials, SCOPE)

We may as well just have gcloud.connection.Connection.__init__ call it and use cls.SCOPE.

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.