Skip to content

Add methods to connection mapping API requests - #1700

Merged
tseaver merged 25 commits into
googleapis:masterfrom
tseaver:851-1696-pubsub-connection_maps_api
Apr 22, 2016
Merged

Add methods to connection mapping API requests#1700
tseaver merged 25 commits into
googleapis:masterfrom
tseaver:851-1696-pubsub-connection_maps_api

Conversation

@tseaver

Copy link
Copy Markdown
Contributor

Encapsulate JSON/REST-specific knowledge inside the connection, allowing later use of a gRPC-based connection.

Toward #851 and #1696.

@tseavertseaver added the api: pubsub Issues related to the Pub/Sub API. label Apr 7, 2016
@googlebotgooglebot added the cla: yes This human has signed the Contributor License Agreement. label Apr 7, 2016
@tseaver

Copy link
Copy Markdown
ContributorAuthor

@dhermes this may be easiest to review commit-by-commit: I tried hard to keep them logical and clean (passing coverage and lint on my machine at each commit).

If needed, I can chop this up into smaller pieces.

@dhermes

Copy link
Copy Markdown
Contributor

@tseaver Reviewing now. Sorry for the delay.

resp = self.connection.api_request(method='GET', path=path,
query_params=params)
conn = self.connection
resources, next_token = conn.list_topics(

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@dhermes

Copy link
Copy Markdown
Contributor

OK I finished my review. Overall pretty clean given the magnitude of the changes.

Client method now just rewraps resources returned by connection.
Toward #851 and #1696.
…tions'.
Client method now just rewraps resources returned by connection.
Toward #851 and #1696.
Topic method now just delegates to the connection.
Toward #851 and #1696.
tseaver added 13 commits April 20, 2016 11:30
Subscription method now just delegates to the connection.
Toward #851 and #1696.
Subscription method now just delegates to the connection.
Toward #851 and #1696.
Subscription method now just delegates to the connection.
Toward #851 and #1696.
…ption_modify_push_config'.
Subscription method now just delegates to the connection.
Toward #851 and #1696.
Subscription method now just delegates to the connection.
Toward #851 and #1696.
…iption_modify_ack_deadline'.
Subscription method now just delegates to the connection.
Toward #851 and #1696.
…icy'.
Subscription method now just delegates to the connection.
Toward #851 and #1696.
…icy'.
Subscription method now just delegates to the connection.
Toward #851 and #1696.
…_iam_permissions'.
Subscription method now just delegates to the connection.
Toward #851 and #1696.
@tseaver

Copy link
Copy Markdown
ContributorAuthor

@dhermes PTAL: 0e337fa through 19b4f37 break the API-specific methods out of Connection into stub-like API helper classes, instantiated as properties of the Client. I think adding the gRPC versions will be a matter of creating parallel classes for them, and tweaking how the client chooses which to instantiate.

@dhermes

Copy link
Copy Markdown
Contributor

@tseaver can we peel those off onto a new PR. This one was already quite heavy.

@tseaver

Copy link
Copy Markdown
ContributorAuthor

@dhermes Are OK to merge this one as of a8ee698?

@tseaver

Copy link
Copy Markdown
ContributorAuthor

I just stripped off the"API helper" commits, and submitted them in #1736.

@dhermes

Copy link
Copy Markdown
Contributor

I'm pretty sure the answer is yes, double checking right now.

@dhermes

Copy link
Copy Markdown
Contributor

OK LGTM to merge

@tseaver
tseaver merged commit 18c92fe into googleapis:masterApr 22, 2016
@tseaver
tseaver deleted the 851-1696-pubsub-connection_maps_api branch April 22, 2016 16:13
@dhermesdhermes mentioned this pull request Apr 22, 2016
parthea pushed a commit that referenced this pull request Nov 26, 2025
* feat: add functionality to hash data (#1677)
* feat: add functionality to hash data
* change sensitive fields to private
* update to sha512
* update docstring
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
* chore: add request-response log helpers (#1685)
* chore: add request-response log helpers
* fix presubmit
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
* feat: opt-in logging support for request / response (#1686)
* feat: opt-in logging support for request/response
* add pragma no cover
* add test coverage for request/response
* add code coverage
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
* chore: remove logging for async requests (#1698)
* chore: remove logging for async requests
* change Dict to Mapping
* fix mypy and lint issues
* address PR feedback
* link issue
* feat: parse request/response for logging (#1696)
* feat: parse request/response for logging
* add test case for list
* address PR comments
* address PR feedback
* fix typo
* add test coverage
* add code coverage
* feat: hash sensitive info in logs (#1700)
* feat: hash sensitive info in logs
* make helper private
* add code coverage
* address PR feedback
* fix mypy type issue
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
* feat: add support for async response log (#1733)
* feat: add support for async response log
* fix whitespace
* add await
* add code coverage
* fix lint
* fix lint issues
* address PR feedback
* address PR feedback
* link issue
* feat: add request response logs for sync api calls (#1747)
* fix: remove dependency on api-core for logging (#1748)
* fix: remove dep on api-core for logging
* disable propagation to the root logger
* update async helpers tests
* fix lint issue
---------
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Mar 9, 2026
…quests in async streams. Gracefully close streams. (#1700)
fix(experimental): implement requests_done method to signal end of
requests in async streams. Gracefully close streams.
parthea pushed a commit that referenced this pull request Mar 9, 2026
PR created by the Librarian CLI to initialize a release. Merging this PR
will auto trigger a release.
Librarian Version: v1.0.2-0.20251119154421-36c3e21ad3ac
Language Image:
us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:8e2c32496077054105bd06c54a59d6a6694287bc053588e24debe6da6920ad91
<details><summary>google-cloud-storage: 3.9.0</summary>
##
[3.9.0](googleapis/python-storage@v3.8.0...v3.9.0)
(2026-02-02)
### Features
* update generation for MRD (#1730)
([08bc7082](googleapis/python-storage@08bc7082))
* add get_object method for async grpc client (#1735)
([0e5ec29b](googleapis/python-storage@0e5ec29b))
* Add micro-benchmarks for reads comparing standard (regional) vs rapid
(zonal) buckets. (#1697)
([1917649f](googleapis/python-storage@1917649f))
* Add support for opening via `write_handle` and fix `write_handle` type
(#1715)
([2bc15fa5](googleapis/python-storage@2bc15fa5))
* add samples for appendable objects writes and reads
([2e1a1eb5](googleapis/python-storage@2e1a1eb5))
* add samples for appendable objects writes and reads (#1705)
([2e1a1eb5](googleapis/python-storage@2e1a1eb5))
* add context manager to mrd (#1724)
([5ac2808a](googleapis/python-storage@5ac2808a))
* Move Zonal Buckets features of `_experimental` (#1728)
([74c9ecc5](googleapis/python-storage@74c9ecc5))
* add default user agent for grpc (#1726)
([7b319469](googleapis/python-storage@7b319469))
* expose finalized_time in blob.py applicable for GET_OBJECT in ZB
(#1719)
([8e21a7f](googleapis/python-storage@8e21a7fe))
* expose `DELETE_OBJECT` in `AsyncGrpcClient` (#1718)
([c8dd7a0b](googleapis/python-storage@c8dd7a0b))
* send `user_agent` to grpc channel (#1712)
([cdb2486b](googleapis/python-storage@cdb2486b))
* integrate writes strategy and appendable object writer (#1695)
([dbd162b3](googleapis/python-storage@dbd162b3))
* Add micro-benchmarks for writes comparing standard (regional) vs rapid
(zonal) buckets. (#1707)
([dbe9d8b8](googleapis/python-storage@dbe9d8b8))
* add support for `generation=0` to avoid overwriting existing objects
and add `is_stream_open` support (#1709)
([ea0f5bf8](googleapis/python-storage@ea0f5bf8))
* add support for `generation=0` to prevent overwriting existing objects
([ea0f5bf8](googleapis/python-storage@ea0f5bf8))
* add `is_stream_open` property to AsyncAppendableObjectWriter for
stream status check
([ea0f5bf8](googleapis/python-storage@ea0f5bf8))
### Bug Fixes
* receive eof while closing reads stream (#1733)
([2ef63396](googleapis/python-storage@2ef63396))
* update write handle on every recv() (#1716)
([5d9fafe1](googleapis/python-storage@5d9fafe1))
* implement requests_done method to signal end of requests in async
streams. Gracefully close streams. (#1700)
([6c160794](googleapis/python-storage@6c160794))
* implement requests_done method to signal end of requests in async
streams. Gracefully close streams.
([6c160794](googleapis/python-storage@6c160794))
* instance grpc client once per process in benchmarks (#1725)
([721ea2dd](googleapis/python-storage@721ea2dd))
* Fix formatting in setup.py dependencies list (#1713)
([cc4831d7](googleapis/python-storage@cc4831d7))
* Change contructors of MRD and AAOW AsyncGrpcClient.grpc_client to
AsyncGrpcClient (#1727)
([e730bf50](googleapis/python-storage@e730bf50))
</details>
parthea pushed a commit that referenced this pull request Apr 1, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: pubsubIssues related to the Pub/Sub API.cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@tseaver@dhermes@googlebot