Merging upstream version 1.8.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
d6182ff8b2
commit
c82478bb50
9 changed files with 31 additions and 16 deletions
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
@ -11,7 +11,7 @@ jobs:
|
|||
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.6, 3.7, 3.8, 3.9]
|
||||
python-version: ["3.7", "3.8", "3.9", "3.10"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -36,7 +36,7 @@ jobs:
|
|||
- name: Run Black
|
||||
run: |
|
||||
./setup.py lint
|
||||
if: matrix.python-version == '3.6'
|
||||
if: matrix.python-version == '3.7'
|
||||
|
||||
- name: Coverage
|
||||
run: |
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
repos:
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 21.12b0
|
||||
rev: 22.3.0
|
||||
hooks:
|
||||
- id: black
|
||||
|
|
13
CHANGELOG.md
13
CHANGELOG.md
|
@ -1,3 +1,16 @@
|
|||
## 1.8.0 - 2022-03-29
|
||||
|
||||
### Features
|
||||
|
||||
* Update compatible Python versions. (Thanks: [blazewicz])
|
||||
* Add support for Python 3.10. (Thanks: [blazewicz])
|
||||
* Drop support for Python 3.6. (Thanks: [blazewicz])
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Upgrade cli_helpers to workaround Pygments regression.
|
||||
* Use get_terminal_size from shutil instead of click.
|
||||
|
||||
## 1.7.0 - 2022-01-11
|
||||
|
||||
### Features
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Development Guide
|
||||
|
||||
This is a guide for developers who would like to contribute to this project. It is recommended to use Python 3.6 and above for development.
|
||||
This is a guide for developers who would like to contribute to this project. It is recommended to use Python 3.7 and above for development.
|
||||
|
||||
If you're interested in contributing to litecli, thank you. We'd love your help!
|
||||
You'll always get credit for your work.
|
||||
|
@ -79,7 +79,7 @@ hasn't broken any existing functionality. To run the tests, just type in:
|
|||
$ ./setup.py test
|
||||
```
|
||||
|
||||
litecli supports Python 2.7 and 3.4+. You can test against multiple versions of
|
||||
litecli supports Python 3.7+. You can test against multiple versions of
|
||||
Python by running tox:
|
||||
|
||||
```bash
|
||||
|
|
|
@ -1 +1 @@
|
|||
__version__ = "1.7.0"
|
||||
__version__ = "1.8.0"
|
||||
|
|
|
@ -11,6 +11,7 @@ from datetime import datetime
|
|||
from io import open
|
||||
from collections import namedtuple
|
||||
from sqlite3 import OperationalError
|
||||
import shutil
|
||||
|
||||
from cli_helpers.tabular_output import TabularOutputFormatter
|
||||
from cli_helpers.tabular_output import preprocessors
|
||||
|
@ -815,7 +816,7 @@ class LiteCli(object):
|
|||
"""Get the number of lines to reserve for the completion menu."""
|
||||
reserved_space_ratio = 0.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):
|
||||
|
|
10
setup.py
10
setup.py
|
@ -24,11 +24,11 @@ readme = open_file("README.md")
|
|||
|
||||
install_requirements = [
|
||||
"click >= 4.1",
|
||||
"Pygments>=1.6,<=2.11.1",
|
||||
"Pygments>=1.6",
|
||||
"prompt_toolkit>=3.0.3,<4.0.0",
|
||||
"sqlparse",
|
||||
"configobj >= 5.0.5",
|
||||
"cli_helpers[styles] >= 1.0.1",
|
||||
"cli_helpers[styles] >= 2.2.1",
|
||||
]
|
||||
|
||||
|
||||
|
@ -57,10 +57,10 @@ setup(
|
|||
"Operating System :: Unix",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.4",
|
||||
"Programming Language :: Python :: 3.5",
|
||||
"Programming Language :: Python :: 3.6",
|
||||
"Programming Language :: Python :: 3.7",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: SQL",
|
||||
"Topic :: Database",
|
||||
"Topic :: Database :: Front-Ends",
|
||||
|
|
|
@ -2,6 +2,7 @@ import os
|
|||
from collections import namedtuple
|
||||
from textwrap import dedent
|
||||
from tempfile import NamedTemporaryFile
|
||||
import shutil
|
||||
|
||||
import click
|
||||
from click.testing import CliRunner
|
||||
|
@ -232,12 +233,12 @@ 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
|
||||
lc = LiteCli()
|
||||
assert isinstance(lc.get_reserved_space(), int)
|
||||
click.get_terminal_size = old_func
|
||||
shutil.get_terminal_size = old_func
|
||||
|
||||
|
||||
@dbtest
|
||||
|
|
2
tox.ini
2
tox.ini
|
@ -1,5 +1,5 @@
|
|||
[tox]
|
||||
envlist = py27, py34, py35, py36, py37
|
||||
envlist = py37, py38, py39, py310
|
||||
|
||||
[testenv]
|
||||
deps = pytest
|
||||
|
|
Loading…
Add table
Reference in a new issue