GeezerVison is showing github.com — Add optional 'connection' parameter for any method that hits the wire · Issue #825 · googleapis/google-cloud-python
Add optional 'connection' parameter for any method that hits the wire #825DescriptionFrom #796
@dhermes, @jgeewax could we make every API-triggering method take an optional connection argument, which would override the bound / default connection for only that call? Seems like that would be a useful pattern across all services; it would also help mark those methods as being API/latency relevant.
Activityadded this to the This milestone has been deleted milestone on Apr 15, 2015dhermes commented on Apr 15, 2015 Thanks for filing. That's the goal. Mentioned this in #728 and #632 but it's not really spelled out. tseaver commented on Apr 16, 2015 datastore
Free API functions
-
api.get
-
api.put
-
api.delete
-
api.allocate_ids
batch.Batch methods
(note that Batch.__init__ takes a connection, handles fallback)
Batch.commit No real usecase for an explicit connection, given that Batch exists purely as a wrapper/proxy for an existing connection.
dataset.Dataset methods
(note that Dataset.__init__ takes a connection, defaulting to None).
query.Query methods
-
Query.fetch (handles fallback, passes connection to Iterator)
transaction.Transaction methods
No real usecase for an explicit connection, given that Batch exists purely as a wrapper/proxy for an existing connection.
(note that Transaction.__init__ takes a connection, handles fallback via Batch.__init__)
Transaction.begin
Transaction.rollback
Transaction.commit (delegates to Batch.commit)
pubsub
Free API functions
-
api.list_topics
-
api.list_subscriptions
subscription.Subscription methods
topic.Topic methods:
(note that Topic.__init__ takes a connection, handles fallback)
topic._Batch methods:
storage
_helpers._PropertyMixin methods (inherited by Blob / Bucket)
acl.ACL methods
acl.BucketACL methods
acl.BlobACL methods
Free API functions
-
api.lookup_bucket
-
api.list_buckets (handles fallback, passes connection to _BucketIterator)
-
api.get_bucket
-
api.create_bucket
batch.Batch methods
No real usecase for an explicit connection, given that Batch exists purely as a wrapper/proxy for an existing connection.
(note that Batch.__init__ takes a connection, handles fallback)
Batch._do_request (uses self._connection)
Batch.finish (delegates to _do_request; called in __exit__ when batch used as a context manager).
blob.Blob methods
bucket.Bucket methods
(note that Bucket.__init__ takes a connection, does not handle fallback)
changed the title [-]Add connection as a parameter for any method that hits the wire?[/-] [+]Add optional 'connection' parameter for any method that hits the wire[/+] on May 1, 2015dhermes commented on Aug 28, 2015 @tseaver Please re-open if this isn't covered (by clients now instead of connections)
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|