-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
relaxed click version #6801
relaxed click version #6801
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6801 +/- ##
=======================================
Coverage 70.69% 70.69%
=======================================
Files 138 138
Lines 16602 16602
Branches 2091 2091
=======================================
Hits 11737 11737
Misses 4669 4669
Partials 196 196
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
Please hold off merging this as we're going to release 5.1.1 first once I finish up with a few patches. |
ok |
Calling the CLI with no args results in the following traceback with these relaxed dependencies on 5.1.1. Traceback (most recent call last):
File "/nix/store/2k70q69lvbhs1bmjvjgxj2paaxrqdwmi-python3.8-celery-5.1.1/bin/.celery-wrapped", line 9, in <module>
sys.exit(main())
File "/nix/store/2k70q69lvbhs1bmjvjgxj2paaxrqdwmi-python3.8-celery-5.1.1/lib/python3.8/site-packages/celery/__main__.py", line 15, in main
sys.exit(_main())
File "/nix/store/2k70q69lvbhs1bmjvjgxj2paaxrqdwmi-python3.8-celery-5.1.1/lib/python3.8/site-packages/celery/bin/celery.py", line 213, in main
return celery(auto_envvar_prefix="CELERY")
File "/nix/store/s6a73ssai10wpz50nnk2cy3k48wydl05-python3.8-click-8.0.1/lib/python3.8/site-packages/click/core.py", line 1137, in __call__
return self.main(*args, **kwargs)
File "/nix/store/s6a73ssai10wpz50nnk2cy3k48wydl05-python3.8-click-8.0.1/lib/python3.8/site-packages/click/core.py", line 1061, in main
with self.make_context(prog_name, args, **extra) as ctx:
File "/nix/store/s6a73ssai10wpz50nnk2cy3k48wydl05-python3.8-click-8.0.1/lib/python3.8/site-packages/click/core.py", line 923, in make_context
self.parse_args(ctx, args)
File "/nix/store/s6a73ssai10wpz50nnk2cy3k48wydl05-python3.8-click-8.0.1/lib/python3.8/site-packages/click/core.py", line 1624, in parse_args
rest = super().parse_args(ctx, args)
File "/nix/store/s6a73ssai10wpz50nnk2cy3k48wydl05-python3.8-click-8.0.1/lib/python3.8/site-packages/click/core.py", line 1379, in parse_args
value, args = param.handle_parse_result(ctx, opts, args)
File "/nix/store/s6a73ssai10wpz50nnk2cy3k48wydl05-python3.8-click-8.0.1/lib/python3.8/site-packages/click/core.py", line 2364, in handle_parse_result
value = self.process_value(ctx, value)
File "/nix/store/s6a73ssai10wpz50nnk2cy3k48wydl05-python3.8-click-8.0.1/lib/python3.8/site-packages/click/core.py", line 2326, in process_value
value = self.callback(ctx, self, value)
File "/nix/store/s6a73ssai10wpz50nnk2cy3k48wydl05-python3.8-click-8.0.1/lib/python3.8/site-packages/click/core.py", line 1279, in show_help
echo(ctx.get_help(), color=ctx.color)
File "/nix/store/s6a73ssai10wpz50nnk2cy3k48wydl05-python3.8-click-8.0.1/lib/python3.8/site-packages/click/core.py", line 704, in get_help
return self.command.get_help(self)
File "/nix/store/s6a73ssai10wpz50nnk2cy3k48wydl05-python3.8-click-8.0.1/lib/python3.8/site-packages/click/core.py", line 1304, in get_help
self.format_help(ctx, formatter)
File "/nix/store/s6a73ssai10wpz50nnk2cy3k48wydl05-python3.8-click-8.0.1/lib/python3.8/site-packages/click/core.py", line 1335, in format_help
self.format_options(ctx, formatter)
File "/nix/store/s6a73ssai10wpz50nnk2cy3k48wydl05-python3.8-click-8.0.1/lib/python3.8/site-packages/click/core.py", line 1532, in format_options
super().format_options(ctx, formatter)
File "/nix/store/s6a73ssai10wpz50nnk2cy3k48wydl05-python3.8-click-8.0.1/lib/python3.8/site-packages/click/core.py", line 1355, in format_options
rv = param.get_help_record(ctx)
File "/nix/store/s6a73ssai10wpz50nnk2cy3k48wydl05-python3.8-click-8.0.1/lib/python3.8/site-packages/click/core.py", line 2727, in get_help_record
default_value = self.get_default(ctx, call=False)
TypeError: get_default() got an unexpected keyword argument 'call' |
@mweinelt Thanks for the heads up! |
I've tried to fix the issue. It seems that the Lines 141 to 144 in 82fe649
When I change it to: def get_default(self, ctx, **kwargs):
if self.default_value_from_context:
self.default = ctx.obj[self.default_value_from_context]
return super().get_default(ctx, **kwargs) It works fine. Could anybody try it or should I open a new PR? |
I'll try it. |
It also seems that even correct usage causes apparently click-related issues:
Is anyone working on this? When celery gets out of sync with its dependencies, it makes it much harder to package it downstream. |
you can come with a PR |
I'm looking at it now, here's the traceback for that:
|
looks related to this change pallets/click@0c108f2 |
I'm closing this as this was superseded by #6861. |
No description provided.