Skip to content

Add support for set and frozenset (and dict?) as native Click types #3036

Open

Description

@kdeldycke

Context

This is a follow-up on #2610. Half of the latter has been solved by #3030. This ticket contain the other half that was not fixed by #3030.

CC @drunkwcodes

Activity

  1. added this to the 9.0.0 milestone on Aug 13, 2025
  2. modified the milestones: 9.0.0, 8.3.0 on Aug 14, 2025
  3. changed the title [-]Add support for `set` and `frozenset` as native Click types[/-] [+]Add support for `set` and `frozenset` (and `dict`?) as native Click types[/+] on Aug 23, 2025
  4. modified the milestones: 8.3.0, 9.0.0 on Aug 23, 2025
  5. Rowlando13 commented on Sep 26, 2025

    @Rowlando13
    Member

    I am unclear what this issue is for. @kdeldycke can you please be more specific. Is it for adding the param types for set, frozenset, dict? I saw the test that shows there is a way to instantiate the types.

  6. kdeldycke commented on Sep 29, 2025

    @kdeldycke
    CollaboratorAuthor

    I am unclear what this issue is for. @kdeldycke can you please be more specific. Is it for adding the param types for set, frozenset, dict? I saw the test that shows there is a way to instantiate the types.

    My goal is to start sparkling these native types in the various unit tests. And just search for edge-cases and inconsistent behavior. A bit like fuzzy testing. If everything's fine then we will have additional tests. If not I will start a discussion and propose code to fix stuff. That's it ! :)

  7. Rowlando13 commented on Sep 30, 2025

    @Rowlando13
    Member

    Got it.

  8. davidism commented on Sep 30, 2025

    @davidism
    Member

    Could you describe what you expect to happen with these types? tuple is pretty clear, it indicates a compound type, and data from the CLI is fixed, not a mutable list.

  9. kdeldycke commented on Oct 8, 2025

    @kdeldycke
    CollaboratorAuthor

    Could you describe what you expect to happen with these types? tuple is pretty clear, it indicates a compound type, and data from the CLI is fixed, not a mutable list.

    I created this ticket to not hide under the rug the concerns raised about these types in #2610, so I could close the later. And also based on some gut feelings. But if this is too speculative for now, we can close it as too vague. I may come back in the future with a more material proposition in the form of a PR.

  10. added
    parsingParsing, parameters, commands, chaining, context
    on Aug 8, 2026
  11. added
    typingType annotations and stubs
    testsClick's own test suite and CI workflows
    and removed
    parsingParsing, parameters, commands, chaining, context
    on Aug 29, 2026
  12. modified the milestones: 9.0.0, 8.5.1 on Aug 29, 2026
  13. changed the issue type fromtoon Aug 29, 2026
  14. kdeldycke commented on Sep 8, 2026

    @kdeldycke
    CollaboratorAuthor

    All the current behavior of Click around these types has been locked down and covered by unittest in #3808 to prevent regression and document the current state of things.

    This issue is still open as it target proper conservation and handling of these types, which has not been addressed and will probably involve some breaking changes. As such I move this issue to the major 9.0.0 release.

  15. modified the milestones: 8.5.1, 9.0.0 on Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsClick's own test suite and CI workflowstypingType annotations and stubs

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions