| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
| |
Better thread and fork safety for ConnectionPool and BlockingConnectionPool
|
| |
|
|
|
|
| |
Fixed #1220
|
|
|
|
| |
Fixed #1255
|
| |
|
|
|
|
|
|
|
|
| |
'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
|
|
|
|
| |
fixes #1214
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Python 3.4 has been EOL since 2019-03-18.
Removing from the test matrix helps reduce testing resources.
For additional details on unsupported Python versions, see:
https://devguide.python.org/devcycle/#end-of-life-branches
|
|
|
|
| |
Closes #1252
|
|
|
|
|
|
| |
While numbers are frequently singletons as an optimization, it is not
guaranteed by the language specification. Fixes flake8 error:
F632 use ==/!= to compare str, bytes, and int literals
|
|
|
|
|
|
|
|
|
|
| |
Starting with wheel 0.32.0 (2018-09-29), the "license_file" option is
deprecated.
The wheel will continue to include LICENSE, it is now included
automatically:
https://wheel.readthedocs.io/en/stable/user_guide.html#including-license-files-in-the-generated-wheel-file
https://wheel.readthedocs.io/en/stable/news.html
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
tox can now always be used as the test entry point and allows for
contributors to easily test the full test matrix locally.
Starting with setuptools v41.5.0 (27 Oct 2019) the `setup.py test`
command is formally deprecated. It now emits a warning on use. Prior to
this version, it use was discouraged by the setuptools developers.
Now, always use tox as the one testing entry point. It handles multiple
version of Python and Redis.
The Travis CI configuration was reworked to use tox to install
dependencies and run tests in the same manner that contributors would do
locally.
|
|
|
|
| |
* 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
|
|
|
| |
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
|