Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

Error with python-click > 6.7 #268

Closed
aegiap opened this issue Sep 18, 2018 · 7 comments
Closed

Error with python-click > 6.7 #268

aegiap opened this issue Sep 18, 2018 · 7 comments
Labels

Comments

@aegiap
Copy link
Contributor

aegiap commented Sep 18, 2018

On Debian buster, with a release 1.2 installed and python-click in a version 6.7+git20180829-1 (pre 6.8), the GANDI CLI throw error on bg parameter for some command.

$ gandi vm stop beasdie2
Traceback (most recent call last):
  File "/usr/bin/gandi", line 11, in <module>
    load_entry_point('gandi.cli==1.2', 'console_scripts', 'gandi')()
  File "/usr/lib/python2.7/dist-packages/gandi/cli/__main__.py", line 8, in main
    cli(obj={})
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 758, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 713, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python2.7/dist-packages/gandi/cli/core/cli.py", line 162, in invoke
    click.Group.invoke(self, ctx)
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 1131, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 1131, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 950, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 551, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 551, in invoke
    return callback(*args, **kwargs)
TypeError: stop() got an unexpected keyword argument 'bg'

The same command is working fine with the same release of gandi.cli (1.2) and python-click 6.7 in a virtualenv.

Could be related to pallets/click#793 which change default in handling the long and short parameters in python-click.

@aegiap aegiap added the bug label Sep 18, 2018
grigouze pushed a commit that referenced this issue Oct 1, 2018
the problem is in issue #268
@grigouze
Copy link

grigouze commented Oct 1, 2018

@aegiap maybe we can patch with #271 ?

@aegiap
Copy link
Contributor Author

aegiap commented Oct 1, 2018

@grigouze we need to plan an update of the code to support the change of default handling in the parameters.

@jvoisin
Copy link

jvoisin commented Oct 3, 2018

It would be nice to have the quickfix merged in the master, and a new issue opened for the migration to python-click > 6.7 ♥

aegiap pushed a commit that referenced this issue Oct 3, 2018
the problem is in issue #268
@grigouze
Copy link

grigouze commented Oct 6, 2018

@jvoisin It's merged 😺

@tombugs
Copy link

tombugs commented Dec 20, 2018

Hi all. Is there any update on the migration to python-click > 6.7? We're up to python-click 7.0 now, and there is still this requirement for < 6.7.

@grigouze
Copy link

@tombugs yes there is a new PR #276

@grigouze
Copy link

Fixed with new release 1.4

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants