summaryrefslogtreecommitdiff
path: root/tests/test_pipeline.py
Commit message (Collapse)AuthorAgeFilesLines
* Combine auto-concatenated strings (#2482)David Gilman2022-12-141-4/+4
|
* update black to 22.3.0 (#2171)Utkarsh Gupta2022-05-301-4/+1
|
* Added black and isort (#1734)Anas2021-11-301-142/+147
|
* Pyupgrade + flynt + f-strings (#1759)Aarni Koskela2021-11-301-1/+1
| | | @akx Thank you so much for this! Thanks again for introducing me to a new tool that I'm sliding into my workflow as well.
* Adding RedisCluster client to support Redis Cluster Mode (#1660)Bar Shaul2021-11-251-0/+14
| | | | Co-authored-by: Chayim <chayim@users.noreply.github.com> Co-authored-by: Anas <anas.el.amraoui@live.com>
* Pipeline DISCARD support (#1565)Chayim2021-09-011-1/+27
| | | | | closes #1539 Part of #1546
* Remove support for end-of-life Python 2.7 (#1318)Jon Dufresne2020-08-061-15/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove support for end-of-life Python 2.7 Python 2.7 is end of life. It is no longer receiving bug fixes, including for security issues. Python 2.7 went EOL on 2020-01-01. For additional details on support Python versions, see: Supported: https://devguide.python.org/#status-of-python-branches EOL: https://devguide.python.org/devcycle/#end-of-life-branches Removing support for EOL Pythons will reduce testing and maintenance resources while allowing the library to move towards a modern Python 3 style. Python 2.7 users can continue to use the previous version of redis-py. Was able to simplify the code: - Removed redis._compat module - Removed __future__ imports - Removed object from class definition (all classes are new style) - Removed long (Python 3 unified numeric types) - Removed deprecated __nonzero__ method - Use simpler Python 3 super() syntax - Use unified OSError exception - Use yield from syntax Co-authored-by: Andy McCurdy <andy@andymccurdy.com>
* Clear pipeline watch state after execNick Gaya2020-03-101-0/+35
|
* Don't send DISCARD after ExecAbortError in pipelineNick Gaya2020-03-101-0/+15
| | | | | | | The `EXECABORT` error type was added in Redis 2.6.5 and is returned from an `EXEC` command to indicate that the transaction was aborted due to an invalid command. It is not necessary to call `DISCARD` after this error, and doing so causes a "DISCARD without MULTI" error.
* Support memoryview encoding/decoding as a no-opCody-G2020-02-241-0/+10
| | | | | | | | | | This allows memoryview instances to be passed to Redis command args that expect strings or bytes. The memoryview instance is sent directly to the socket such that there are zero copies made of the underlying data during command packing. Fixes #1265 Fixes #1285
* Add test for pipeline.transaction(value_from_callable=True)Andy McCurdy2019-12-291-0/+8
|
* Testing the boolean nature of Pipeline instance should always return True.Andy McCurdy2019-12-291-3/+5
| | | | | | | | 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
* Allow Pipeline.execute() to execute on empty command stack if it is watching ↵Brian Maissy2019-10-241-0/+13
| | | | keys
* fix order of zincrby args to match redis serverAndy McCurdy2018-11-141-1/+1
| | | | fixes #571
* remove legacy Redis classAndy McCurdy2018-11-131-2/+6
| | | | | | | | | | | | | | | | | | | 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.
* confirm bitfield works with pipelinesAndy McCurdy2018-11-061-0/+17
|
* Merge branch 'pr/916' into drop26Andy McCurdy2018-11-061-24/+24
|\
| * Use unicode literals throughout projectJon Dufresne2018-11-031-23/+24
| | | | | | | | Remove workaround for handling unicode with older Pythons.
| * Remove from __future__ import with_statementJon Dufresne2018-11-031-1/+0
| | | | | | | | All supported Python versions support the with statement.
* | add test for non-transaction pipelines as wellAndy McCurdy2018-11-041-2/+16
| |
* | hook for graceful command failure, even in pipelinesAndy McCurdy2018-11-041-0/+14
|/ | | | allow commands that expect 1 or more keys to fail gracefully when 0 keys are provided
* Add extra info to exceptions raised in pipelines. Fixes #407Andy McCurdy2013-12-081-4/+28
| | | | | | | | | ResponseErrors generated by commands executed in a pipeline now includes the command position in the pipeline and the actual command sent to the Redis server. For example: Command # 3 (LPUSH c 3) of pipeline caused error: <actual error message from Redis server>
* pipeline tests converted to pytestandy2013-06-041-0/+202