click-repl icon indicating copy to clipboard operation
click-repl copied to clipboard

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

Open TomerGodinger opened this issue 8 months ago • 4 comments

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).

TomerGodinger avatar May 13 '25 12:05 TomerGodinger

can you please create a PR to fix this?

auvipy avatar May 19 '25 10:05 auvipy

Huge number of breaking changes in a release also a lot of deprecations https://click.palletsprojects.com/en/stable/changes/

auvipy avatar May 19 '25 11:05 auvipy

this library only support 8.1.x for now

auvipy avatar May 19 '25 11:05 auvipy

@auvipy created https://github.com/click-contrib/click-repl/pull/131 to explicitly say that >8.2.0 isn't supported. The CI/CD then also starts passing, because by default if it isn't limited, it pulls up the latest Click.

opirko avatar Jun 16 '25 09:06 opirko