summaryrefslogtreecommitdiff
path: root/redis
Commit message (Collapse)AuthorAgeFilesLines
* Fix protocol version checking (#2737)dvora-h2023-05-042-2/+2
|
* Fix `COMMAND` response in resp3 (redis 7+) (#2740)dvora-h2023-05-042-4/+37
|
* Add support for PubSub with RESP3 parser (#2721)dvora-h2023-04-246-19/+140
| | | | | | | | | | | * add resp3 pubsub * linters * _set_info_logger func * async pubsun * docstring
* Fix async client with resp3 (#2657)v5.0.0b1dvora-h2023-03-231-0/+2
|
* Reorganizing the parsers code, and add support for RESP3 (#2574)dvora-h2023-03-2319-963/+1214
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Reorganizing the parsers code * fix build package * fix imports * fix flake8 * add resp to Connection class * core commands * python resp3 parser * pipeline * async resp3 parser * some asymc tests * resp3 parser for async cluster * async commands tests * linters * linters * linters * fix ModuleNotFoundError * fix tests * fix assert_resp_response_in * fix command_getkeys in cluster * fail-fast false * version --------- Co-authored-by: Chayim I. Kirshen <c@kirshen.com>
* AsyncIO Race Condition Fix (#2641)v4.5.3Chayim2023-03-222-5/+19
|
* Fix behaviour of async PythonParser to match RedisParser as for issue #2349 ↵Kristján Valur Jónsson2023-03-161-13/+11
| | | | | | | (#2582) * Allow data to drain from PythonParser after connection close. * Add Changes
* introduce AbstractConnection so that UnixDomainSocketConnection can call ↵woutdenolf2023-03-161-158/+120
| | | | | super().__init__ (#2588) Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
* add queue_class to REDIS_ALLOWED_KEYS (#2577)Dongkeun Lee2023-03-161-0/+1
| | | | | | | | | | | | * add queue_class to REDIS_ALLOWED_KEYS * fix lint * fix lint --------- Co-authored-by: zach.lee <zach.lee@sendbird.com> Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
* fix: replace async_timeout by asyncio.timeout (#2602)Mehdi ABAAKOUK2023-03-161-8/+13
| | | | | | | | | | | | | async_timeout does not support python 3.11 https://github.com/aio-libs/async-timeout/pull/295 And have two years old annoying bugs: https://github.com/aio-libs/async-timeout/issues/229 https://github.com/redis/redis-py/issues/2551 Since asyncio.timeout has been shipped in python 3.11, we should start using it. Partially fixes 2551
* Remove redundant assignment. (#2620)Eom Taegyung "Iggy2023-03-161-1/+0
|
* Making search document subscriptable (#2615)Abhishek Kumar Sinha2023-03-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fixed issue #2598 - make Document class subscriptable * Last time added older file, fixed it * retrigger checks * update json().arrindex() default values (#2611) * update json().arrindex() default values * add unit test * fix falsy checks * more unit tests * add asyncio tests * fix lint line length --------- Co-authored-by: Alex Schmitz <aschmitz@box.com> * Speeding up the protocol parsing (#2596) * speeding up the protocol parser * linting * changes to ease * Fixed CredentialsProvider examples (#2587) Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com> * ConnectionPool SSL example (#2605) * [types] update return type of smismember to list[int] (#2617) * update return type of smismember * use Literal instead of int * retrigger checks * Added test for document subscriptable in tests/test_search.py * Fixed linter issue * retrigger checks --------- Co-authored-by: Alex Schmitz <alex.schmitz@gmail.com> Co-authored-by: Alex Schmitz <aschmitz@box.com> Co-authored-by: Chayim <chayim@users.noreply.github.com> Co-authored-by: Bar Shaul <88437685+barshaul@users.noreply.github.com> Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com> Co-authored-by: CrimsonGlory <CrimsonGlory@users.noreply.github.com> Co-authored-by: Raymond Yin <raymond@tryevergreen.com>
* [types] update return type of smismember to list[int] (#2617)Raymond Yin2023-03-151-2/+7
| | | | | * update return type of smismember * use Literal instead of int
* Speeding up the protocol parsing (#2596)Chayim2023-03-152-26/+23
| | | | | | | * speeding up the protocol parser * linting * changes to ease
* update json().arrindex() default values (#2611)Alex Schmitz2023-03-151-5/+9
| | | | | | | | | | | | | | | | | * update json().arrindex() default values * add unit test * fix falsy checks * more unit tests * add asyncio tests * fix lint line length --------- Co-authored-by: Alex Schmitz <aschmitz@box.com>
* Fix for `lpop` and `rpop` return typing (#2590)Galtozzy2023-02-151-2/+10
| | | Right now there is an annoying warning that these methods can't be awaited when using `redis.asyncio`, even tho it does work with no problems.
* Fix #2581 UnixDomainSocketConnection' object has no attribute ↵Sergey Prokazov2023-02-081-0/+2
| | | | | | | | | | | | | | | | | '_command_packer' (#2583) * Fix #2581 UnixDomainSocketConnection' object has no attribute '_command_packer' . Apparently there is no end-to-end tests for Unix sockets so automation didn't catch it. I assume that setting up domain sockets reliably in dockerized environment is not very trivial. Added test for pack_command specifically. * Figuring out why CI fails. Locally: " congratulations :)" * Fix the test. hiredis doesn't treat memoryviews differently.
* Fix issue with `pack_commands` returning an empty byte sequence (#2416)jmcbailey2023-02-072-2/+4
| | | Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
* Fix issue 2349: Let async HiredisParser finish parsing after a ↵Kristján Valur Jónsson2023-02-061-6/+9
| | | | | | | | | | | | | Connection.disconnect() (#2557) * A failing unittest * Do not clear the redis-reader's state when we disconnect so that it can finish reading the final message * Test that reading a message of two chunks after a disconnect() works. * Add Changes * fix typos
* Fix issue 2567: NoneType check before raising exception (#2569)Anurag Bandyopadhyay2023-02-061-2/+3
| | | Co-authored-by: Anuragkillswitch <70265851+Anuragkillswitch@users.noreply.github.com>
* Use hiredis::pack_command to serialized the commands. (#2570)Sergey Prokazov2023-02-062-45/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implemented pack command and pack bytes * 1) refactored the command packer construction process 2) now hiredis.pack_bytes is the default choice. Though it's still possible to run redisrs-py (fix the flag in utils.py) or hiredis.pack_command (flag in connection.py) * Switch to hiredis.pack_command * Remove the rust extension module. * 1) Introduce HIREDIS_PACK_AVAILABLE environment variable. 2) Extract serialization functionality out of Connection class. * 1) Fix typo. 2) Add change log entry. 3) Revert the benchmark changes * Ditch the hiredis version check for pack_command. * Fix linter errors * Revert version changes * Fix linter issues * Looks like the current redis-py version is 4.4.1 --------- Co-authored-by: Sergey Prokazov <sergey.prokazov@redis.com>
* Fix: tuple function cannot be passed more than one argument (#2573)Kosuke2023-02-061-1/+1
|
* Fix issue 2540: Synchronise concurrent command calls to single-client mode. ↵Vivanov982023-01-291-2/+13
| | | | | (#2568) Co-authored-by: Viktor Ivanov <viktor@infogrid.io>
* Fix unlink in cluster pipeline (#2562)gmbnomis2023-01-291-0/+11
| | | | Implement unlink() like delete() to make it work when used in a cluster pipeline.
* Simplify the sync SocketBuffer, add type hints (#2543)Kristján Valur Jónsson2023-01-221-39/+44
|
* Add missing `Union` type in method `StreamCommands.xclaim()` (#2553)David Pacsuta2023-01-221-1/+1
| | | | `Union` was missing in front of `[List[StreamIdT], Tuple[StreamIdT]]` and VSCode was producing an error because of it. After adding `Union` the type annotation is correctly identified by VSCode.
* Add support to BF.CARD (#2545)shacharPash2023-01-112-0/+10
| | | | | | | * Add support to BF.CARD * Add Async test * change to with pytest.raises
* add support for custom connection pool class in NodesManager (#2547)Dongkeun Lee2023-01-111-1/+4
| | | Co-authored-by: zach.lee <zach.lee@sendbird.com>
* allow replica to master promotion in nodes_cache (#2549)Dongkeun Lee2023-01-111-0/+2
| | | Co-authored-by: zach.lee <zach.lee@sendbird.com>
* String cleanse (#2548)Jan2023-01-111-0/+1
| | | | | | | * Fixed string escape and added tests * Add Change * Name change
* add type checking for graph __eq__ (#2531)dvora-h2023-01-083-0/+12
|
* ValueError must be AttributeError in __init__.py (#2542)SessionIssue2023-01-081-1/+1
| | | | | | | | | * Revert "Update __init__ for issue 2215 (#2539)" This reverts commit f14ed1fc822a88a21bbfc64e36bf8b09e5c9386c. * Update __init__.py ValueError must be AttributeError ofc.
* Make PythonParser resumable (#2510)Kristján Valur Jónsson2023-01-052-34/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | * PythonParser is now resumable if _stream IO is interrupted * Add test for parse resumability * Clear PythonParser state when connection or parsing errors occur. * disable test for cluster mode. * Perform "closed" check in a single place. * Update tests * Simplify code. * Remove reduntant test, EOF is detected inside _readline() * Make syncronous PythonParser restartable on error, same as HiredisParser Fix sync PythonParser * Add CHANGES * isort * Move MockStream and MockSocket into their own files
* Fix incorrect _disconnect_raise docstring (#2534)Mohsin Haider2023-01-051-2/+2
|
* add str support for set ex parameter (#2529)shacharPash2023-01-051-0/+2
|
* replase get_event_loop wite get_running_loop (#2530)dvora-h2023-01-053-5/+5
|
* Update __init__ for issue 2215 (#2539)SessionIssue2023-01-051-1/+4
| | | Fallback for issue https://github.com/redis/redis-py/issues/2215
* Add dialect to ft aggregate (#2537)DvirDukhan2023-01-021-0/+13
| | | | | | | | | * add dialect to aggregate request * added test * format * async test
* Support for resetchannels since Redis 6.2.0 (#2514)stitch2022-12-261-0/+10
|
* Allow EVAL_RO and EVALSHA_RO to be routed to read replica (#2494)Dongkeun Lee2022-12-252-1/+3
| | | | | | | | | | | | * fix typo (Lue -> Lua) * run eval_ro, evalsha_ro test on redis cluster * Add eval_ro, evalsha_ro to read only commands * assert that commands are run in a round robin manner Co-authored-by: zach.lee <zach.lee@sendbird.com> Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
* Fix for Unhandled exception related to self.host with unix socket (#2520)Jason Joy Atsu Winmorre2022-12-251-11/+23
| | | | | | | | | * Fix for Unhandled exception related to self.host with unix socket * Added change to the CHANGES file * fix linter error * Reformatted connection.py file
* Add `timeout` parameter for SentinelManagedConnection (#2495)Guillaume Tassery2022-12-251-3/+10
|
* Add TIMEOUT to query class (#2519)shacharPash2022-12-211-0/+8
| | | | | | | | | | | | | | | | | | | * add timeout to query class * Add test_timeout * fix lines * fix format * add test & fixes * merge tests * change timeout to not_a_number * change q1 to q2 * Fix async method
* Raising NotImplementedError for certain CLUSTER commands (#2504)dvora-h2022-12-141-0/+10
| | | Co-authored-by: Chayim <chayim@users.noreply.github.com>
* Combine auto-concatenated strings (#2482)David Gilman2022-12-149-41/+35
|
* Add support for certain LATENCY commands (#2503)dvora-h2022-12-142-0/+27
| | | | | * add latency commands * fix tests in cluster
* Intentional NotImplementedError for LATENCY commands that should not be in ↵Chayim2022-12-121-0/+28
| | | | client (#2501)
* Updating dev dependencies (#2475)Chayim2022-12-041-2/+2
|
* Async clusters: Support creating locks inside async functions (#2471)Utkarsh Gupta2022-12-041-1/+5
| | | Co-authored-by: Chayim <chayim@users.noreply.github.com>
* Async: added 'blocking' argument to call lock method (#2454)Sibuken2022-12-012-0/+16
| | | Co-authored-by: Chayim <chayim@users.noreply.github.com>