1
0
Fork 0

Merging upstream version 1.15.1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-04-24 14:19:19 +02:00
parent deca1a8345
commit d312df1ef8
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
14 changed files with 42 additions and 36 deletions

View file

@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.15.0
current_version = 1.15.1
commit = True
tag = True

View file

@ -21,12 +21,12 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- uses: actions/setup-python@v5
with:
python-version: 3.8
architecture: 'x64'
- name: Cache venv
uses: actions/cache@v1
uses: actions/cache@v4
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@v1
- uses: actions/setup-python@v5
with:
python-version: 3.8
architecture: 'x64'
- name: Cache venv
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: venv
# Look to see if there is a cache hit for the corresponding requirements file

View file

@ -21,13 +21,13 @@ jobs:
options: --entrypoint redis-server
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.8
architecture: 'x64'
- name: Cache venv
uses: actions/cache@v1
uses: actions/cache@v4
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@v2
uses: actions/upload-artifact@v4
with:
name: iredis-${{github.sha}}.tar.gz
path: ./build/iredis.tar.gz

View file

@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-20.04"]
os: ["ubuntu-24.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@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
architecture: "x64"
- name: Cache venv
uses: actions/cache@v2
uses: actions/cache@v4
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/*
- uses: actions/setup-python@v4
skip: ./docs/assets/demo.svg,./iredis/data/commands.json,./iredis/data/commands/*,./tests/unittests/*,./docs/assets/*
- uses: actions/setup-python@v5
with:
python-version: 3.8
architecture: "x64"
- name: Cache venv
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: venv
# Look to see if there is a cache hit for the corresponding requirements file

View file

@ -1,5 +1,9 @@
## UPCOMING
### 1.15.1
- Bugfix: fix `xgroup help` command output.
## 1.15
- Dependency: remove pendulum, add `python-dateutil` (thanks to [deronnax])

View file

@ -1 +1 @@
__version__ = "1.15.0"
__version__ = "1.15.1"

View file

@ -111,8 +111,6 @@ 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

View file

@ -102,8 +102,6 @@ def read_config_file(f):
def load_config_files(iredisrc):
global config
with path(project_data, "iredisrc") as p:
config_obj = ConfigObj(str(p))

View file

@ -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_string_or_int
stream,XGROUP,command_xgroup,render_list_or_int_or_string
stream,XINFO,command_xinfo,render_list
stream,XLEN,command_key,render_int
stream,XPENDING,command_xpending,render_list

1 Group Command Syntax Callback
231 stream XADD command_xadd render_bulk_string
232 stream XCLAIM command_xclaim render_list
233 stream XDEL command_key_ids render_int
234 stream XGROUP command_xgroup render_string_or_int render_list_or_int_or_string
235 stream XINFO command_xinfo render_list
236 stream XLEN command_key render_int
237 stream XPENDING command_xpending render_list

View file

@ -30,7 +30,7 @@ logger = logging.getLogger(__name__)
class SkipAuthFileHistory(FileHistory):
"""Exactlly like FileHistory, but won't save `AUTH` command into history
"""Exactly 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.forword = 1
self.forward = 1
def __iter__(self):
return self
def __next__(self):
self.current += self.forword
self.current += self.forward
if 0 <= self.current < len(self.color):
# not to the end
return self.color[self.current]
else:
self.forword = -self.forword
self.current += 2 * self.forword
self.forward = -self.forward
self.current += 2 * self.forward
return self.color[self.current]

View file

@ -531,7 +531,8 @@ 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+ {STREAM_DELCONSUMER} \s+ {KEY} \s+ {GROUP} \s+ {CONSUMER})|
(\s+ {HELP})
)
\s*""",
"command_key_group_ids": rf"""

View file

@ -149,6 +149,14 @@ 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):

13
poetry.lock generated
View file

@ -1,4 +1,4 @@
# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand.
# This file is automatically @generated by Poetry 1.8.5 and should not be changed by hand.
[[package]]
name = "async-timeout"
@ -38,18 +38,15 @@ files = [
[[package]]
name = "configobj"
version = "5.0.8"
version = "5.0.9"
description = "Config file reading, writing and validation."
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
python-versions = ">=3.7"
files = [
{file = "configobj-5.0.8-py2.py3-none-any.whl", hash = "sha256:a7a8c6ab7daade85c3f329931a807c8aee750a2494363934f8ea84d8a54c87ea"},
{file = "configobj-5.0.8.tar.gz", hash = "sha256:6f704434a07dc4f4dc7c9a745172c1cad449feb548febd9f7fe362629c627a97"},
{file = "configobj-5.0.9-py2.py3-none-any.whl", hash = "sha256:1ba10c5b6ee16229c79a05047aeda2b55eb4e80d7c7d8ecf17ec1ca600c79882"},
{file = "configobj-5.0.9.tar.gz", hash = "sha256:03c881bbf23aa07bccf1b837005975993c4ab4427ba57f959afdd9d1a2386848"},
]
[package.dependencies]
six = "*"
[[package]]
name = "exceptiongroup"
version = "1.1.3"

View file

@ -1,6 +1,6 @@
[tool.poetry]
name = "iredis"
version = "1.15.0"
version = "1.15.1"
description = "Terminal client for Redis with auto-completion and syntax highlighting."
authors = ["laixintao <laixintao1995@163.com>"]
readme = 'README.md'