dbcli / mycli

A Terminal Client for MySQL with AutoCompletion and Syntax Highlighting.
http://mycli.net
Other
11.5k stars 664 forks source link

Incompatible with python-click >= 8.1.0 #1038

Closed morgan-greywolf closed 2 years ago

morgan-greywolf commented 2 years ago

Incompatible with python-click >= 8.1.0, which seems to lack a get_terminal_size() function that mycli requires.

Traceback:

  File "/usr/bin/mycli", line 33, in <module>
    sys.exit(load_entry_point('mycli==1.24.3', 'console_scripts', 'mycli')())
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/mycli/main.py", line 1296, in cli
    mycli.run_cli()
  File "/usr/lib/python3.10/site-packages/mycli/main.py", line 808, in run_cli
    reserve_space_for_menu=self.get_reserved_space(),
  File "/usr/lib/python3.10/site-packages/mycli/main.py", line 1057, in get_reserved_space
    _, height = click.get_terminal_size()
AttributeError: module 'click' has no attribute 'get_terminal_size'

Click version:

Type "help", "copyright", "credits" or "license" for more information.
>>> import click
>>> click.__version__
'8.1.0'
morgan-greywolf commented 2 years ago

I confirmed that mycli is still working fine after downgrading click to 8.0.4.

rolandwalker commented 2 years ago

Fixed in #1042