summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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
* | add locked() method to lock objectAndy McCurdy2018-11-141-0/+8
| | | | | | | | | | | | | | Lock.locked() returns a boolean indicating if the lock is acquired and valid. Thanks Alan Justino da Silva Fixes #1007
* | 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
* | raise a LockError when the context manager fails to acquire a lockv3-breaking-changesAndy McCurdy2018-11-141-0/+6
| | | | | | | | | | Fixes #621 Fixes #927
* | only support LuaLock going forwardAndy McCurdy2018-11-141-53/+9
| | | | | | | | | | | | | | | | | | | | Everyone is using Redis 2.6 or greater, right? The Lua lock implementation is so much nicer and less buggy. Fixes #1031 Fixes #902 Fixes #793 Fixes #610
* | only accept bytes, strings, ints, longs and floats as user inputAndy McCurdy2018-11-141-7/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All input sent to Redis is coerced into bytes. This includes key names and values. Prior to this change, redis-py made an effort to cooerce all input into strings by calling str() (Python 3) or unicode() (Python 2). While this works for a handful of types like ints, longs and floats, it fails for other types like bools ('True' or 'False'), None ('None') and many user defined types. Starting with redis-py version 3.0, sending input of any other type is considered an error an a DataError exception will be raised. Fixes #471 Fixes #472 Fixes #321 Fixes #190
* | fix order of zincrby args to match redis serverAndy McCurdy2018-11-142-3/+3
| | | | | | | | fixes #571
* | remove legacy Redis classAndy McCurdy2018-11-136-172/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | |
* | | Merge pull request #1019 from krishan-carbon/patch-1Andy McCurdy2018-11-131-1/+22
|\ \ \ | | | | | | | | Allow pings in PubSub
| * | | .Krishan Patel2018-10-281-0/+9
| | | |
| * | | fix indentKrishan Patel2018-08-131-2/+2
| | | |
| * | | Added testKrishan Patel2018-08-131-1/+13
| | |/ | |/|
* | | 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
* | | confirm bitfield works with pipelinesAndy McCurdy2018-11-061-0/+17
| | |
* | | support for the bitfield command thanks to Charles LeiferAndy McCurdy2018-11-061-0/+35
| |/ |/|
* | Merge branch 'pr/916' into drop26Andy McCurdy2018-11-068-313/+309
|\ \
| * | Use unicode literals throughout projectJon Dufresne2018-11-035-304/+308
| | | | | | | | | | | | 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-038-8/+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-055-12/+530
|\ \ \
| * | | add test for non-transaction pipelines as wellAndy McCurdy2018-11-041-2/+16
| | | |
| * | | hook for graceful command failure, even in pipelinesAndy McCurdy2018-11-042-0/+15
| | |/ | |/| | | | | | | allow commands that expect 1 or more keys to fail gracefully when 0 keys are provided
| * | Merge pull request #985 from mmaslowskicc/from-url-max-connectionsAndy McCurdy2018-11-021-1/+2
| |\ \ | | | | | | | | Fix parsing max_connections URL query string parameter
| | * | Fix parsing max_connections URL query string parameterMichał Masłowski2018-05-231-1/+2
| | |/ | | | | | | | | | | | | Previously ConnectionPool.from_url kept it as a string, causing a 'ValueError: "max_connections" must be a positive integer'.
| * | 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>
| | * | Converts score from string to floatItamar Haber2018-10-051-10/+10
| | | | | | | | | | | | | | | | Signed-off-by: Itamar Haber <itamar@redislabs.com>
| | * | Adds BZPOPMAX and BZPOPMINItamar Haber2018-10-051-0/+30
| | | | | | | | | | | | | | | | Signed-off-by: Itamar Haber <itamar@redislabs.com>
| | * | Adds ZPOPMAX and ZPOPMINItamar Haber2018-10-051-0/+20
| | |/ | | | | | | | | | Signed-off-by: Itamar Haber <itamar@redislabs.com>
| * | fix test that breaks if other clients are connected to the redis serverAndy McCurdy2018-11-011-4/+3
| | |
| * | python2 compatAndy McCurdy2018-10-311-3/+3
| | |
| * | python 2 likes binary regex hints specified as 'br' rather than 'rb'Andy McCurdy2018-10-311-1/+1
| | |
| * | avoid calling pytest fixtures directly since that's frowned uponAndy McCurdy2018-10-312-5/+6
| | |
| * | rename start/finish and start/end args to min/max on all stream commandsAndy McCurdy2018-10-311-9/+9
| | | | | | | | | | | | | | | this is consistent with the rest of the library and is clearer terminology to the end user
| * | refactor a bunch of the tests.Andy McCurdy2018-10-311-135/+381
| | | | | | | | | | | | | | | | | | | | | | | | | | | - split out tests for each client function - alphabetize - make sure response callbacks return system info dicts with native string keys rather than byte strings. - make sure empty versions of commands that typically return a list return an empty list when streams or messages don't exist
| * | reorganize stream testsAndy McCurdy2018-10-311-114/+103
| | |