diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-04-01 04:07:02 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-04-01 04:07:02 +0000 |
commit | 4d83eda2300105d107fd703c017be8b8264de07c (patch) | |
tree | 35e455d256704ad339d9d1b4bd472cda53609a53 | |
parent | Releasing debian version 1.24.3-1. (diff) | |
download | mycli-4d83eda2300105d107fd703c017be8b8264de07c.tar.xz mycli-4d83eda2300105d107fd703c017be8b8264de07c.zip |
Merging upstream version 1.24.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r-- | .github/workflows/ci.yml | 2 | ||||
-rw-r--r-- | changelog.md | 12 | ||||
-rw-r--r-- | mycli/AUTHORS | 1 | ||||
-rw-r--r-- | mycli/__init__.py | 2 | ||||
-rw-r--r-- | mycli/magic.py | 2 | ||||
-rwxr-xr-x | mycli/main.py | 3 | ||||
-rw-r--r-- | test/test_main.py | 7 |
7 files changed, 22 insertions, 7 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a14472..b678f57 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/changelog.md b/changelog.md index 340b283..b5522d2 100644 --- a/changelog.md +++ b/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) =================== diff --git a/mycli/AUTHORS b/mycli/AUTHORS index 308e962..d1f3a28 100644 --- a/mycli/AUTHORS +++ b/mycli/AUTHORS @@ -87,6 +87,7 @@ Contributors: * Zhaolong Zhu * Zhidong * Zhongyang Guan + * Arvind Mishra Created by: ----------- diff --git a/mycli/__init__.py b/mycli/__init__.py index f7704b3..e10d6ee 100644 --- a/mycli/__init__.py +++ b/mycli/__init__.py @@ -1 +1 @@ -__version__ = '1.24.3' +__version__ = '1.24.4' diff --git a/mycli/magic.py b/mycli/magic.py index b1a3268..aad229a 100644 --- a/mycli/magic.py +++ b/mycli/magic.py @@ -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 diff --git a/mycli/main.py b/mycli/main.py index 3f08e9c..c13ed78 100755 --- a/mycli/main.py +++ b/mycli/main.py @@ -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): diff --git a/test/test_main.py b/test/test_main.py index 00fdc1b..7731603 100644 --- a/test/test_main.py +++ b/test/test_main.py @@ -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(): |