diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 02d7dea..210a124 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.15.1 +current_version = 1.15.0 commit = True tag = True diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 748ba00..d8b20c1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -21,12 +21,12 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v1 with: python-version: 3.8 architecture: 'x64' - name: Cache venv - uses: actions/cache@v4 + uses: actions/cache@v1 with: path: venv # Look to see if there is a cache hit for the corresponding requirements file @@ -75,12 +75,12 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v1 with: python-version: 3.8 architecture: 'x64' - name: Cache venv - uses: actions/cache@v4 + uses: actions/cache@v1 with: path: venv # Look to see if there is a cache hit for the corresponding requirements file diff --git a/.github/workflows/test-binary-build.yaml b/.github/workflows/test-binary-build.yaml index b77b075..1fbcd80 100644 --- a/.github/workflows/test-binary-build.yaml +++ b/.github/workflows/test-binary-build.yaml @@ -21,13 +21,13 @@ jobs: options: --entrypoint redis-server steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v2 + - uses: actions/setup-python@v1 with: python-version: 3.8 architecture: 'x64' - name: Cache venv - uses: actions/cache@v4 + uses: actions/cache@v1 with: path: venv # Look to see if there is a cache hit for the corresponding requirements file @@ -71,7 +71,7 @@ jobs: ./build/x86*/release/install/iredis help GET - name: Upload Release Asset to Github Artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: iredis-${{github.sha}}.tar.gz path: ./build/iredis.tar.gz diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index df0202d..6fb30ca 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - os: ["ubuntu-24.04"] + os: ["ubuntu-20.04"] python: ["3.8", "3.9", "3.10", "3.11.1", "3.12"] redis: [5, 6, 7, 7.2] runs-on: ${{ matrix.os }} @@ -26,12 +26,12 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} architecture: "x64" - name: Cache venv - uses: actions/cache@v4 + uses: actions/cache@v2 with: path: venv # Look to see if there is a cache hit for the corresponding requirements file @@ -62,13 +62,13 @@ jobs: - uses: codespell-project/actions-codespell@master with: ignore_words_list: fo,ists,oll,optin,ot,smove,tre,whe,EXAT,exat - skip: ./docs/assets/demo.svg,./iredis/data/commands.json,./iredis/data/commands/*,./tests/unittests/*,./docs/assets/* - - uses: actions/setup-python@v5 + skip: ./docs/assets/demo.svg,./iredis/data/commands.json,./iredis/data/commands/*,./tests/unittests/* + - uses: actions/setup-python@v4 with: python-version: 3.8 architecture: "x64" - name: Cache venv - uses: actions/cache@v4 + uses: actions/cache@v2 with: path: venv # Look to see if there is a cache hit for the corresponding requirements file diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a00a0f..76d4c4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,5 @@ ## UPCOMING -### 1.15.1 - -- Bugfix: fix `xgroup help` command output. - ## 1.15 - Dependency: remove pendulum, add `python-dateutil` (thanks to [deronnax]) diff --git a/debian/changelog b/debian/changelog index 630e239..d24cb56 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,3 @@ -iredis (1.15.1-1) sid; urgency=medium - - * Simplifying watch file. - * Merging upstream version 1.15.1. - - -- Daniel Baumann Thu, 24 Apr 2025 14:19:31 +0200 - iredis (1.15.0-5) sid; urgency=medium * Updating to standards version 4.7.1. diff --git a/iredis/__init__.py b/iredis/__init__.py index 8b0c915..6b0872c 100644 --- a/iredis/__init__.py +++ b/iredis/__init__.py @@ -1 +1 @@ -__version__ = "1.15.1" +__version__ = "1.15.0" diff --git a/iredis/commands.py b/iredis/commands.py index d02a263..481fc74 100644 --- a/iredis/commands.py +++ b/iredis/commands.py @@ -111,6 +111,8 @@ def split_command_args(command): :param command: redis command string, with args """ + global all_commands + command = command.strip() for command_name in all_commands: # for command that is partially input, like `command in`, we should diff --git a/iredis/config.py b/iredis/config.py index f2b1672..7a54220 100644 --- a/iredis/config.py +++ b/iredis/config.py @@ -102,6 +102,8 @@ def read_config_file(f): def load_config_files(iredisrc): + global config + with path(project_data, "iredisrc") as p: config_obj = ConfigObj(str(p)) diff --git a/iredis/data/command_syntax.csv b/iredis/data/command_syntax.csv index 579e26d..fbaf47b 100644 --- a/iredis/data/command_syntax.csv +++ b/iredis/data/command_syntax.csv @@ -231,7 +231,7 @@ stream,XACK,command_key_group_ids,render_int stream,XADD,command_xadd,render_bulk_string stream,XCLAIM,command_xclaim,render_list stream,XDEL,command_key_ids,render_int -stream,XGROUP,command_xgroup,render_list_or_int_or_string +stream,XGROUP,command_xgroup,render_string_or_int stream,XINFO,command_xinfo,render_list stream,XLEN,command_key,render_int stream,XPENDING,command_xpending,render_list diff --git a/iredis/entry.py b/iredis/entry.py index 852af05..b4615bb 100644 --- a/iredis/entry.py +++ b/iredis/entry.py @@ -30,7 +30,7 @@ logger = logging.getLogger(__name__) class SkipAuthFileHistory(FileHistory): - """Exactly like FileHistory, but won't save `AUTH` command into history + """Exactlly like FileHistory, but won't save `AUTH` command into history file.""" def append_string(self, string: str) -> None: @@ -142,19 +142,19 @@ class Rainbow: def __init__(self): self.current = -1 - self.forward = 1 + self.forword = 1 def __iter__(self): return self def __next__(self): - self.current += self.forward + self.current += self.forword if 0 <= self.current < len(self.color): # not to the end return self.color[self.current] else: - self.forward = -self.forward - self.current += 2 * self.forward + self.forword = -self.forword + self.current += 2 * self.forword return self.color[self.current] diff --git a/iredis/redis_grammar.py b/iredis/redis_grammar.py index df837f0..391cdd8 100644 --- a/iredis/redis_grammar.py +++ b/iredis/redis_grammar.py @@ -531,8 +531,7 @@ GRAMMAR = { (\s+ {STREAM_CREATE} \s+ {KEY} \s+ {GROUP} \s+ {STREAM_ID})| (\s+ {STREAM_SETID} \s+ {KEY} \s+ {GROUP} \s+ {STREAM_ID})| (\s+ {STREAM_DESTROY} \s+ {KEY} \s+ {GROUP})| - (\s+ {STREAM_DELCONSUMER} \s+ {KEY} \s+ {GROUP} \s+ {CONSUMER})| - (\s+ {HELP}) + (\s+ {STREAM_DELCONSUMER} \s+ {KEY} \s+ {GROUP} \s+ {CONSUMER}) ) \s*""", "command_key_group_ids": rf""" diff --git a/iredis/renders.py b/iredis/renders.py index 55616b1..9458263 100644 --- a/iredis/renders.py +++ b/iredis/renders.py @@ -149,14 +149,6 @@ class OutputRender: return OutputRender.render_list(text) return OutputRender.render_bulk_string(text) - @staticmethod - def render_list_or_int_or_string(text): - if isinstance(text, list): - return OutputRender.render_list(text) - if isinstance(text, int): - return OutputRender.render_int(text) - return OutputRender.render_bulk_string(text) - @staticmethod def render_string_or_int(text): if isinstance(text, int): diff --git a/poetry.lock b/poetry.lock index 4ebcfdb..5f872e9 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.5 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. [[package]] name = "async-timeout" @@ -38,15 +38,18 @@ files = [ [[package]] name = "configobj" -version = "5.0.9" +version = "5.0.8" description = "Config file reading, writing and validation." optional = false -python-versions = ">=3.7" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ - {file = "configobj-5.0.9-py2.py3-none-any.whl", hash = "sha256:1ba10c5b6ee16229c79a05047aeda2b55eb4e80d7c7d8ecf17ec1ca600c79882"}, - {file = "configobj-5.0.9.tar.gz", hash = "sha256:03c881bbf23aa07bccf1b837005975993c4ab4427ba57f959afdd9d1a2386848"}, + {file = "configobj-5.0.8-py2.py3-none-any.whl", hash = "sha256:a7a8c6ab7daade85c3f329931a807c8aee750a2494363934f8ea84d8a54c87ea"}, + {file = "configobj-5.0.8.tar.gz", hash = "sha256:6f704434a07dc4f4dc7c9a745172c1cad449feb548febd9f7fe362629c627a97"}, ] +[package.dependencies] +six = "*" + [[package]] name = "exceptiongroup" version = "1.1.3" diff --git a/pyproject.toml b/pyproject.toml index fae2772..38c3e8e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "iredis" -version = "1.15.1" +version = "1.15.0" description = "Terminal client for Redis with auto-completion and syntax highlighting." authors = ["laixintao "] readme = 'README.md'