You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds support for creating a GlueCatalog with own client (#1920)
Closes#1910
# Rationale for this change
When working with the GlueCatalog, I may already have a GlueClient that
I've instantiated from elsewhere, and perhaps wish to keep. This allows
passing our client to the GlueCatalog constructor so that we aren't
forced into getting a new client.
This is slightly interesting because it's the only catalog that now has
a different constructor signature. Also it may be odd for users to pass
a client, but then none of their properties (which may have retry
configs) are applied.
An alternative to consider is having a `from_client` or `with_client`
staticmethod, but I did not see precedence elsewhere. I will leave it to
the maintainers to decide which they prefer and will update accordingly.
Similarly, I can do the same for dynamodb 🙂
I've also skipped the event_handler for a user-provided client because I
wouldn't want to impede on their existing events, also the param is
optional. Something to consider is using the [unique_id
arg](https://github.com/boto/botocore/blob/aaa6690e45c8dabcde3a8d2d1aa34b5fd399fba7/botocore/hooks.py#L89)
when registering an event.
> If a ``unique_id`` is given, the handler will not be registered
> if a handler with the ``unique_id`` has already been registered.
# Are these changes tested?
Basic unit test to assert the client passed is the client used.
# Are there any user-facing changes?
I believe so since this is an addition to the public API.
0 commit comments