Skip to content

get_codec modifies its argument  #78

@jeromekelleher

Description

@jeromekelleher

The get_codec function modifies its argument, popping the "id" key. This can lead to surprising behaviour such as:

config = {"id": "json"}
codec = get_codec(config) # Works
codec = get_codec(config) # fails.

I suggest adding config = dict(config) at the start of the function. The performance implications should be minimal I think.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions