| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
I don't understand the motivation for making build_api_url a class method: all the callers call it via the connection instance, and then have to pass in that instance's project. |
Sorry, something went wrong.
|
The motivation doesn't precisely fit the problem. I noticed that we had an instance method here (storage) and a class method in datastore. But the true motivation was making it to that each Connection instance only had public methods for making a single API request. Any other features would be moved elsewhere (like #583). I'm still trying to figure out if / how build_api_url fits into that idea. |
Sorry, something went wrong.
- Making Connection.make_request non-public - Making Connection.build_api_url a class method
Sorry, something went wrong.
|
Given that it needs instance state (the project), I can't see any benefit to making it a class method. I can even imagine that having it stay an instance method would be useful for https://github.com/GoogleCloudPlatform/gcloud-meta/issues/4 |
Sorry, something went wrong.
|
Cool. Closing this out. |
Sorry, something went wrong.
|
FWIW, I can certainly see making both build_api_url and make_request private. |
Sorry, something went wrong.
|
@tseaver OK I'll put that in motion and send a PR. This means build_api_url should be private in datastore as well. How do you feel about making them private functions in the connection modules? The only reason they are attached to the Connection objects are because of the class constants which could just as easily be module constants. (Though without looking at the code it may be a PITA to import the connection module in places where a Connection object was used freely.) |
Sorry, something went wrong.
…onfig (#587) * feat: Can directly set Cloud Speech model on the SpeechToTextConfig PiperOrigin-RevId: 482665674 Source-Link: googleapis/googleapis@64926d5 Source-Link: googleapis/googleapis-gen@351722b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzUxNzIyYmUxNjNkZWY3NjY2ZjEzY2I3NmIyYTI5NWQ5ZjJhODQ1MCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
…587) Protobuf allows recursive message types, i.e. messages whose fields are of the same type as the message itself. message Foo { Foo foo = 1; // Degenerate case } A real world example is bigquery.v2.data:RowFilter These recursive types cause a problem when trying to render mock values for unit tests because there's no inherent limit on when to stop rendering nested values. The solution in this commit is an artifical cap on the depth of recursion in rendering mock values.
* fix: fix broken import for AsyncRetry * fix import for AsyncRetry * Resolve duplicate object description of google.api_core.retry.retry_unary_async.AsyncRetry * move to google/api_core/retry_async.py
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: cojenco <cathyo@google.com>
| Back | FazBrowse Home | New Git URL |
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.