8000 client_options.from_dict should accept other mapping types · Issue #14 · googleapis/python-api-core · GitHub
[go: up one dir, main page]

Skip to content
Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
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

    0