summaryrefslogtreecommitdiff
path: root/redis
Commit message (Collapse)AuthorAgeFilesLines
...
* Added the 'ssl_check_hostname' option.Andy McCurdy2019-12-292-2/+7
| | | | | | | | '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
* more accurate description of acceptable argument typesAndy McCurdy2019-12-291-2/+2
| | | | fixes #1214
* Allow setting client_name during connection construction.Peter van Dijk2019-12-292-16/+33
| | | | | | 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.
* 'with' statement for PubSub (#765)Dmitry Kuragin2019-12-291-0/+6
| | | PubSub objects are now context managers.
* Testing the boolean nature of Pipeline instance should always return True.Andy McCurdy2019-12-291-0/+8
| | | | | | | | 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
* Added support for ACL commandsAndy McCurdy2019-12-283-18/+276
|
* Fix simple typo: recurrsion -> recursionTim Gates2019-12-071-1/+1
| | | | Closes #1252
* Fix TypeError by passing optional decode_responses keyword argument d… (#1239)Jakob Keller2019-11-111-2/+5
| | | | * Fix TypeError by passing optional decode_responses keyword argument down to parse_slowlog_get()
* Add equality test on Redis client and conn pool (#1240)Rajiv Bakulesh Shah2019-11-112-0/+12
| | | Add equality test on Redis client and connection pool
* Fix misplaced space (#1237)Thomas Matecki2019-10-271-1/+1
| | | Sorry, I'm a pendant.
* Allow Pipeline.execute() to execute on empty command stack if it is watching ↵Brian Maissy2019-10-241-1/+1
| | | | keys
* Version 3.3.113.3.11Andy McCurdy2019-10-132-2/+3
| | | | | | check exception.args rather than exception.message. exception.message was deprecated prior to Python 2.7 and some alternative builds have removed it completely.
* Version 3.3.103.3.10Zac Bristow2019-10-102-2/+2
| | | | | | | | | 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.
* Version 3.3.93.3.9Zac Bristow2019-10-103-6/+58
| | | | | | | | | 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.
* version 3.3.8, fix MONITOR output to account for all types of clients3.3.8huangwei-ds52019-08-192-3/+17
| | | | | | | | | | 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
* version 3.3.7, Fixed a socket.error regression introduced in 3.3.03.3.7Andy McCurdy2019-08-132-5/+17
| | | | | | | 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
* version 3.3.6, fixed a regression in 3.3.5 with pubsub timeouts3.3.6Andy McCurdy2019-08-062-1/+9
| | | | Fixes #1200
* version 3.3.5, handle socket.timeout errors correctly in Python 2.73.3.5Andy McCurdy2019-08-022-17/+9
| | | | | Fix an issue where socket.timeout errors could be handled by the wrong exception handler in Python 2.7.
* version 3.3.4, more specifically identify nonblocking read errors3.3.4Andy McCurdy2019-07-301-1/+2
| | | | | | | 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
* version 3.3.4, more specifically identify nonblocking read errorsAndy McCurdy2019-07-302-15/+18
| | | | | | | 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
* Version 3.3.3. Accomodate Python 2.7.x versions < 2.7.9.3.3.3Andy McCurdy2019-07-302-3/+3
| | | | | | | | 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
* Version 3.3.2, SSL Blocking Exceptions don't use errno.EWOULDBLOCK3.3.2Andy McCurdy2019-07-292-4/+5
| | | | Ref #1197
* version 3.3.1, fixed a regression involving SSL and non-blocking sockets3.3.1Andy McCurdy2019-07-292-9/+20
| | | | Fixes #1197
* version 3.3.0Andy McCurdy2019-07-281-1/+1
|
* Pipelines shouldn't retry ConnectionErrors implicitlyAndy McCurdy2019-07-281-15/+24
|
* Add an Event parameter to PubSubWorkerThread and run_in_thread so (#1195)Timothy Rule2019-07-281-5/+5
| | | | The PubSubWorkerThread now uses a `threading.Event` to control its life cycle.
* PING/PONG health checksAndy McCurdy2019-07-282-25/+89
| | | | | | | | | | | | | | | | | | | | | | 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.
* Ability to create a client that uses a single connectionAndy McCurdy2019-07-231-10/+32
| | | | | | | | | | | | | 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.
* Handle removed claimed messages without an exceptionThomas Daskalakis2019-07-171-1/+7
| | | | Fixes #1191
* Use nonblocking sockets instead of selectors for healthy connectionsAndy McCurdy2019-07-094-248/+109
| | | | | | | 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.
* Add READONLY and READWRITE commandsTheo Despoudis2019-07-091-2/+10
|
* All authentication-related errors now raise AuthenticationErrorAndy McCurdy2019-06-032-4/+7
| | | | | | | 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) (#1162)Brian Candler2019-05-291-0/+4
| | | | | Pass encoding_errors setting to hiredis (>=1.0.0). Fixes #1161
* case insensitive response callbacks.Andy McCurdy2019-05-281-1/+29
| | | | | | | this change allows users to call client.execute_command('info') or client.execute_command('INFO') and get the same parsed result. Fixes #1168
* remove Token class in favor of bytestringremove_tokenAndy McCurdy2019-05-282-125/+88
| | | | | | | 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
* add tests for encoding issues and fix bugs foundAndy McCurdy2019-05-261-1/+1
|
* monitor command now has full command text. test suite improvedAndy McCurdy2019-05-261-4/+8
|
* Merge branch 'master' into monitorAndy McCurdy2019-05-261-2/+4
|\
| * Merge pull request #1152 from aachurin/masterAndy McCurdy2019-04-291-2/+4
| |\ | | | | | | Fix for https://github.com/andymccurdy/redis-py/issues/1135
| | * Update client.pyaachurin2019-03-161-2/+4
| | | | | | | | | Fix for https://github.com/andymccurdy/redis-py/issues/1135
* | | Merge branch 'pr/1033' into monitorAndy McCurdy2019-04-251-0/+49
|\ \ \ | |/ / |/| |
| * | Added support for the monitor command.Doug Kisabaka2019-02-251-0/+49
| | |
* | | Fix PubSubWorkerThread race conditionAndy McCurdy2019-04-181-13/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merged the error process of "reading socket error" in two Parser class and ↵vic0202019-04-111-36/+31
| | | | | | | | | | | | | | | | | | | | | | | | added "host":"port" to Exception message for easy debug Change-Id: Ifaa3bef0c8daf3dd2c60b143746b75a26c182a88
* | | make sure the selector is instantiated prior to cleaning it upAndy McCurdy2019-03-181-2/+4
| | |
* | | Close the selector on disconnectBruce Merry2019-03-181-0/+2
| | |
* | | Unregister socket from ready_pollerBruce Merry2019-03-181-1/+1
| |/ |/| | | | | | | It looks like there was a typo in PollSelector.close that made it unregister from the read_poller twice instead of once from each poller.
* | 3.2.13.2.1Andy McCurdy2019-03-151-1/+1
| |
* | remove unneccessary checkpid from SentinelConnectionPoolsentinel_pool_fixAndy McCurdy2019-03-141-12/+0
|/
* actual 3.2.03.2.0Andy McCurdy2019-02-171-1/+1
|