summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-01-25 20:03:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-01-25 20:04:46 +0000
commit668977aa6a04dbdfb1c4856dbf8577800505873e (patch)
tree79658cc59958112ece04da15d09433c7d779eff2
parentReleasing debian version 1.10.0-1. (diff)
downloadiredis-668977aa6a04dbdfb1c4856dbf8577800505873e.tar.xz
iredis-668977aa6a04dbdfb1c4856dbf8577800505873e.zip
Merging upstream version 1.11.0:
- compatible with mistune 2.0 (Closes: #1003572). Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--.bumpversion.cfg2
-rw-r--r--.github/workflows/test.yaml4
-rw-r--r--CHANGELOG.md5
-rw-r--r--iredis/__init__.py2
-rw-r--r--iredis/client.py26
-rw-r--r--iredis/commands.py6
-rw-r--r--iredis/completers.py8
-rw-r--r--iredis/data/commands.json6
-rw-r--r--iredis/data/commands/eval.md2
-rw-r--r--iredis/data/commands/xadd.md2
-rw-r--r--iredis/data/iredisrc6
-rw-r--r--iredis/entry.py2
-rw-r--r--iredis/markdown.py37
-rw-r--r--iredis/redis_grammar.py2
-rw-r--r--iredis/renders.py8
-rw-r--r--iredis/style.py4
-rw-r--r--iredis/utils.py2
-rw-r--r--poetry.lock108
-rw-r--r--pyproject.toml4
-rw-r--r--tests/unittests/command_parse/test_stream.py2
-rw-r--r--tests/unittests/test_client.py4
21 files changed, 126 insertions, 116 deletions
diff --git a/.bumpversion.cfg b/.bumpversion.cfg
index ad03b3a..18161ac 100644
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 1.10.0
+current_version = 1.11.0
commit = True
tag = True
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index 7c992c7..88e3ee4 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -56,6 +56,10 @@ jobs:
steps:
- uses: actions/checkout@v2
+ - uses: codespell-project/actions-codespell@master
+ with:
+ ignore_words_list: fo,ists,oll,optin,ot,smove,tre,whe
+ exclude_file: docs/assets/demo.svg
- uses: actions/setup-python@v1
with:
python-version: 3.7
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 84687be..081d977 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## 1.11
+
+- Dependency: Upgrade mistune lib to ^2.0. (see
+ https://github.com/laixintao/iredis/issues/232)
+
## 1.10
- Feature: more human readable output for `HELP` command like `ACL HELP` and
diff --git a/iredis/__init__.py b/iredis/__init__.py
index fcfdf38..f84c53b 100644
--- a/iredis/__init__.py
+++ b/iredis/__init__.py
@@ -1 +1 @@
-__version__ = "1.10.0"
+__version__ = "1.11.0"
diff --git a/iredis/client.py b/iredis/client.py
index 2c9bda5..a5295fb 100644
--- a/iredis/client.py
+++ b/iredis/client.py
@@ -224,7 +224,7 @@ class Client:
logger.info(
f"execute by connection: connection={connection}, name={command_name}, {args}, {options}"
)
- retry_times = config.retry_times # FIXME configureable
+ retry_times = config.retry_times # FIXME configurable
last_error = None
need_refresh_connection = False
@@ -487,7 +487,7 @@ class Client:
"""
if command_name.upper() == "HELLO":
raise NotSupport("IRedis currently not support RESP3, sorry about that.")
- # TRANSATION state chage
+ # TRANSACTION state change
if command_name.upper() in ["EXEC", "DISCARD"]:
logger.debug(f"[After hook] Command is {command_name}, unset transaction.")
config.transaction = False
@@ -527,25 +527,25 @@ class Client:
rendered_detail = markdown.render(doc)
summary_dict = commands_summary[command_summary_name]
- avaiable_version = summary_dict.get("since", "?")
+ available_version = summary_dict.get("since", "?")
server_version = config.version
# FIXME anything strange with single quotes?
logger.debug(f"[--version--] '{server_version}'")
try:
- is_avaiable = StrictVersion(server_version) > StrictVersion(
- avaiable_version
+ is_available = StrictVersion(server_version) > StrictVersion(
+ available_version
)
except Exception as e:
logger.exception(e)
- is_avaiable = None
+ is_available = None
- if is_avaiable:
- avaiable_text = f"(Avaiable on your redis-server: {server_version})"
- elif is_avaiable is False:
- avaiable_text = f"(Not avaiable on your redis-server: {server_version})"
+ if is_available:
+ available_text = f"(Available on your redis-server: {server_version})"
+ elif is_available is False:
+ available_text = f"(Not available on your redis-server: {server_version})"
else:
- avaiable_text = ""
- since_text = f"{avaiable_version} {avaiable_text}"
+ available_text = ""
+ since_text = f"{available_version} {available_text}"
summary = [
("", "\n"),
@@ -658,7 +658,7 @@ class Client:
yield FormattedText([("class:dockey", "XINFO: ")])
yield renders.OutputRender.render_list(xinfo)
- # incase the result is too long, we yield only once so the outputer
+ # in case the result is too long, we yield only once so the outputer
# can pager it.
peek_response = []
key_type = nativestr(self.execute("type", key))
diff --git a/iredis/commands.py b/iredis/commands.py
index dcd457f..9f10d53 100644
--- a/iredis/commands.py
+++ b/iredis/commands.py
@@ -20,7 +20,7 @@ def _load_command_summary():
def _load_command():
"""
- load command informations from file.
+ load command information from file.
:returns:
- original_commans: dict, command name : Command
- command_group: dict, group_name: command_names
@@ -115,7 +115,7 @@ def split_command_args(command):
command = command.strip()
for command_name in all_commands:
- # for command that is paritaly inputed, like `command in`, we should
+ # for command that is paritaly input, like `command in`, we should
# match with `command info`, otherwise, `command in` will result in
# `command` with `args` is ('in') which is an invalid case.
normalized_input_command = " ".join(command.split()).upper()
@@ -125,7 +125,7 @@ def split_command_args(command):
and command_name != normalized_input_command
):
raise AmbiguousCommand("command is not finished")
- # allow multiplt space in user inputed command
+ # allow multiple space in user input command
command_allow_multi_spaces = "[ ]+".join(command_name.split())
matcher = re.match(fr"({command_allow_multi_spaces})( |$)", command.upper())
if matcher:
diff --git a/iredis/completers.py b/iredis/completers.py
index afdc7ef..f5d922e 100644
--- a/iredis/completers.py
+++ b/iredis/completers.py
@@ -94,8 +94,8 @@ class TimestampCompleter(Completer):
return
current = int(text)
now = pendulum.now()
- for unit, minium in self.when_lower_than.items():
- if current <= minium:
+ for unit, minimum in self.when_lower_than.items():
+ if current <= minimum:
dt = now.subtract(**{f"{unit}s": current})
meta = f"{text} {unit}{'s' if current > 1 else ''} ago ({dt.format('YYYY-MM-DD HH:mm:ss')})"
yield Completion(
@@ -205,7 +205,7 @@ class IRedisCompleter(Completer):
for _token_in_command in tokens_in_command:
# prompt_toolkit didn't support multi tokens
# like DEL key1 key2 key3
- # so we have to split them manualy
+ # so we have to split them manually
for single_token in strip_quote_args(_token_in_command):
_completer.touch(single_token)
@@ -310,7 +310,7 @@ class IRedisCompleter(Completer):
"member": member_completer,
"members": member_completer,
# zmember
- # TODO sperate sorted set and set
+ # TODO separate sorted set and set
# hash fields
"field": field_completer,
"fields": field_completer,
diff --git a/iredis/data/commands.json b/iredis/data/commands.json
index 1b0ae22..74093cc 100644
--- a/iredis/data/commands.json
+++ b/iredis/data/commands.json
@@ -2310,7 +2310,7 @@
"WITHVALUES"
],
"optional": true
- }
+ }
],
"optional": true
}
@@ -4378,7 +4378,7 @@
"WITHSCORES"
],
"optional": true
- }
+ }
],
"optional": true
}
@@ -5048,7 +5048,7 @@
},
"XADD": {
"summary": "Appends a new entry to a stream",
- "complexity": "O(1) when adding a new entry, O(N) when trimming where N being the number of entires evicted.",
+ "complexity": "O(1) when adding a new entry, O(N) when trimming where N being the number of entries evicted.",
"arguments": [
{
"name": "key",
diff --git a/iredis/data/commands/eval.md b/iredis/data/commands/eval.md
index 3618ac6..f85d727 100644
--- a/iredis/data/commands/eval.md
+++ b/iredis/data/commands/eval.md
@@ -733,7 +733,7 @@ Valid formats:
> - big endian
< - little endian
![num] - alignment
-x - pading
+x - padding
b/B - signed/unsigned byte
h/H - signed/unsigned short
l/L - signed/unsigned long
diff --git a/iredis/data/commands/xadd.md b/iredis/data/commands/xadd.md
index aca1de7..8a80556 100644
--- a/iredis/data/commands/xadd.md
+++ b/iredis/data/commands/xadd.md
@@ -52,7 +52,7 @@ to match the one of this other system.
documentation page for more information. This allows adding new entries and
keeping the stream's size in check with a single call to `XADD`, effectively
capping the stream with an arbitrary threshold. Although exact trimming is
-possible and is the default, due to the internal representation of steams it is
+possible and is the default, due to the internal representation of streams it is
more efficient to add an entry and trim stream with `XADD` using **almost
exact** trimming (the `~` argument).
diff --git a/iredis/data/iredisrc b/iredis/data/iredisrc
index 5baef86..bf79e90 100644
--- a/iredis/data/iredisrc
+++ b/iredis/data/iredisrc
@@ -30,9 +30,9 @@ socket_keepalive = True
shell = True
# decode redis response, default None
-decode =
+decode =
-# enable pager? defualt to True, you can disable it by changing it to False
+# enable pager? default to True, you can disable it by changing it to False
enable_pager = True
# pager setting when line is too tall
@@ -52,7 +52,7 @@ bottom_bar = True
warning = True
# IRedis log for debugging, leave this blank will disable log.
-# You don't need this unless you are debuging iredis.
+# You don't need this unless you are debugging iredis.
# Be careful this will log your commands input (include AUTH with password) to
# log file.
# eg. ~/.iredis.log
diff --git a/iredis/entry.py b/iredis/entry.py
index eb57668..2a9dc05 100644
--- a/iredis/entry.py
+++ b/iredis/entry.py
@@ -160,7 +160,7 @@ class Rainbow:
def prompt_message(client):
- # TODO custome prompt
+ # TODO custom prompt
text = "{hostname}> ".format(hostname=str(client))
if config.rainbow:
return list(zip(Rainbow(), text))
diff --git a/iredis/markdown.py b/iredis/markdown.py
index ff2b726..6f26642 100644
--- a/iredis/markdown.py
+++ b/iredis/markdown.py
@@ -13,24 +13,24 @@ from prompt_toolkit.formatted_text import to_formatted_text, HTML
logger = logging.getLogger(__name__)
-class TerminalRender(mistune.Renderer):
+class TerminalRender(mistune.HTMLRenderer):
def _to_title(self, text):
return f"{text}\n{'='*len(text)}\n"
def paragraph(self, text):
return text + "\n\n"
- def block_code(self, code, language=None):
+ def block_code(self, code, info=None):
code = "\n".join([" " + line for line in code.splitlines()])
return super().block_code(code)
- def header(self, text, level, raw=None):
+ def heading(self, text, level):
if level == 2:
header_text = self._to_title(text)
- return super().header(header_text, 2)
- return super().header(self._to_title(text), level)
+ return super().heading(header_text, 2)
+ return super().heading(self._to_title(text), level)
- def list(self, body, ordered=True):
+ def list(self, body, ordered, level, start=None):
"""Rendering list tags like ``<ul>`` and ``<ol>``.
:param body: body contents of the list.
@@ -41,29 +41,26 @@ class TerminalRender(mistune.Renderer):
tag = "ol"
return "<%s>%s</%s>\n" % (tag, body, tag)
- def list_item(self, text):
+ def list_item(self, text, level):
"""Rendering list item snippet. Like ``<li>``."""
return "<li> * %s</li>\n" % text
-class RedisDocLexer(mistune.BlockLexer):
- def enable_at_title(self):
- self.rules.at_title = re.compile(r"^@(\w+) *(?:\n+|$)") # @example
- self.default_rules.insert(0, "at_title")
+renderer = TerminalRender()
+markdown_render = mistune.Markdown(renderer)
- def parse_at_title(self, m):
- text = m.group(1)
- self.tokens.append({"type": "heading", "level": 2, "text": text})
+# replace redis doc's title (and following newlines & spaces)
+# with markdown's second level title
+redisdoc_title_re = re.compile(r"^@(\w+) *(?:\n+|$)")
-renderer = TerminalRender()
-block_lexer = RedisDocLexer()
-block_lexer.enable_at_title()
-markdown_render = mistune.Markdown(renderer, block=block_lexer)
+def replace_to_markdown_title(original):
+ replaced = redisdoc_title_re.sub(r"## \g<1>", original)
+ return replaced
def render(text):
- html_text = markdown_render(text)
+ replaced = replace_to_markdown_title(text)
+ html_text = markdown_render(replaced)
logger.debug("[Document] {} ...".format(html_text)[:20])
-
return to_formatted_text(HTML(html_text))
diff --git a/iredis/redis_grammar.py b/iredis/redis_grammar.py
index e680839..692edc6 100644
--- a/iredis/redis_grammar.py
+++ b/iredis/redis_grammar.py
@@ -622,7 +622,7 @@ def get_command_grammar(command):
syntax = GRAMMAR.get(syntax_name)
# If a command is not supported yet, (e.g. command from latest version added
- # by Redis recently, or command from third Redis module.) return a defualt
+ # by Redis recently, or command from third Redis module.) return a default
# grammar, so the lexer and completion won't be activated.
if syntax is None:
return command_grammar
diff --git a/iredis/renders.py b/iredis/renders.py
index 2898c42..2bb21c9 100644
--- a/iredis/renders.py
+++ b/iredis/renders.py
@@ -74,8 +74,8 @@ class OutputRender:
utf-8 decoded.
"""
decoded = nativestr(value)
- splitted = "\n".join(decoded.splitlines()) # get rid of last newline
- return splitted
+ split = "\n".join(decoded.splitlines()) # get rid of last newline
+ return split
@staticmethod
def render_nested_pair(value):
@@ -163,7 +163,7 @@ class OutputRender:
def render_simple_string(text):
"""
If response is b'OK', render simple string always with success color.
- If Error happend, error will be rendered by ``render_error``
+ If Error happens, error will be rendered by ``render_error``
"""
if text is None:
return NIL
@@ -174,7 +174,7 @@ class OutputRender:
def render_help(raw):
"""
render help text message.
- the comand like ``ACL HELP`` and ``MEMORY HELP``
+ the command like ``ACL HELP`` and ``MEMORY HELP``
will return a list of strings.
we render it as plain text
"""
diff --git a/iredis/style.py b/iredis/style.py
index 9fd6eb6..7262072 100644
--- a/iredis/style.py
+++ b/iredis/style.py
@@ -39,9 +39,9 @@ GROUP = {
"group.server": "#E6DB74",
"group.set": "#E6DB74",
"group.sortedset": "#E6DB74",
- "group.stram": "#E6DB74",
+ "group.stream": "#E6DB74",
"group.string": "#E6DB74",
- "group.transections": "#E6DB74",
+ "group.transactions": "#E6DB74",
}
diff --git a/iredis/utils.py b/iredis/utils.py
index b64f874..7cfae5a 100644
--- a/iredis/utils.py
+++ b/iredis/utils.py
@@ -229,7 +229,7 @@ def ensure_str(origin, decode=None):
return origin.decode(decode)
return _literal_bytes(origin)
else:
- raise Exception(f"Unkown type: {type(origin)}, origin: {origin}")
+ raise Exception(f"Unknown type: {type(origin)}, origin: {origin}")
def double_quotes(unquoted):
diff --git a/poetry.lock b/poetry.lock
index 0f90041..adaaf12 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -8,17 +8,17 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
[[package]]
name = "attrs"
-version = "21.2.0"
+version = "21.4.0"
description = "Classes Without Boilerplate"
category = "dev"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
[package.extras]
-dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit"]
+dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit", "cloudpickle"]
docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"]
-tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface"]
-tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins"]
+tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "cloudpickle"]
+tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "cloudpickle"]
[[package]]
name = "click"
@@ -49,7 +49,7 @@ six = "*"
[[package]]
name = "importlib-metadata"
-version = "4.5.0"
+version = "4.8.3"
description = "Read metadata from Python packages"
category = "dev"
optional = false
@@ -61,11 +61,12 @@ zipp = ">=0.5"
[package.extras]
docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"]
-testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pep517", "pyfakefs", "flufl.flake8", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"]
+perf = ["ipython"]
+testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pep517", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"]
[[package]]
name = "importlib-resources"
-version = "5.1.4"
+version = "5.4.0"
description = "Read resources from Python packages"
category = "main"
optional = false
@@ -76,7 +77,7 @@ zipp = {version = ">=3.1.0", markers = "python_version < \"3.10\""}
[package.extras]
docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"]
-testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-black (>=0.3.7)", "pytest-mypy"]
+testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-black (>=0.3.7)", "pytest-mypy"]
[[package]]
name = "iniconfig"
@@ -88,22 +89,22 @@ python-versions = "*"
[[package]]
name = "mistune"
-version = "0.8.4"
-description = "The fastest markdown parser in pure Python"
+version = "2.0.2"
+description = "A sane Markdown parser with useful plugins and renderers"
category = "main"
optional = false
python-versions = "*"
[[package]]
name = "packaging"
-version = "20.9"
+version = "21.3"
description = "Core utilities for Python packages"
category = "dev"
optional = false
-python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
+python-versions = ">=3.6"
[package.dependencies]
-pyparsing = ">=2.0.2"
+pyparsing = ">=2.0.2,<3.0.5 || >3.0.5"
[[package]]
name = "pendulum"
@@ -130,17 +131,18 @@ ptyprocess = ">=0.5"
[[package]]
name = "pluggy"
-version = "0.13.1"
+version = "1.0.0"
description = "plugin and hook calling mechanisms for python"
category = "dev"
optional = false
-python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
+python-versions = ">=3.6"
[package.dependencies]
importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""}
[package.extras]
dev = ["pre-commit", "tox"]
+testing = ["pytest", "pytest-benchmark"]
[[package]]
name = "prompt-toolkit"
@@ -163,15 +165,15 @@ python-versions = "*"
[[package]]
name = "py"
-version = "1.10.0"
+version = "1.11.0"
description = "library with cross-python path, ini-parsing, io, code, log facilities"
category = "dev"
optional = false
-python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
+python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
[[package]]
name = "pygments"
-version = "2.9.0"
+version = "2.11.2"
description = "Pygments is a syntax highlighting package written in Python."
category = "main"
optional = false
@@ -179,11 +181,14 @@ python-versions = ">=3.5"
[[package]]
name = "pyparsing"
-version = "2.4.7"
+version = "3.0.7"
description = "Python parsing module"
category = "dev"
optional = false
-python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*"
+python-versions = ">=3.6"
+
+[package.extras]
+diagrams = ["jinja2", "railroad-diagrams"]
[[package]]
name = "pytest"
@@ -209,7 +214,7 @@ testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xm
[[package]]
name = "python-dateutil"
-version = "2.8.1"
+version = "2.8.2"
description = "Extensions to the standard Python datetime module"
category = "main"
optional = false
@@ -255,11 +260,11 @@ python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*"
[[package]]
name = "typing-extensions"
-version = "3.10.0.0"
-description = "Backported and Experimental Type Hints for Python 3.5+"
+version = "4.0.1"
+description = "Backported and Experimental Type Hints for Python 3.6+"
category = "dev"
optional = false
-python-versions = "*"
+python-versions = ">=3.6"
[[package]]
name = "wcwidth"
@@ -271,7 +276,7 @@ python-versions = "*"
[[package]]
name = "zipp"
-version = "3.4.1"
+version = "3.6.0"
description = "Backport of pathlib-compatible object wrapper for zip files"
category = "main"
optional = false
@@ -279,12 +284,12 @@ python-versions = ">=3.6"
[package.extras]
docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"]
-testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "pytest-enabler", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"]
+testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"]
[metadata]
lock-version = "1.1"
python-versions = "^3.6"
-content-hash = "c1345a5bdc8b39df65ca2f5a85cbb935520bfb234b64c6ca5b2699e987e91a13"
+content-hash = "d391d026d55f4bc949fb0bd9703f8f5d57925752391afc1a9e1f378b31266b67"
[metadata.files]
atomicwrites = [
@@ -292,8 +297,8 @@ atomicwrites = [
{file = "atomicwrites-1.4.0.tar.gz", hash = "sha256:ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a"},
]
attrs = [
- {file = "attrs-21.2.0-py2.py3-none-any.whl", hash = "sha256:149e90d6d8ac20db7a955ad60cf0e6881a3f20d37096140088356da6c716b0b1"},
- {file = "attrs-21.2.0.tar.gz", hash = "sha256:ef6aaac3ca6cd92904cdd0d83f629a15f18053ec84e6432106f7a4d04ae4f5fb"},
+ {file = "attrs-21.4.0-py2.py3-none-any.whl", hash = "sha256:2d27e3784d7a565d36ab851fe94887c5eccd6a463168875832a1be79c82828b4"},
+ {file = "attrs-21.4.0.tar.gz", hash = "sha256:626ba8234211db98e869df76230a137c4c40a12d72445c45d5f5b716f076e2fd"},
]
click = [
{file = "click-7.1.2-py2.py3-none-any.whl", hash = "sha256:dacca89f4bfadd5de3d7489b7c8a566eee0d3676333fbb50030263894c38c0dc"},
@@ -307,24 +312,24 @@ configobj = [
{file = "configobj-5.0.6.tar.gz", hash = "sha256:a2f5650770e1c87fb335af19a9b7eb73fc05ccf22144eb68db7d00cd2bcb0902"},
]
importlib-metadata = [
- {file = "importlib_metadata-4.5.0-py3-none-any.whl", hash = "sha256:833b26fb89d5de469b24a390e9df088d4e52e4ba33b01dc5e0e4f41b81a16c00"},
- {file = "importlib_metadata-4.5.0.tar.gz", hash = "sha256:b142cc1dd1342f31ff04bb7d022492b09920cb64fed867cd3ea6f80fe3ebd139"},
+ {file = "importlib_metadata-4.8.3-py3-none-any.whl", hash = "sha256:65a9576a5b2d58ca44d133c42a241905cc45e34d2c06fd5ba2bafa221e5d7b5e"},
+ {file = "importlib_metadata-4.8.3.tar.gz", hash = "sha256:766abffff765960fcc18003801f7044eb6755ffae4521c8e8ce8e83b9c9b0668"},
]
importlib-resources = [
- {file = "importlib_resources-5.1.4-py3-none-any.whl", hash = "sha256:e962bff7440364183203d179d7ae9ad90cb1f2b74dcb84300e88ecc42dca3351"},
- {file = "importlib_resources-5.1.4.tar.gz", hash = "sha256:54161657e8ffc76596c4ede7080ca68cb02962a2e074a2586b695a93a925d36e"},
+ {file = "importlib_resources-5.4.0-py3-none-any.whl", hash = "sha256:33a95faed5fc19b4bc16b29a6eeae248a3fe69dd55d4d229d2b480e23eeaad45"},
+ {file = "importlib_resources-5.4.0.tar.gz", hash = "sha256:d756e2f85dd4de2ba89be0b21dba2a3bbec2e871a42a3a16719258a11f87506b"},
]
iniconfig = [
{file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"},
{file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"},
]
mistune = [
- {file = "mistune-0.8.4-py2.py3-none-any.whl", hash = "sha256:88a1051873018da288eee8538d476dffe1262495144b33ecb586c4ab266bb8d4"},
- {file = "mistune-0.8.4.tar.gz", hash = "sha256:59a3429db53c50b5c6bcc8a07f8848cb00d7dc8bdb431a4ab41920d201d4756e"},
+ {file = "mistune-2.0.2-py2.py3-none-any.whl", hash = "sha256:6bab6c6abd711c4604206c7d8cad5cd48b28f072b4bb75797d74146ba393a049"},
+ {file = "mistune-2.0.2.tar.gz", hash = "sha256:6fc88c3cb49dba8b16687b41725e661cf85784c12e8974a29b9d336dd596c3a1"},
]
packaging = [
- {file = "packaging-20.9-py2.py3-none-any.whl", hash = "sha256:67714da7f7bc052e064859c05c595155bd1ee9f69f76557e21f051443c20947a"},
- {file = "packaging-20.9.tar.gz", hash = "sha256:5b327ac1320dc863dca72f4514ecc086f31186744b84a230374cc1fd776feae5"},
+ {file = "packaging-21.3-py3-none-any.whl", hash = "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"},
+ {file = "packaging-21.3.tar.gz", hash = "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"},
]
pendulum = [
{file = "pendulum-2.1.2-cp27-cp27m-macosx_10_15_x86_64.whl", hash = "sha256:b6c352f4bd32dff1ea7066bd31ad0f71f8d8100b9ff709fb343f3b86cee43efe"},
@@ -354,8 +359,8 @@ pexpect = [
{file = "pexpect-4.8.0.tar.gz", hash = "sha256:fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c"},
]
pluggy = [
- {file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"},
- {file = "pluggy-0.13.1.tar.gz", hash = "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0"},
+ {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"},
+ {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"},
]
prompt-toolkit = [
{file = "prompt_toolkit-3.0.3-py3-none-any.whl", hash = "sha256:c93e53af97f630f12f5f62a3274e79527936ed466f038953dfa379d4941f651a"},
@@ -366,24 +371,24 @@ ptyprocess = [
{file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"},
]
py = [
- {file = "py-1.10.0-py2.py3-none-any.whl", hash = "sha256:3b80836aa6d1feeaa108e046da6423ab8f6ceda6468545ae8d02d9d58d18818a"},
- {file = "py-1.10.0.tar.gz", hash = "sha256:21b81bda15b66ef5e1a777a21c4dcd9c20ad3efd0b3f817e7a809035269e1bd3"},
+ {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"},
+ {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"},
]
pygments = [
- {file = "Pygments-2.9.0-py3-none-any.whl", hash = "sha256:d66e804411278594d764fc69ec36ec13d9ae9147193a1740cd34d272ca383b8e"},
- {file = "Pygments-2.9.0.tar.gz", hash = "sha256:a18f47b506a429f6f4b9df81bb02beab9ca21d0a5fee38ed15aef65f0545519f"},
+ {file = "Pygments-2.11.2-py3-none-any.whl", hash = "sha256:44238f1b60a76d78fc8ca0528ee429702aae011c265fe6a8dd8b63049ae41c65"},
+ {file = "Pygments-2.11.2.tar.gz", hash = "sha256:4e426f72023d88d03b2fa258de560726ce890ff3b630f88c21cbb8b2503b8c6a"},
]
pyparsing = [
- {file = "pyparsing-2.4.7-py2.py3-none-any.whl", hash = "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"},
- {file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"},
+ {file = "pyparsing-3.0.7-py3-none-any.whl", hash = "sha256:a6c06a88f252e6c322f65faf8f418b16213b51bdfaece0524c1c1bc30c63c484"},
+ {file = "pyparsing-3.0.7.tar.gz", hash = "sha256:18ee9022775d270c55187733956460083db60b37d0d0fb357445f3094eed3eea"},
]
pytest = [
{file = "pytest-6.2.5-py3-none-any.whl", hash = "sha256:7310f8d27bc79ced999e760ca304d69f6ba6c6649c0b60fb0e04a4a77cacc134"},
{file = "pytest-6.2.5.tar.gz", hash = "sha256:131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89"},
]
python-dateutil = [
- {file = "python-dateutil-2.8.1.tar.gz", hash = "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c"},
- {file = "python_dateutil-2.8.1-py2.py3-none-any.whl", hash = "sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a"},
+ {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"},
+ {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"},
]
pytzdata = [
{file = "pytzdata-2020.1-py2.py3-none-any.whl", hash = "sha256:e1e14750bcf95016381e4d472bad004eef710f2d6417240904070b3d6654485f"},
@@ -402,15 +407,14 @@ toml = [
{file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"},
]
typing-extensions = [
- {file = "typing_extensions-3.10.0.0-py2-none-any.whl", hash = "sha256:0ac0f89795dd19de6b97debb0c6af1c70987fd80a2d62d1958f7e56fcc31b497"},
- {file = "typing_extensions-3.10.0.0-py3-none-any.whl", hash = "sha256:779383f6086d90c99ae41cf0ff39aac8a7937a9283ce0a414e5dd782f4c94a84"},
- {file = "typing_extensions-3.10.0.0.tar.gz", hash = "sha256:50b6f157849174217d0656f99dc82fe932884fb250826c18350e159ec6cdf342"},
+ {file = "typing_extensions-4.0.1-py3-none-any.whl", hash = "sha256:7f001e5ac290a0c0401508864c7ec868be4e701886d5b573a9528ed3973d9d3b"},
+ {file = "typing_extensions-4.0.1.tar.gz", hash = "sha256:4ca091dea149f945ec56afb48dae714f21e8692ef22a395223bcd328961b6a0e"},
]
wcwidth = [
{file = "wcwidth-0.1.9-py2.py3-none-any.whl", hash = "sha256:cafe2186b3c009a04067022ce1dcd79cb38d8d65ee4f4791b8888d6599d1bbe1"},
{file = "wcwidth-0.1.9.tar.gz", hash = "sha256:ee73862862a156bf77ff92b09034fc4825dd3af9cf81bc5b360668d425f3c5f1"},
]
zipp = [
- {file = "zipp-3.4.1-py3-none-any.whl", hash = "sha256:51cb66cc54621609dd593d1787f286ee42a5c0adbb4b29abea5a63edc3e03098"},
- {file = "zipp-3.4.1.tar.gz", hash = "sha256:3607921face881ba3e026887d8150cca609d517579abe052ac81fc5aeffdbd76"},
+ {file = "zipp-3.6.0-py3-none-any.whl", hash = "sha256:9fe5ea21568a0a70e50f273397638d39b03353731e6cbbb3fd8502a33fec40bc"},
+ {file = "zipp-3.6.0.tar.gz", hash = "sha256:71c644c5369f4a6e07636f0aa966270449561fcea2e3d6747b8d23efaa9d7832"},
]
diff --git a/pyproject.toml b/pyproject.toml
index f722d8b..cfab0bc 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "iredis"
-version = "1.10.0"
+version = "1.11.0"
description = "Terminal client for Redis with auto-completion and syntax highlighting."
authors = ["laixintao <laixintao1995@163.com>"]
readme = 'README.md'
@@ -35,7 +35,7 @@ python = "^3.6"
redis = "^3.4.0"
prompt_toolkit = "^3"
Pygments = "^2"
-mistune = "^0.8"
+mistune = "^2.0"
configobj = "^5.0"
click = "^7.0"
pendulum = "^2.0"
diff --git a/tests/unittests/command_parse/test_stream.py b/tests/unittests/command_parse/test_stream.py
index 5807aa2..94408df 100644
--- a/tests/unittests/command_parse/test_stream.py
+++ b/tests/unittests/command_parse/test_stream.py
@@ -405,7 +405,7 @@ def test_xread(judge_command):
"count": "2",
"streams": "STREAMS",
# FIXME current grammar can't support multiple tokens
- # so the ids will be recongized to keys.
+ # so the ids will be recognized to keys.
"keys": "mystream writers 0-0",
"stream_id": "0-0",
},
diff --git a/tests/unittests/test_client.py b/tests/unittests/test_client.py
index 5887579..b40fc8b 100644
--- a/tests/unittests/test_client.py
+++ b/tests/unittests/test_client.py
@@ -68,10 +68,10 @@ def test_do_help(config):
client = Client("127.0.0.1", "6379", None)
config.version = "5.0.0"
resp = client.do_help("SET")
- assert resp[10] == ("", "1.0.0 (Avaiable on your redis-server: 5.0.0)")
+ assert resp[10] == ("", "1.0.0 (Available on your redis-server: 5.0.0)")
config.version = "2.0.0"
resp = client.do_help("cluster", "addslots")
- assert resp[10] == ("", "3.0.0 (Not avaiable on your redis-server: 2.0.0)")
+ assert resp[10] == ("", "3.0.0 (Not available on your redis-server: 2.0.0)")
def test_rainbow_iterator():