Skip to content
Myr

Legacy callbacks are warnings now.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 99e3d8d · Browse files · 1 file+5 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−5 removed

  • other:+5 added−5 removed

1 file+5 added−5 removed

modified:click/core.py+5 added-5 removed
37 unmodified lines
38 args = getattr(code, 'co_argcount', 3)3940 if args < 3:41 # This will become a warning in click 3.0:42 ## from warnings import warn43 ## warn(Warning('Invoked legacy parameter callback "%s". The new '44 ## 'signature for such callbacks starting with '45 ## 'click 2.0 is (ctx, param, value).'46 ## % callback), stacklevel=3)42 from warnings import warn43 warn(Warning('Invoked legacy parameter callback "%s". The new '44 'signature for such callbacks starting with '45 'click 2.0 is (ctx, param, value).'46 % callback), stacklevel=3)47 return callback(ctx, value)48 return callback(ctx, param, value)4950
1281 unmodified lines