Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
- [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/python-api-core/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
- [x] Ensure the tests and linter pass
- [x] Code coverage does not decrease (if any source code was changed)
- [x] Appropriate docs were updated (if necessary)
Fixes #176 🦕
|
|
Issue: https://github.com/googleapis/python-api-core/issues/163
|
|
Exclude empty policy bindings (bindings with no members) in
`Policy.__iter__()` and `Policy.__len__()`
Follow up to #155
|
|
|
|
Pass the operation name in the `x-goog-request-params`header.
Same as #133 for the async operations client.
|
|
(#134)
Add `default_host` and `default_scopes` parameters to `create_channel` so self-signed JWTs can be used.
|
|
|
|
|
|
Closes #87.
|
|
Towards: https://github.com/googleapis/python-bigquery/issues/24
|
|
Fixes #15 🦕
Errors raised by long running operations are currently always type GoogleAPICallError. Use the status code to create a more specific exception type.
|
|
|
|
|
|
* feat: allow quota project to be passed to create_channel
* chore: update test name
* chore: lint and increase auth lib version
* chore: fix lint
* Update setup.py
|
|
Co-authored-by: Dov Shlachter <dovs@google.com>
|
|
Closes #25.
This PR adds the ability to disable automatically pre-fetching the first item of a stream returned by `*-Stream` gRPC callables. This hook will be used in PubSub to fix the [stalled stream issue](https://github.com/googleapis/python-pubsub/issues/93), while also not affecting Firestore, since the default behavior is preserved.
I realize the fix is far from ideal, but it's the least ugly among the approaches I tried, e.g. somehow passing the flag through `ResumableBidiRpc` (it's a messy rabbit hole). On the PubSub side monkeypatching the generated SubscriberClient will be needed, but it's a (relatively) clean one-liner:
```patch
diff --git google/cloud/pubsub_v1/gapic/subscriber_client.py google/cloud/pubsub_v1/gapic/subscriber_client.py
index e98a686..1d6c058 100644
--- google/cloud/pubsub_v1/gapic/subscriber_client.py
+++ google/cloud/pubsub_v1/gapic/subscriber_client.py
@@ -1169,6 +1169,8 @@ class SubscriberClient(object):
default_timeout=self._method_configs["StreamingPull"].timeout,
client_info=self._client_info,
)
+ # TODO: explain this monkeypatch!
+ self.transport.streaming_pull._prefetch_first_result_ = False
return self._inner_api_calls["streaming_pull"](
requests, retry=retry, timeout=timeout, metadata=metadata
```
If/when we merge this, we should also release it, and then we can add `!= 1.17.0` to the `google-api-core` version pin in PubSub.
### PR checklist
- [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/python-api-core/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
- [x] Ensure the tests and linter pass
- [x] Code coverage does not decrease (if any source code was changed)
- [x] Appropriate docs were updated (if necessary)
|
|
and 'credentials_file'
Co-authored-by: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>
|
|
* LRO client
* gRPC wrappers & helpers
* With unit tests & docs
|
|
Children PR of https://github.com/googleapis/python-api-core/pull/26.
This PR includes AsyncIO version of:
* Polling future
* Page iterator
The AsyncIO version of polling future still uses the same mechanism as the sync version. The AsyncIO polling future tries to update its own state whenever the application want to access information or perform actions.
For page iterator, it has similar interface design as sync version. But instead of fulfilling normal generator protocol, it is based on the async generator.
Related #23
|
|
* Retry._deadline exposed as a property
* feat Retry._deadline exposed as a property
* added property test
Co-authored-by: q-logic <52290913+q-logic@users.noreply.github.com>
Co-authored-by: Christopher Wilcox <crwilcox@google.com>
|
|
|
|
This change includes:
* Nox configuration support for AsynciO unit tests
* No pre release gRPC Python required
* AsyncIO retry module
* AsyncIO config parsing module
* Exception parsing patch
* Corresponding unit test cases
|
|
* feat(api-core): add client_cert_source to ClientOptions
* Update google/api_core/client_options.py
Co-Authored-By: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>
* bump google-auth version
* update noxfile.py to fix docs problem
Co-authored-by: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>
|
|
under a retry context (#10206)
|
|
* feat(api_core): add retry param into PollingFuture() and it's inheritors
Towards #6197
|
|
* feat(api_core): support version 3 policy bindings
* fix(doc): fix documenting bindings structure
* try fixing docs
* fix pytype error
* fill test coverage
* indent docs
* fix docs
* improve test coverage
* linty
* remove unused variable
|
|
* feat(api_core): allow setting Retry deadline as strict
If a deadline is set as strict, Retry will shorten the last sleep
period to end at the given deadline, and not possibly stretch beyond
it.
* feat(core): make the last retry happen at deadline
This commit changes Retry instances in a way that the last sleep period
is shortened so that its end matches at the given deadline. This
prevents the last sleep period to last way beyond the deadline.
|
|
|
|
|
|
* Provide a 'raw_page' field for page_iterator.Page
Some paginated response messages include additional fields that users
may wish to inspect.
|
|
Avoid blocking for ill-behaved daemon threads during BiDi shutdown.
Closes #8616, #9008.
|
|
|
|
Closes #8733.
|
|
Closes #7826.
|
|
|
|
* Add bidi._Throttle helper class
* Add optional reopen throttling to ResumableBidiRpc
* Enable Bidi reopen throttling in SPM
* Change bidi._Throttle signature
The commit renames the entry_cap parameter to access_limit, and
changes the type of the time_window argument from float to timedelta.
|
|
Also, pin grpcio < 2.0dev.
Closes #5410.
|
|
* Add parameterized test for from_rfc3339 with nanos
|
|
* Add 'user_agent' and 'extra_headers' properties to 'Connection'.
Deprecate the 'USER_AGENT' and '_EXTRA_HEADERS' class-level attributes.
* Add 'client_info' parameter to 'Connection' ctor.
* Implement 'Connection.user_agent' via its '_client_info'.
* Ensure 'X-Goog-API-Client' header is always passed.
* Create/use non-GAPIC-specific 'ClientInfo' class FBO HTTP/JSON clients.
Derive the existing GAPIC class from it.
|
|
* Add `user_agent` property to `ClientInfo`
This provides a way for partners to define a prefix identifying their
tool or application, as required by many cloud partnership agreements.
* Workaround for pytype pyi error with nested class.
|
|
|
|
* allows providing rpc metadata for bidi streams
|
|
This commit adds support for unwrapping wrapped
pb2 objects from Anys (needed for LRO support with
wrapping).
|
|
This commit adds a `deserialize` method to the Operation object.
The class method is a helper to deserialize the serialized protobuf
operation messages.
|
|
F632 use ==/!= to compare str, bytes, and int literals.
|
|
'google.protobuf.timestamp_pb2.Timestamp' (#6919)
Toward #6547.
|
|
* Run 'pytype' only over the 'google/' directory.
* Ignore 'pytype_output/' derived files.
* Remove spurious 'MutableMapping.register' call.
'pytype' chokes on it, but the 'Policy' class already derives from
'MutableMapping', so the call is a no-op.
* Silence deprecation spew during IAM unit tests.
|