summaryrefslogtreecommitdiff
path: root/tests/test_commands.py
Commit message (Collapse)AuthorAgeFilesLines
...
* add type filter to scan functionnetocp2020-01-301-0/+8
| | | | Fixed #1220
* Added support for ACL commandsAndy McCurdy2019-12-281-1/+175
|
* PING/PONG health checksAndy McCurdy2019-07-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | 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-30/+49
| | | | | | | | | | | | | 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-0/+25
| | | | Fixes #1191
* Add READONLY and READWRITE commandsTheo Despoudis2019-07-091-0/+13
|
* case insensitive response callbacks.Andy McCurdy2019-05-281-0/+3
| | | | | | | this change allows users to call client.execute_command('info') or client.execute_command('INFO') and get the same parsed result. Fixes #1168
* Merge pull request #972 from lamby/dont-assume-64-bit-server-in-testsAndy McCurdy2019-01-271-1/+6
|\ | | | | Skip 64-bit specific tests. (Closes: #899)
| * Skip 64-bit specific tests. (Closes: #899)Chris Lamb2018-11-161-1/+6
| | | | | | | | Signed-off-by: Chris Lamb <lamby@debian.org>
* | Added a test for #1126Andy McCurdy2019-01-271-2/+2
| |
* | Fixes #1116Andy McCurdy2019-01-271-1/+1
| |
* | Merge branch 'master' into xreadgroup_handle_nil_fieldsAndy McCurdy2019-01-271-0/+9
|\ \
| * | Added noack option for XREADGROUPJohn T. Myers2019-01-101-0/+10
| | |
* | | Fix #1116 - trimmed stream causes exception on xreadgroup with id 0Xabier Eizmendi2019-01-101-0/+16
|/ / | | | | | | | | | | messages Signed-off-by: Xabier Eizmendi <xeizmendi@gmail.com>
* | Encode Stream message names within XREAD and XREADGROUP responses correctlyAndy McCurdy2018-12-271-5/+5
| | | | | | | | Stream message now respect the decode_responses flag.
* | redis >= 5.0.1 changed behavior of XREADGROUP stream IDAndy McCurdy2018-12-271-38/+25
| | | | | | | | | | | | | | Redis versions 5.0.1 require messages to be read with the special ID '>' when using XREADGROUP Fixes #1073
* | ZADD correctly returns None in certain edge cases when incr=TrueAndy McCurdy2018-12-271-0/+6
| | | | | | | | | | | | | | 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
* | Added test case for filterTheo Despoudis2018-12-081-0/+21
| | | | | | | | Signed-off-by: Theo Despoudis <thdespou@hotmail.com>
* | Code review fixesTheo Despoudis2018-12-061-27/+22
| | | | | | | | Signed-off-by: Theo Despoudis <thdespou@hotmail.com>
* | Add client kill with filterTheo Despoudis2018-12-041-0/+37
| | | | | | | | Signed-off-by: Theo Despoudis <thdespou@hotmail.com>
* | Remove decoding from georadiusBo Bayles2018-11-211-11/+11
| |
* | Don't destroy data in GEORADIUS commandsBo Bayles2018-11-201-4/+5
|/
* saner handling of decr/incr vs decrby/incrbyAndy McCurdy2018-11-141-0/+5
|
* Merge pull request #925 from itamarhaber/sort_issueAndy McCurdy2018-11-141-0/+5
|\ | | | | Fixes a KeyError in empty `options` dict at sort's return
| * Fixes a KeyError in empty `options` dict at sort's returnItamar Haber2017-11-131-0/+5
| | | | | | | | Fixes #924
* | Add test to make sure geodist with a missing member returns NoneAndy McCurdy2018-11-141-0/+6
| | | | | | | | Fixes #939
* | EXISTS now accepts multiple keys. return the number of existing keysAndy McCurdy2018-11-141-2/+4
| | | | | | | | | | | | Fixes #1053 Fixes #635 Fixes #766
* | add nx, xx, ch and incr options to ZADDAndy McCurdy2018-11-141-0/+34
| | | | | | | | | | | | | | | | Fixes #649 Fixes #954 Fixes #638 Fixes #721 Fixes #955
* | fix order of zincrby args to match redis serverAndy McCurdy2018-11-141-2/+2
| | | | | | | | fixes #571
* | remove legacy Redis classAndy McCurdy2018-11-131-99/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | redis-py maintained backwards compatibility by keeping the old "Redis" class around for quite some time. While no doubt a convenience for folks who relied on it, the presence of both Redis and StrictRedis causes a number of support issues and general confusion. With 3.0, we're breaking a few things to make redis-py better going forward. This change removes the old Redis class. We also renamed the StrictRedis class to Redis and aliased StrictRedis to Redis. For people that have been using StrictRedis, this should not change anything. You can continue doing things as you are. People still using the legacy Redis class will need to update the argument order for the SETEX, LREM and ZADD commands. Additionally, the return values for TTL and PTTL now return the integer values -1 when a key exists but has no expire time and -2 when a key does not exist. Previously these cases returned a None value in the Redis class.
* | force mapping to be a single dict object on MSET, MSETNX and ZADDAndy McCurdy2018-11-131-16/+2
| | | | | | | | | | | | | | | | | | Previously MSET, MSETNX and ZADD accepted multiple ways to specify the mapping of keys to values including via **kwargs. This turned out to be a poor choice. As Redis evolved and added additional options to the ZADD command, these options couldn't be specified in redis-py without possible element name conflictd. This fixes that going forward and makes the commands simpler.
* | Merge pull request #1057 from RoeyPrat/roey-client_pauseAndy McCurdy2018-11-131-0/+15
|\ \ | | | | | | CLIENT PAUSE and type argument in client_list
| * | Implements type argument in client_listRoey Prat2018-11-071-0/+8
| | |
| * | Implements CLIENT PAUSERoey Prat2018-11-071-0/+7
| | |
* | | Adds the memory_usage and memory_purge commandsItamar Haber2018-11-091-0/+5
| | | | | | | | | | | | Signed-off-by: Itamar Haber <itamar@redislabs.com>
* | | fix stupid linter warningbitfieldAndy McCurdy2018-11-071-4/+4
| | |
* | | added better overflow control and lifecycle mgmt to bitfieldsAndy McCurdy2018-11-071-18/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - bitfields now accept a `default_overflow` argument that sets the default overflow behavior for incrby operations - exposed an overflow() method that sets the overflow behavior for future incrby operations. this can be used in place of the overfly argument to incrby if someone prefers - clean up bitfield instance upon execution, resetting the overflow behavior back to the default provided and clearing the list of operations
* | | support for the bitfield command thanks to Charles LeiferAndy McCurdy2018-11-061-0/+35
|/ /
* | Merge branch 'pr/916' into drop26Andy McCurdy2018-11-061-263/+263
|\ \
| * | Use unicode literals throughout projectJon Dufresne2018-11-031-261/+262
| | | | | | | | | | | | Remove workaround for handling unicode with older Pythons.
| * | Use set literals instead of set([...])Jon Dufresne2018-11-031-34/+34
| | |
| * | Remove from __future__ import with_statementJon Dufresne2018-11-031-1/+0
| | | | | | | | | | | | All supported Python versions support the with statement.
* | | Merge pull request #933 from yozel/masterAndy McCurdy2018-11-061-0/+15
|\ \ \ | | | | | | | | Add support for UNLINK command
| * | | Add support for UNLINK commandYasin Ozel2017-12-011-0/+15
| | |/ | |/|
* | | Merge branch 'master' into v5-client-subcommandsAndy McCurdy2018-11-051-6/+494
|\ \ \
| * | | hook for graceful command failure, even in pipelinesAndy McCurdy2018-11-041-0/+1
| | |/ | |/| | | | | | | allow commands that expect 1 or more keys to fail gracefully when 0 keys are provided
| * | added MKSTREAM option to xgroup_createAndy McCurdy2018-11-011-0/+22
| | |
| * | remove unncessary deletes at beginning of testsAndy McCurdy2018-11-011-8/+0
| | |
| * | Merge pull request #1037 from itamarhaber/zpopAndy McCurdy2018-11-011-0/+50
| |\ \ | | | | | | | | Adds support for ZPOPMAX, ZPOPMIN and their respective blocking variants
| | * | PEP8's itItamar Haber2018-10-051-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Itamar Haber <itamar@redislabs.com>