Skip to content

Drop support for mutable types as dropdown options #1958

@fterbo

Description

@fterbo

I know this has been reviewed before, but I humbly request it be reviewed again.. :-)

I don't see any upside to supporting dictionaries as an options list (you can just use widget.options = dict.items() if you want the same behaviour, which more clearly separates ownership semantics), and it is a source of many pitfalls. I suspect that many people use dictionaries simply because it's more prominently featured in the docs than the list-of-tuples approach.

I realize this is a backwards-incompatible change, but I think moving forward it would reduce community support burden (and frustrated user time). Certainly this could be done in a phased manner with DeprecationWarning (making sure users can actually see it, of course).

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueresolved-lockedClosed issues are locked after 30 days inactivity. Please open a new issue for related discussion.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions