| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
GEOHASH response may contain None elements
|
| | | |
|
|\ \ \
| |/ / |
|
| | | |
|
|/ /
| |
| |
| |
| |
| | |
messages
Signed-off-by: Xabier Eizmendi <xeizmendi@gmail.com>
|
| |
| |
| |
| |
| |
| | |
Both Python 2.7 & Python 3 have the types bytes. On Python 2.7, it is an
alias for the type str, same as what was previously defined in
_compat.py.
|
| |
| |
| |
| | |
Stream message now respect the decode_responses flag.
|
| |
| |
| |
| |
| |
| |
| | |
Redis 5.0.1 and beyond require that COUNT be specified as a positive
integer. Since we can't guess the maximum possible value (UULONG_MAX
can vary based on server architecture), force min/max/count to be
required arguments
|
| |
| |
| |
| |
| |
| |
| | |
When incr=True and xx=True and an element is specified that doesn't exist
the Redis server returns None. redis-py now does this as well.
Fixes #1084
|
|\ \
| | |
| | | |
Re-fix the recently broken INFO parsing, see #1018
|
| | |
| | |
| | |
| | |
| | | |
The value part of the info line may contains : in many cases,
most importantly an IPv6 slave address, may cause the parser to crash.
|