Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client_options.from_dict should accept other mapping types #14

Closed
busunkim96 opened this issue Mar 11, 2020 · 0 comments · Fixed by #53
Closed

client_options.from_dict should accept other mapping types #14

busunkim96 opened this issue Mar 11, 2020 · 0 comments · Fixed by #53
Assignees
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@busunkim96
Copy link
Contributor

Raised by @plamut in googleapis/google-api-python-client#829.

Is there a reason for accepting dicts only? Someone might prefer having the options stored in a different dict flavor, e.g. defaultdict, and accepting mappings in general would represent a usability improvement to them.

Documentation in this library needs to be updated. See https://googleapis.dev/python/google-api-core/latest/client_options.html

Clients should also be updated to accept mapping types:

 if isinstance(client_options, six.moves.collections_abc.Mapping):

instead of

if type(client_options) == dict:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
1 participant