Merging upstream version 1.24.4.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
d4cbf43afd
commit
c3d94d7b9c
7 changed files with 22 additions and 7 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -12,7 +12,7 @@ jobs:
|
|||
python-version: [3.6, 3.7, 3.8, 3.9]
|
||||
include:
|
||||
- python-version: 3.6
|
||||
os: ubuntu-16.04 # MySQL 5.7.32
|
||||
os: ubuntu-18.04 # MySQL 5.7.32
|
||||
- python-version: 3.7
|
||||
os: ubuntu-18.04 # MySQL 5.7.32
|
||||
- python-version: 3.8
|
||||
|
|
12
changelog.md
12
changelog.md
|
@ -1,3 +1,15 @@
|
|||
1.24.4 (2022/03/30)
|
||||
===================
|
||||
|
||||
Internal:
|
||||
---------
|
||||
* Upgrade Ubuntu VM for runners as Github has deprecated it
|
||||
|
||||
Bug Fixes:
|
||||
----------
|
||||
* Change in main.py - Replace the `click.get_terminal_size()` with `shutil.get_terminal_size()`
|
||||
|
||||
|
||||
1.24.3 (2022/01/20)
|
||||
===================
|
||||
|
||||
|
|
|
@ -87,6 +87,7 @@ Contributors:
|
|||
* Zhaolong Zhu
|
||||
* Zhidong
|
||||
* Zhongyang Guan
|
||||
* Arvind Mishra
|
||||
|
||||
Created by:
|
||||
-----------
|
||||
|
|
|
@ -1 +1 @@
|
|||
__version__ = '1.24.3'
|
||||
__version__ = '1.24.4'
|
||||
|
|
|
@ -30,7 +30,7 @@ def mycli_line_magic(line):
|
|||
u = conn.session.engine.url
|
||||
_logger.debug('New mycli: %r', str(u))
|
||||
|
||||
mycli.connect(u.database, u.host, u.username, u.port, u.password)
|
||||
mycli.connect(host=u.host, port=u.port, passwd=u.password, database=u.database, user=u.username, init_command=None)
|
||||
conn._mycli = mycli
|
||||
|
||||
# For convenience, print the connection alias
|
||||
|
|
|
@ -2,6 +2,7 @@ from collections import defaultdict
|
|||
from io import open
|
||||
import os
|
||||
import sys
|
||||
import shutil
|
||||
import traceback
|
||||
import logging
|
||||
import threading
|
||||
|
@ -1054,7 +1055,7 @@ class MyCli(object):
|
|||
"""Get the number of lines to reserve for the completion menu."""
|
||||
reserved_space_ratio = .45
|
||||
max_reserved_space = 8
|
||||
_, height = click.get_terminal_size()
|
||||
_, height = shutil.get_terminal_size()
|
||||
return min(int(round(height * reserved_space_ratio)), max_reserved_space)
|
||||
|
||||
def get_last_query(self):
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import os
|
||||
import shutil
|
||||
|
||||
import click
|
||||
from click.testing import CliRunner
|
||||
|
@ -258,13 +259,13 @@ def test_reserved_space_is_integer():
|
|||
def stub_terminal_size():
|
||||
return (5, 5)
|
||||
|
||||
old_func = click.get_terminal_size
|
||||
old_func = shutil.get_terminal_size
|
||||
|
||||
click.get_terminal_size = stub_terminal_size
|
||||
shutil.get_terminal_size = stub_terminal_size
|
||||
mycli = MyCli()
|
||||
assert isinstance(mycli.get_reserved_space(), int)
|
||||
|
||||
click.get_terminal_size = old_func
|
||||
shutil.get_terminal_size = old_func
|
||||
|
||||
|
||||
def test_list_dsn():
|
||||
|
|
Loading…
Add table
Reference in a new issue