FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Removing most (direct) connection usage in Pub / Sub by dhermes · Pull Request #2874 · googleapis/google-cloud-python · GitHub

Removing most (direct) connection usage in Pub / Sub - #2874

Merged
dhermes merged 3 commits into
googleapis:masterfrom
dhermes:gax-ignore-connection
Dec 16, 2016
Merged

Removing most (direct) connection usage in Pub / Sub#2874
dhermes merged 3 commits into
googleapis:masterfrom
dhermes:gax-ignore-connection

Conversation

dhermes commented Dec 15, 2016
edited
Loading

Copy link
Copy Markdown
Contributor

NOTE: Has #2870 as diffbase.

dhermes added hygiene api: pubsub Issues related to the Pub/Sub API. labels Dec 15, 2016
googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 15, 2016
Comment thread pubsub/unit_tests/test__gax.py Outdated
insecure_channel=mock_insecure_channel)
with patch:
result = self._call_fut(connection)
result = self._call_fut(None, host=host, secure=False)

This comment was marked as spam.

This comment was marked as spam.

tseaver commented Dec 15, 2016

Copy link
Copy Markdown
Contributor

@dhermes I'm OK to merge without the change I suggested, if you don't think it would be an improvement.

dhermes force-pushed the gax-ignore-connection branch from 201fce2 to c8a0d6e Compare December 15, 2016 20:33

dhermes commented Dec 16, 2016

Copy link
Copy Markdown
Contributor Author

@tseaver WDYT of my most recent comment above

tseaver commented Dec 16, 2016

Copy link
Copy Markdown
Contributor

@dhermes It looks to me as though host unused in the non-emulated case. If so, then the call site becomes:

if self.conn.in_emul:
    channel = make_foo(host=emulator_host)
else:
    channel = make_foo(credentials=credentials)

Still using a method of a connection object, but this way
it can be more easily swapped out for a function defined
in that module doing the same task.
dhermes force-pushed the gax-ignore-connection branch from c8a0d6e to 80413c5 Compare December 16, 2016 06:27
dhermes force-pushed the gax-ignore-connection branch from 80413c5 to a46184c Compare December 16, 2016 06:37

dhermes commented Dec 16, 2016

Copy link
Copy Markdown
Contributor Author

@tseaver PTAL

tseaver commented Dec 16, 2016

Copy link
Copy Markdown
Contributor

LGTM

dhermes merged commit 3d354dc into googleapis:master Dec 16, 2016
dhermes deleted the gax-ignore-connection branch December 16, 2016 18:18
richkadel pushed a commit to richkadel/google-cloud-python that referenced this pull request May 6, 2017
Removing most (direct) connection usage in Pub / Sub
parthea pushed a commit that referenced this pull request Mar 2, 2026
Removing most (direct) connection usage in Pub / Sub
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: pubsub Issues related to the Pub/Sub API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL