Thanks to visit codestin.com
Credit goes to github.com

Skip to content

client_options.from_dict should accept other mapping types #14

Closed
@busunkim96

Description

@busunkim96

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:

Metadata

Metadata

Assignees

Labels

type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions