From d9f4d13f4ada7bb9771ce16b8aa29ee53519167e Mon Sep 17 00:00:00 2001 From: Ievgenii Shepeliuk Date: Mon, 24 Jul 2023 19:51:49 +0300 Subject: [PATCH] feat: support python 3.10 --- .github/workflows/build.yaml | 10 +++++--- README.md | 3 +++ poetry.lock | 44 +++++++++++++++++++++++++++++------- pykli/__main__.py | 2 +- pyproject.toml | 5 ++-- 5 files changed, 50 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 391c8a5..2959cbe 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -17,6 +17,10 @@ on: jobs: build_job: runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.10", "3.11"] steps: - uses: actions/checkout@v3 with: @@ -27,12 +31,12 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} - uses: actions/setup-python@v4 with: - python-version: '3.11' + python-version: ${{ matrix.python-version }} - uses: Gr1N/setup-poetry@v8 - uses: actions/cache@v3 with: path: ~/.cache/pypoetry/virtualenvs - key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }} + key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles('poetry.lock') }} - run: | poetry install - uses: extractions/setup-just@v1 @@ -43,7 +47,7 @@ jobs: uses: dorny/test-reporter@v1 if: ${{ success() || failure() }} with: - name: test report + name: test report ${{ matrix.python-version }} path: ./test-*.xml reporter: java-junit - name: failure logs diff --git a/README.md b/README.md index ac5ecc4..f330a8d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ # pyKLI +[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) +[![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/) [![PyPI version](https://badge.fury.io/py/pykli.svg)](https://badge.fury.io/py/pykli) +![PyPI - License](https://img.shields.io/pypi/l/pykli) Interactive [ksqlDB](https://ksqldb.io/) command line client with autocompletion and syntax highlighting written in Python. diff --git a/poetry.lock b/poetry.lock index 4d81835..34f24ea 100644 --- a/poetry.lock +++ b/poetry.lock @@ -12,6 +12,7 @@ files = [ ] [package.dependencies] +exceptiongroup = {version = "*", markers = "python_version < \"3.11\""} idna = ">=2.8" sniffio = ">=1.1" @@ -22,13 +23,13 @@ trio = ["trio (<0.22)"] [[package]] name = "certifi" -version = "2023.5.7" +version = "2023.7.22" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" files = [ - {file = "certifi-2023.5.7-py3-none-any.whl", hash = "sha256:c6c2e98f5c7869efca1f8916fed228dd91539f9f1b444c314c06eef02980c716"}, - {file = "certifi-2023.5.7.tar.gz", hash = "sha256:0f0d56dc5a6ad56fd4ba36484d6cc34451e1c6548c61daad8c320169f91eddc7"}, + {file = "certifi-2023.7.22-py3-none-any.whl", hash = "sha256:92d6037539857d8206b8f6ae472e8b77db8058fec5937a1ef3f54304089edbb9"}, + {file = "certifi-2023.7.22.tar.gz", hash = "sha256:539cc1d13202e33ca466e88b2807e29f4c13049d6d87031a3c110744495cb082"}, ] [[package]] @@ -52,13 +53,13 @@ styles = ["Pygments (>=1.6)"] [[package]] name = "click" -version = "8.1.3" +version = "8.1.6" description = "Composable command line interface toolkit" optional = false python-versions = ">=3.7" files = [ - {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"}, - {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"}, + {file = "click-8.1.6-py3-none-any.whl", hash = "sha256:fa244bb30b3b5ee2cae3da8f55c9e5e0c0e86093306301fb418eb9dc40fbded5"}, + {file = "click-8.1.6.tar.gz", hash = "sha256:48ee849951919527a045bfe3bf7baa8a959c423134e1a5b98c05c20ba75a1cbd"}, ] [package.dependencies] @@ -89,6 +90,20 @@ files = [ [package.dependencies] six = "*" +[[package]] +name = "exceptiongroup" +version = "1.1.2" +description = "Backport of PEP 654 (exception groups)" +optional = false +python-versions = ">=3.7" +files = [ + {file = "exceptiongroup-1.1.2-py3-none-any.whl", hash = "sha256:e346e69d186172ca7cf029c8c1d16235aa0e04035e5750b4b95039e65204328f"}, + {file = "exceptiongroup-1.1.2.tar.gz", hash = "sha256:12c3e887d6485d16943a309616de20ae5582633e0a2eda17f4e10fd61c1e8af5"}, +] + +[package.extras] +test = ["pytest (>=6)"] + [[package]] name = "h11" version = "0.14.0" @@ -271,9 +286,11 @@ files = [ [package.dependencies] colorama = {version = "*", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} iniconfig = "*" packaging = "*" pluggy = ">=0.12,<2.0" +tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} [package.extras] testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] @@ -350,6 +367,17 @@ wcwidth = {version = "*", optional = true, markers = "extra == \"widechars\""} [package.extras] widechars = ["wcwidth"] +[[package]] +name = "tomli" +version = "2.0.1" +description = "A lil' TOML parser" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, + {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, +] + [[package]] name = "wcwidth" version = "0.2.6" @@ -374,5 +402,5 @@ files = [ [metadata] lock-version = "2.0" -python-versions = "^3.11" -content-hash = "19f0b589570acd55a5e6beacaacf9c33c3abb3dc4020733c1619a55f6198de9b" +python-versions = "^3.10" +content-hash = "2ab0e3197e481a8ee8541f497b4d0e890891f7bd50ed5dce8aa84bbe5695912d" diff --git a/pykli/__main__.py b/pykli/__main__.py index 3c2c759..690935a 100644 --- a/pykli/__main__.py +++ b/pykli/__main__.py @@ -13,7 +13,7 @@ @click.command() @click.option('-f', '--file', help="execute commands from file, then exit", type=click.Path(exists=True, path_type=pathlib.Path)) -@click.argument("server", default = "http://localhost:8088") +@click.argument("server") @click.version_option(prog_name="pyKLI") def main(server, file): """ diff --git a/pyproject.toml b/pyproject.toml index 50c11c9..51e4a03 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pyKLI" -version = "1.0.0" +version = "1.1.1" description = "Interactive ksqlDB command line client with autocompletion and syntax highlighting" license = "MIT" authors = ["Ievgenii Shepeliuk "] @@ -11,7 +11,7 @@ keywords = ["cli", "kafka", "tui", "confluent", "ksql", "ksqldb"] packages = [{include = "pykli"}] [tool.poetry.dependencies] -python = "^3.11" +python = "^3.10" click = "^8.1.3" prompt-toolkit = "^3.0.38" pygments = "^2.15.1" @@ -26,6 +26,7 @@ pykli = "pykli.__main__:main" [tool.poetry.group.dev.dependencies] pytest = "^7.3.1" pytest-mock = "^3.11.1" +exceptiongroup = {version = "^1", python = "<3.11"} [build-system] requires = ["poetry-core"]