1
0
Fork 0

Merging upstream version 1.10.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-09 17:05:31 +01:00
parent f9ac49e01b
commit 0b1bc50af3
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
10 changed files with 134 additions and 44 deletions

View file

@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.9.4
current_version = 1.10.0
commit = True
tag = True

View file

@ -8,7 +8,7 @@ on:
jobs:
release-pypi:
name: release-pypi
runs-on: ubuntu-16.04
runs-on: ubuntu-latest
# FIXME
# help test shouldn't depends on this to run
@ -30,7 +30,7 @@ jobs:
with:
path: venv
# Look to see if there is a cache hit for the corresponding requirements file
key: ubuntu-16.04-poetryenv-${{ hashFiles('poetry.lock') }}
key: ubuntu-latest-poetryenv-${{ hashFiles('poetry.lock') }}
- name: Install Dependencies
run: |
python3 -m venv venv
@ -62,7 +62,7 @@ jobs:
release-binary:
name: Release Executable Binary.
runs-on: ubuntu-16.04
runs-on: ubuntu-latest
# FIXME
# help test shouldn't depends on this to run
@ -84,7 +84,7 @@ jobs:
with:
path: venv
# Look to see if there is a cache hit for the corresponding requirements file
key: ubuntu-16.04-poetryenv-${{ hashFiles('poetry.lock') }}
key: ubuntu-latest-poetryenv-${{ hashFiles('poetry.lock') }}
- name: Install Dependencies
run: |
python3 -m venv venv

View file

@ -9,7 +9,7 @@ on:
jobs:
test-release-binary:
name: Test Build Executable Binary. You can download from Artifact after building.
runs-on: ubuntu-16.04
runs-on: ubuntu-latest
# FIXME
# help test shouldn't depends on this to run
@ -31,7 +31,7 @@ jobs:
with:
path: venv
# Look to see if there is a cache hit for the corresponding requirements file
key: ubuntu-16.04-poetryenv-${{ hashFiles('poetry.lock') }}
key: ubuntu-latest-poetryenv-${{ hashFiles('poetry.lock') }}
- name: Install Dependencies
run: |
python3 -m venv venv

View file

@ -11,8 +11,8 @@ jobs:
name: Pytest
strategy:
matrix:
os: [ubuntu-16.04]
python: ['3.6', '3.7', '3.8', '3.9']
os: [ubuntu-latest]
python: ['3.6', '3.7', '3.8', '3.9', '3.10']
redis: [5, 6]
runs-on: ${{ matrix.os }}
@ -52,7 +52,7 @@ jobs:
pytest || cat cli_test.log
lint:
name: flake8 & black
runs-on: ubuntu-16.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

View file

@ -4,10 +4,13 @@
`MEMORY HELP`.
- Feature: you can use <kbd>Ctrl</kbd> + <kbd>C</kbd> to cancel a blocking
command like `BLPOP`.
- Test: IRedis now tested under ubuntu-latest (before is ubuntu-16.04)
- Dependency: Support Python 3.10 now, thanks to [tssujt].
### 1.9.4
- Bugfix: respect newbie_mode set in config, if cli flag is missing. thanks to [sid-maddy]
- Bugfix: respect newbie_mode set in config, if cli flag is missing. thanks to
[sid-maddy]
### 1.9.3
@ -241,3 +244,4 @@
[otms61]: https://github.com/otms61
[hanaasagi]: https://github.com/Hanaasagi
[sid-maddy]: https://github.com/sid-maddy
[tssujt]: https://github.com/tssujt

View file

@ -1,10 +1,10 @@
Copyright (c) 2019, laixintao
All rights reserved.
IRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* IRedistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* IRedistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of IRedis nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View file

@ -7,10 +7,8 @@
<p align="center">
<a href="https://github.com/laixintao/iredis/actions"><img src="https://github.com/laixintao/iredis/workflows/Test/badge.svg" alt="Github Action"></a>
<a href="https://badge.fury.io/py/iredis"><img src="https://badge.fury.io/py/iredis.svg" alt="PyPI version"></a>
<img src="https://badgen.net/badge/python/3.6%20%7C%203.7%20%7C%203.8%20%7C%203.9/" alt="Python version">
<img src="https://badgen.net/badge/python/3.6%20%7C%203.7%20%7C%203.8%20%7C%203.9%20%7C%203.10/" alt="Python version">
<a href="https://pepy.tech/project/iredis"><img src="https://pepy.tech/badge/iredis" alt="Download stats"></a>
<a href="https://t.me/iredis_users"><img src="https://badgen.net/badge/icon/join?icon=telegram&amp;label=usergroup" alt="Chat on telegram"></a>
<a href="https://console.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https://github.com/laixintao/iredis&amp;cloudshell_print=docs/cloudshell/run-in-docker.txt"><img src="https://badgen.net/badge/run/GoogleCloudShell/blue?icon=terminal" alt="Open in Cloud Shell"></a>
</p>
<p align="center">
@ -41,6 +39,8 @@ like `KEYS *` (see
response, like `get json | jq .`.
- Support pager for long output.
- Support connection via URL, `iredis --url redis://example.com:6379/1`.
- Support cluster, IRedis will auto reissue command for `MOVED` response in
cluster mode.
- Store server configuration: `iredis -d prod-redis` (see [dsn](#using-dsn) for
more).
- `peek` command to check the key's type then automatically call
@ -66,6 +66,8 @@ like `KEYS *` (see
## Install
### Pip
Install via pip:
```
@ -78,6 +80,27 @@ pip install iredis
pipx install iredis
```
### Brew
For Mac users, you can install iredis via brew 🍻
```
brew install iredis
```
### Linux
You can also use your Linux package manager to install IRedis, like `apt` in
Ubuntu (Only available on Ubuntu 21.04+).
```shell
apt install iredis
```
[![Packaging status](https://repology.org/badge/vertical-allrepos/iredis.svg)](https://repology.org/project/iredis/versions)
### Download Binary
Or you can download the executable binary with cURL(or wget), untar, then run.
It is especially useful when you don't have a python interpreter(E.g. the
[official Redis docker image](https://hub.docker.com/_/redis/) which doesn't
@ -100,6 +123,57 @@ supports similar options like redis-cli, like `-h` for redis-server's host and
```
$ iredis --help
Usage: [OPTIONS] [CMD]...
IRedis: Interactive Redis
When no command is given, IRedis starts in interactive mode.
Examples:
- iredis
- iredis -d dsn
- iredis -h 127.0.0.1 -p 6379
- iredis -h 127.0.0.1 -p 6379 -a <password>
- iredis --url redis://localhost:7890/3
Type "help" in interactive mode for information on available commands and
settings.
Options:
-h TEXT Server hostname (default: 127.0.0.1).
-p TEXT Server port (default: 6379).
-s, --socket TEXT Server socket (overrides hostname and port).
-n TEXT Database number.(overwrites dsn/url's db number)
-a, --password TEXT Password to use when connecting to the server.
--url TEXT Use Redis URL to indicate connection(Can set with
env `IREDIS_URL`), Example:
redis://[[username]:[password]]@localhost:6379/0
rediss://[[username]:[password]]@localhost:6379/0
unix://[[username]:[password]]@/path/to/socket.soc
k?db=0
-d, --dsn TEXT Use DSN configured into the [alias_dsn] section of
iredisrc file. (Can set with env `IREDIS_DSN`)
--newbie / --no-newbie Show command hints and useful helps.
--iredisrc TEXT Config file for iredis, default is ~/.iredisrc.
--decode TEXT decode response, default is No decode, which will
output all bytes literals.
--client_name TEXT Assign a name to the current connection.
--raw / --no-raw Use raw formatting for replies (default when
STDOUT is not a tty). However, you can use --no-
raw to force formatted output even when STDOUT is
not a tty.
--rainbow / --no-rainbow Display colorful prompt.
--shell / --no-shell Allow to run shell commands, default to True.
--pager / --no-pager Using pager when output is too tall for your
window, default to True.
--version Show the version and exit.
--help Show this message and exit.
```
### Using DSN

View file

@ -1 +1 @@
__version__ = "1.9.4"
__version__ = "1.10.0"

57
poetry.lock generated
View file

@ -78,6 +78,14 @@ zipp = {version = ">=3.1.0", markers = "python_version < \"3.10\""}
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"]
[[package]]
name = "iniconfig"
version = "1.1.1"
description = "iniconfig: brain-dead simple config-ini parsing"
category = "dev"
optional = false
python-versions = "*"
[[package]]
name = "mistune"
version = "0.8.4"
@ -86,14 +94,6 @@ category = "main"
optional = false
python-versions = "*"
[[package]]
name = "more-itertools"
version = "8.8.0"
description = "More routines for operating on iterables, beyond itertools"
category = "dev"
optional = false
python-versions = ">=3.5"
[[package]]
name = "packaging"
version = "20.9"
@ -187,25 +187,24 @@ python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*"
[[package]]
name = "pytest"
version = "5.4.3"
version = "6.2.5"
description = "pytest: simple powerful testing with Python"
category = "dev"
optional = false
python-versions = ">=3.5"
python-versions = ">=3.6"
[package.dependencies]
atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""}
attrs = ">=17.4.0"
attrs = ">=19.2.0"
colorama = {version = "*", markers = "sys_platform == \"win32\""}
importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""}
more-itertools = ">=4.0.0"
iniconfig = "*"
packaging = "*"
pluggy = ">=0.12,<1.0"
py = ">=1.5.0"
wcwidth = "*"
pluggy = ">=0.12,<2.0"
py = ">=1.8.2"
toml = "*"
[package.extras]
checkqa-mypy = ["mypy (==v0.761)"]
testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"]
[[package]]
@ -246,6 +245,14 @@ category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*"
[[package]]
name = "toml"
version = "0.10.2"
description = "Python Library for Tom's Obvious, Minimal Language"
category = "dev"
optional = false
python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*"
[[package]]
name = "typing-extensions"
version = "3.10.0.0"
@ -277,7 +284,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pyt
[metadata]
lock-version = "1.1"
python-versions = "^3.6"
content-hash = "2eaf01b87306c3d08c959827415e6075bf632ab4af523a9a3c10c53c9d54d18f"
content-hash = "c1345a5bdc8b39df65ca2f5a85cbb935520bfb234b64c6ca5b2699e987e91a13"
[metadata.files]
atomicwrites = [
@ -307,14 +314,14 @@ 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"},
]
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"},
]
more-itertools = [
{file = "more-itertools-8.8.0.tar.gz", hash = "sha256:83f0308e05477c68f56ea3a888172c78ed5d5b3c282addb67508e7ba6c8f813a"},
{file = "more_itertools-8.8.0-py3-none-any.whl", hash = "sha256:2cf89ec599962f2ddc4d568a05defc40e0a587fbc10d5989713638864c36be4d"},
]
packaging = [
{file = "packaging-20.9-py2.py3-none-any.whl", hash = "sha256:67714da7f7bc052e064859c05c595155bd1ee9f69f76557e21f051443c20947a"},
{file = "packaging-20.9.tar.gz", hash = "sha256:5b327ac1320dc863dca72f4514ecc086f31186744b84a230374cc1fd776feae5"},
@ -371,8 +378,8 @@ pyparsing = [
{file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"},
]
pytest = [
{file = "pytest-5.4.3-py3-none-any.whl", hash = "sha256:5c0db86b698e8f170ba4582a492248919255fcd4c79b1ee64ace34301fb589a1"},
{file = "pytest-5.4.3.tar.gz", hash = "sha256:7979331bfcba207414f5e1263b5a0f8f521d0f457318836a7355531ed1a4c7d8"},
{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"},
@ -390,6 +397,10 @@ six = [
{file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"},
{file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"},
]
toml = [
{file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"},
{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"},

View file

@ -1,6 +1,6 @@
[tool.poetry]
name = "iredis"
version = "1.9.4"
version = "1.10.0"
description = "Terminal client for Redis with auto-completion and syntax highlighting."
authors = ["laixintao <laixintao1995@163.com>"]
readme = 'README.md'
@ -19,6 +19,7 @@ classifiers = [
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Database",
"License :: OSI Approved :: MIT License",
"Intended Audience :: Developers",
@ -31,7 +32,7 @@ packages = [
[tool.poetry.dependencies]
python = "^3.6"
redis = "^3"
redis = "^3.4.0"
prompt_toolkit = "^3"
Pygments = "^2"
mistune = "^0.8"
@ -43,7 +44,7 @@ importlib-resources = "^5.1.0"
wcwidth = "0.1.9"
[tool.poetry.dev-dependencies]
pytest = "^5"
pytest = "^6"
pexpect = "^4.7"
[tool.poetry.scripts]