Skip to content

Support Click 8.2.0 (fix AttributeError: property 'protected_args' of 'Context' object has no setter) #128

@TomerGodinger

Description

@TomerGodinger

The Click 8.2.0 update has deprecated the protected_args property, so now every command entered causes an AttributeError and the REPL session exits:

...
  File ".../lib/python3.11/site-packages/click_repl/_repl.py", line 137, in repl
    group_ctx.protected_args = old_protected_args
    ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: property 'protected_args' of 'Context' object has no setter

It's enough to pip install click click-repl and then run the usage example from the README to recreate this (I tested this with Python 3.11).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions