| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
Added the LPOS command from Redis 6.0.6
Fixes #1353
|
|
|
|
|
|
|
|
|
|
|
| |
* Support for loading, unloading and listing Redis Modules
* minor fixes for flake
* unit test for module list - only the empty use case
* ModuleError should inherit from ResponseError rather than RedisError
Co-authored-by: Vamsi Atluri <vamc19@gmail.com>
|
|
|
| |
Fix the docstring for acl_setuser() so that it refers to the correct parameter name,`passwords`.
|
|
|
|
|
|
|
| |
Prior to this, escaped slashes ("\\") were un-escaped. This caused the strings
"foo\x92" and "foo\\x92" to be represented the same way in the output.
Fixes #1349
|
|
|
|
| |
Fixed #1339
|
|
|
|
|
| |
Fixes #1337
Fixes #1341
|
|
|
|
|
|
|
|
|
| |
flake8 catches a wider net of mistakes than pycodestyle and is more
commonly used by the larger community. For example, it catches unused
imports, a few of which existed. These have since been removed.
Two "noqa" comments were added. One ignores the _compat.py file as it
has a large amount of Python version specific code. The second is in
utils.py which intentionally does not use an import.
|
|
|
|
|
|
|
|
|
| |
Use the "as" keyword to capture the exception in a variable instead of
sys.exc_info().
Re-raise exception with the bare "raise" syntax.
Avoid "# noqa: E722" by catching BaseException, which includes all
exceptions including SystemExit.
|
| |
|
|
|
|
|
| |
fixes #1304
fixes #1280
|
| |
|
|
|
|
|
|
|
| |
The `EXECABORT` error type was added in Redis 2.6.5 and is returned from an
`EXEC` command to indicate that the transaction was aborted due to an invalid
command. It is not necessary to call `DISCARD` after this error, and doing so
causes a "DISCARD without MULTI" error.
|
|
|
|
| |
Fixes #1268
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If an exception occurs inside the __del__ method, it should be reported
to the developer. Not doing so could hide bugs.
Python automatically handles exceptions inside __del__ methods, for
example:
class A:
def __del__(self):
1 / 0
A()
print("after del")
Results in the output:
$ python3 ~/blah.py
Exception ignored in: <function A.__del__ at 0x7fbbf2bbfc20>
Traceback (most recent call last):
File "/home/jon/test.py", line 3, in __del__
1 / 0
ZeroDivisionError: division by zero
after del
From this example, we can see the bug was not hidden and the code after
__del__ still executed.
fixes #1281
|
|
|
|
|
|
|
|
|
| |
It now describe what is deprecated and displays for the callers line by
using stacklevel=2.
The warning is now tested and not emitted during normal test runs.
Fixes #1282
|
|
|
|
|
|
|
|
|
|
|
|
| |
* make `hset` command support multi field/value pairs.
see: https://redis.io/commands/hset
close https://github.com/andymccurdy/redis-py/issues/1269
deprecated: hmset
Co-authored-by: Alan Mai <0110amai@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After further thought this was a bad idea. Just because two connection
pools share the same connection arguments does not make them equal.
It would seem quite odd if pool_a == pool_b yet pool_a.disconnect() doesn't
close all of pool_b's connections.
Ref #1240
Fixes #1277
Fixes #1275
Fixes #1267
Fixes #1273
|
|
|
|
|
|
|
| |
This helps those poor souls that specify all their connection options as
non-keyword arguments.
Fixes #1276
|
| |
|
|
|
|
| |
Fixed #1220
|
|
|
|
|
|
|
|
| |
'ssl_check_hostname' tells SSL Connections to whether to require the TCP
hostname to match the hostname specified in the SSL Cert. By default
'ssl_check_hostname' is False to maintain backwards compatibility.
Fixed #1196
|
|
|
|
|
|
| |
Client instances and Connection pools now accept "client_name" as an optional
argument. If supplied, all connections created will be named via
CLIENT SETNAME once the connection to the server is established.
|
|
|
| |
PubSub objects are now context managers.
|
|
|
|
|
|
|
|
| |
Prior to this, pipeline instances used __len__() which returns the number
of queued commands on the pipeline. When there were no queued commands,
the pipeline instance would evaluate to 0 or False.
Fixes #994
|
| |
|
|
|
|
| |
* Fix TypeError by passing optional decode_responses keyword argument down to parse_slowlog_get()
|
|
|
| |
Add equality test on Redis client and connection pool
|
|
|
| |
Sorry, I'm a pendant.
|
|
|
|
| |
keys
|
|
|
|
|
|
|
|
|
|
| |
The client section of MONITOR output varies for TCP connections, unix socket
connections and commands executed from Lua scripts. Account for each of these
cases by including an additional key `client_type` in the MONITOR output.
`client_type` will be one of ('tcp', 'unix', 'lua'). `client_address` and
`client_port` vary based on the `client_type`.
Fixes #1201
|
| |
|
|
|
|
| |
The PubSubWorkerThread now uses a `threading.Event` to control its life cycle.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `Redis` class and the `ConnectionPool` class now support the
"health_check_interval=N" option. By default N=0, which turns off health
checks. `N` should be an integer, and when greater than 0, ensures that
a health check is performed just before command execution anytime the
underlying connection has been idle for more than N seconds. A health
check is a full PING/PONG round trip to the Redis server.
If a health check encounters a ConnectionError or TimeoutError, the connection
is disconnected and reconnected and the health check is retried exactly once.
Any error during the retry is raised to the caller. Health check retries
are not governed by any other options such as `retry_on_timeout`. In systems
where idle times are common, these health checks are the intended way to
reconnect to the Redis server without harming any user data.
When this option is enabled for PubSub connections, calling `get_message()` or
`listen()` will send a health check anytime a message has not been read on
the PubSub connection for `health_check_interval` seconds. Users should
call `get_message()` or `listen()` at least every `health_check_interval`
seconds in order to keep the connection open.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This has multiple uses:
* Single connection clients will not be considered threadsafe. This means
certain settings could temporarily be adjusted. For example, a context
manager could temporarily modify the encoding behavior for a set
of commands.
* We can introduce more thorough health checks that only happen when a
connection is handed out from the connection pool.
* Workloads that issue many commands to Redis should be slightly faster.
Prior to this change, the client must retrieve a connection from the
pool for each command.
|
|
|
|
| |
Fixes #1191
|
| |
|
|
|
|
|
|
|
| |
this change allows users to call client.execute_command('info') or
client.execute_command('INFO') and get the same parsed result.
Fixes #1168
|
|
|
|
|
|
|
| |
The Token class was needed when supporting Python 2.6. Now that we've
dropped support for 2.6, we don't need it anymore.
Fixes #1066
|
| |
|
| |
|
|\ |
|
| |\
| | |
| | | |
Fix for https://github.com/andymccurdy/redis-py/issues/1135
|
| | |
| | |
| | | |
Fix for https://github.com/andymccurdy/redis-py/issues/1135
|
|\ \ \
| |/ /
|/| | |
|
| |/ |
|
|/
|
|
|
|
|
|
|
|
|
|
| |
Resolves a race condition found in the PubSubWorkerThread. Prior to this
change is was possible to receive the server's resonse to an unsubscribe
message prior to the channel/pattern being added to the
pending_unsubscribe set.
This also improves PubSubWorkerThread.stop so that the run function is
stopped immediately after the next iteration.
fixes #1150
|
|\
| |
| | |
1022: Fix retry logic for StricRedis and PubSub
|
| | |
|
| | |
|
| | |
|