| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
watching keys
|
|
|
| |
Fixed `README.rst's` `code-block` directive `lang` name typo.
|
|
|
| |
Fix test suite with Redis versions pre-5.0.0
|
|
|
|
|
|
| |
check exception.args rather than exception.message. exception.message
was deprecated prior to Python 2.7 and some alternative builds have
removed it completely.
|
|
|
|
|
|
|
|
|
| |
Fix SSL regression introduced in 3.3.9
The wrapper introduced to handle SSL timeout errors in Python 2.7
incorrectly assumed that instances of SSLError would always have a
string as their first element. The safer approach is to check the
message attribute on the error.
|
|
|
|
|
|
|
|
|
| |
Fixes SSL read timeouts in Python 2.7
The ssl module in Python 2.7 raises timeouts as ssl.SSLError instead of
socket.timeout. When these timeouts are encountered, the error will be
re-raised as socket.timeout so it is handled appropriately by the
connection.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Prior versions of 3.3.x could potentially raise a raw socket.error
(or one of its subclasses) instead of a redis.exceptions.ConnectionError.
Fixes #1202
|
|
|
|
| |
Fixes #1200
|
|
|
|
|
| |
Fix an issue where socket.timeout errors could be handled by the wrong
exception handler in Python 2.7.
|
|
|
|
|
|
|
| |
versions 3.3.1, 3.3.2 and 3.3.3 could potentially hide ConnectionErrors
on Python 2.7. This change accurately identifies errors by both
exception class and errno to determine whether a nonblocking socket can
be read
|
|
|
|
|
|
|
| |
versions 3.3.1, 3.3.2 and 3.3.3 could potentially hide ConnectionErrors
on Python 2.7. This change accurately identifies errors by both
exception class and errno to determine whether a nonblocking socket can
be read
|
| |
|
|
|
|
|
|
|
|
| |
The SSL module includes in Python versions < 2.7.9 does not include
the SSLWantReadError or SSLWantWriteError exceptions. As such we can't
assume they are present just because the ssl module happens to be installed.
Fixes #1197
|
|
|
|
|
|
|
|
|
|
| |
Commands sent on pubsub connections (like subscribe, psusbscribe, etc.) do
not wait for the server to acknowledge a reply. This can lead to situations
where commands are executed out of order. This is more noticeable on laggy
connections.
This fix ensures that all anticipated messages are read off the pubsub
connection before proceeding to the next command
|
| |
|
|
|
|
| |
Ref #1197
|
|
|
|
| |
Fixes #1197
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
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 replaces the work in 3.2.0 to use nonblocking sockets instead of
selectors. Selectors proved to be problematic for some environments
including eventlet and gevent. Nonblocking sockets should be available
in all environments.
|
| |
|
| |
|
|
|
| |
Users can now specify --redis-url when running the test suite to choose a specific server.
|
| |
|
|
|
|
|
|
|
| |
AuthenticationError is now a subclass of ConnectionError, which means
the connection will be shut down and cleaned up.
Fixes #923
|
| |
|
|
|
|
|
| |
Pass encoding_errors setting to hiredis (>=1.0.0).
Fixes #1161
|
| |
|
|
|
|
|
|
|
| |
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
|
|\ \ \
| |/ /
|/| | |
|
| | | |
|