summaryrefslogtreecommitdiff
path: root/redis/commands
Commit message (Collapse)AuthorAgeFilesLines
* support JSON.MERGE Command (#2761)HEADmastershacharPash2023-05-162-0/+23
| | | | | | | | | | | | | | | | | * support JSON.MERGE Command * linters * try with abc instead person * change @skip_ifmodversion_lt to latest ReJSON 2.4.7 * change version * fix test * linters * add async test
* Fix `xadd` allow non negative maxlen (#2739)Seongchuel Ahn2023-05-081-2/+2
| | | | | | | | | * Fix xadd allow non negative maxlen * Update change log --------- Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
* Add client no-touch (#2745)Seongchuel Ahn2023-05-081-0/+11
| | | | | | | | | | | | | | | | | | | | | | | * Add client no-touch * Update redis/commands/core.py Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com> * Update test_commands.py Improve test_client_no_touch * Update test_commands.py Add async version test case * Chore remove whitespace Oops --------- Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
* Add support for cluster myshardid (#2704)Anurag Bandyopadhyay2023-05-081-1/+8
| | | | | | | | | | | | | | | | | | | * feat: adding support for cluster myshardid * lint fix * fix: comment fix and async test * fix: adding version check * fix lint: * linters --------- Co-authored-by: Anuragkillswitch <70265851+Anuragkillswitch@users.noreply.github.com> Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com> Co-authored-by: dvora-h <dvora.heller@redis.com>
* Add WITHSCORES to ZREVRANK Command (#2725)shacharPash2023-04-301-2/+11
| | | | | | | | | * add withscores to zrevrank * change 0 -> 2 * fix errors * split test
* 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
* 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.
* 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
* 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
|
* add str support for set ex parameter (#2529)shacharPash2023-01-051-0/+2
|
* 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>
* 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-143-26/+20
|
* Add support for certain LATENCY commands (#2503)dvora-h2022-12-141-0/+24
| | | | | * add latency commands * fix tests in cluster
* Intentional NotImplementedError for LATENCY commands that should not be in ↵Chayim2022-12-121-0/+28
| | | | client (#2501)
* Wrong number of arguments for `geosearch` command (#2464)dvora-h2022-12-011-1/+1
| | | | Co-authored-by: Chayim <chayim@users.noreply.github.com> Fixes https://github.com/redis/redis-py/issues/2462
* Enable AsyncIO cluster mode lock (#2446)Milhan2022-11-091-2/+10
| | | Co-authored-by: Chayim <chayim@users.noreply.github.com>
* Remove `deprecated` dependency (#2386)Aarni Koskela2022-10-303-14/+10
| | | No need for an external library just for 5 annotations.
* Remove default None value from LMPOP (#2438)dvora-h2022-10-301-1/+1
|
* Fix KeyError in async cluster - initialize before execute multi key commands ↵dvora-h2022-10-301-0/+19
| | | | | | | | | (#2439) * Fix KeyError in async cluster * link to issue * typo
* Add to_string method for GeoValue (#2404)Anne Yang2022-10-251-0/+3
| | | | | | | | | * Add to_string method for GeoValue * fix code style * simplify code Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
* Deprecate `add_doccument` (FT.ADD) (#2425)dvora-h2022-10-241-0/+8
| | | | | | | | | * deprecate add_doccuments * linters * linters * async tests
* remove tdigest.add weights (#2408)dvora-h2022-10-062-12/+4
|
* Fix - aggregation request arguments for LIMIT (#2393)dvora-h2022-09-291-4/+2
| | | Co-authored-by: Chayim <chayim@users.noreply.github.com>
* Add support for new TDIGEST features and changes (#2392)dvora-h2022-09-214-30/+68
| | | | | | | | | | | * Add support to TDIGEST * linters * linters * linters * disable View Test Results in CI
* Mark `TOPK.COUNT` as deprecated (#2363)dvora-h2022-09-041-0/+3
| | | | | * deprecate * linters
* change return type of parse_bollean to bool (#2364)dvora-h2022-09-041-1/+1
|
* Adding reserve as an alias for create, so that we have BF.RESERVE and ↵Chayim2022-08-301-0/+4
| | | | | | | | | CF.RESERVE accuratenly supported (#2331) * Adding reserve as an alias for create, so that we have BF.RESERVE accuratenly supported * add reserve to cf commands Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
* Add BITFIELD_RO (#2340)Alibi2022-08-211-0/+23
|
* fix tdigest.create (#2348)dvora-h2022-08-211-1/+1
|
* Add support for WITHSUFFIXTRIE to FT.CREATE (#2324)v4.4.0rc1dvora-h2022-08-041-1/+11
| | | | | | | * withsuffixtrie * Update test_search.py * fix
* Add TDIGEST.TRIMMED_MEAN (#2300)Alibi2022-08-042-0/+12
| | | | | | | | | | | * Add tdigest trimmed mean command with test * Add skip version for test * add to module callbacks Co-authored-by: Alibi Shalgymbay <a.shalgymbay@mycar.kz> Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com> Co-authored-by: dvora-h <dvora.heller@redis.com>
* Support TDIGEST.MERGESTORE and make compression optional on TDIGEST.CREATE ↵dvora-h2022-08-021-1/+15
| | | | | | | | | | | (#2319) * support 2.4 * async test * skip tests * linters
* Fix async SEARCH pipeline (#2316)dvora-h2022-08-021-1/+1
| | | | | * fix search async pipeline * newline
* change drop to dropindex (#2315)dvora-h2022-08-021-2/+3
|
* Replace `ensure_future` with `create_task` (#2311)dvora-h2022-08-021-1/+1
| | | | | * Replace `ensure_future` with `create_task` * linters
* Add support for `TDIGEST.QUANTILE` extensions (#2317)dvora-h2022-08-023-5/+10
| | | | | | | | | * Add support for TDIGEST.QUANTILE extensions * linters * linters & utils * Update test_bloom.py
* Fix timezone handling for datetime to unixtime conversions (#2213)joe2022-08-021-12/+6
| | | | | | | | | | | | | | * Fix timezone handling for datetime to unixtime conversions datetime objects are supported to set expire, these can have timezones. mktime was used to convert these to unixtime. mktime in Python however is not timezone aware, it expects the input to be UTC and redis-py did not convert the datetime timestamps to UTC before calling mktime. This can lead to: 1) Setting incorrect expire times because the input datetime object has a timezone but is passed to mktime without converting to UTC first. 2) When the datetime timestamp is within DST, mktime fails with "OverflowError: mktime argument out of range" because UTC doesn't have DST. This depends on libc versions. * linters Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
* Fix typing on smembers command (#2312)Agustin Marquez2022-07-311-1/+2
|
* Add support for async GRAPH module (#2273)dvora-h2022-07-284-135/+525
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add support for async graph * linters * fix docstring * Use retry mechanism in async version of Connection objects (#2271) * fix is_connected (#2278) * fix: workaround asyncio bug on connection reset by peer (#2259) Fixes #2237 * Fix crash: key expire while search (#2270) * fix expire while search * sleep * docs: Fix a few typos (#2274) * docs: Fix a few typos There are small typos in: - redis/cluster.py - redis/commands/core.py - redis/ocsp.py - tests/test_cluster.py Fixes: - Should read `validity` rather than `valididy`. - Should read `reinitialize` rather than `reinitilize`. - Should read `farthest` rather than `farest`. - Should read `commands` rather than `comamnds`. * Update core.py * async_cluster: fix concurrent pipeline (#2280) - each pipeline should create separate stacks for each node * Add support for TIMESERIES 1.8 (#2296) * Add support for timeseries 1.8 * fix info * linters * linters * fix info test * type hints * linters * Remove verbose logging from `redis-py/redis/cluster.py` (#2238) * removed the logging module and its corresponding methods * updated CHANGES * except block for RedisClusterException and BusyLoadingError removed * removed unused import (redis.exceptions.BusyLoadingError) * empty commit to re-trigger Actions workflow * replaced BaseException with Exception * empty commit to re-trigger Actions workflow * empty commit to re-trigger Actions workflow * redundant logic removed * re-trigger pipeline * reverted changes * re-trigger pipeline * except logic changed * redis stream example (#2269) * redis stream example * redis stream example on docs/examples.rst Co-authored-by: pedro.frazao <perl.pf@netcf.org> * Fix: `start_id` type for `XAUTOCLAIM` (#2257) * Changed start_id type for xautoclaim * Added to changes Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com> * Doc add timeseries example (#2267) * DOC add timeseries example * DOC add timeseries examples * Apply suggestions * Fix typo Detention period => Retention period Co-authored-by: Gauthier Imbert <gauthier@PC17> * Fix warnings and resource usage problems in asyncio unittests (#2258) * Use pytest-asyncio in auto mode Remove overly genereric `pytestmark=pytest.mark.asyncio` causing lots of warning noise * Use "Factories as Fixtures" test pattern for the `create_redis` fixture this fixture is now async, avoiding teardown problems with missing event loops. * Fix sporadic error on fast event loops, such as `--uvloop` * Close connection, even if "username" was in kwargs This fixes a resource usage warning in the async unittests. * Do async cleanup of acl passwords via a fixture * Remove unused import, fix whitespace * Fix test with missing "await" * Close pubsub objects after use in unittest Use a simple fixture where possible, otherwise manually call pubsub.close() * re-introduce `pytestmark=pytest.mark.asyncio` for python 3.6 * Use context manager to clean up connections in connection pool for unit tests * Provide asynccontextmanager for python 3.6 * make `test_late_subscribe()` more robuste * Catch a couple of additional leaked resources * Graph - add counters for removed labels and properties (#2292) * grpah - add counters for removed labels and properties * added mock graph result set statistics * docstrings for graph result set statistics * format * isort * moved docstrings into functions * cleaning up the readme and moving docs into readthedocs (#2291) * cleaning up the readme and moving docs into readthedocs * examples at the end as per pr comments * async_cluster: fix max_connections/ssl & improve args (#2217) * async_cluster: fix max_connections/ssl & improve args - set proper connection_class if ssl = True - pass max_connections/connection_class to ClusterNode - recreate startup_nodes to properly initialize - pass parser_class to Connection instead of changing it in on_connect - only pass redis_connect_func if read_from_replicas = True - add connection_error_retry_attempts parameter - skip is_connected check in acquire_connection as it is already checked in send_packed_command BREAKING: - RedisCluster args except host & port are kw-only now - RedisCluster will no longer accept unknown arguments - RedisCluster will no longer accept url as an argument. Use RedisCluster.from_url - RedisCluster.require_full_coverage defaults to True - ClusterNode args except host, port, & server_type are kw-only now * async_cluster: remove kw-only requirement from client Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com> * fix review comments * fix * fix review comments * fix review comments Co-authored-by: Chayim <chayim@users.noreply.github.com> Co-authored-by: szumka <106675199+szumka@users.noreply.github.com> Co-authored-by: Mehdi ABAAKOUK <sileht@sileht.net> Co-authored-by: Tim Gates <tim.gates@iress.com> Co-authored-by: Utkarsh Gupta <utkarshgupta137@gmail.com> Co-authored-by: Nial Daly <34862917+nialdaly@users.noreply.github.com> Co-authored-by: pedrofrazao <603718+pedrofrazao@users.noreply.github.com> Co-authored-by: pedro.frazao <perl.pf@netcf.org> Co-authored-by: Антон Безденежных <gamer392@yandex.ru> Co-authored-by: Iglesys <g.imbert34@gmail.com> Co-authored-by: Gauthier Imbert <gauthier@PC17> Co-authored-by: Kristján Valur Jónsson <sweskman@gmail.com> Co-authored-by: DvirDukhan <dvir@redis.com>
* Graph - add counters for removed labels and properties (#2292)DvirDukhan2022-07-261-0/+24
| | | | | | | | | | | | | * grpah - add counters for removed labels and properties * added mock graph result set statistics * docstrings for graph result set statistics * format * isort * moved docstrings into functions
* Fix: `start_id` type for `XAUTOCLAIM` (#2257)Антон Безденежных2022-07-241-1/+1
| | | | | | | * Changed start_id type for xautoclaim * Added to changes Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
* Add support for TIMESERIES 1.8 (#2296)dvora-h2022-07-242-279/+407
| | | | | | | | | | | | | | | * Add support for timeseries 1.8 * fix info * linters * linters * fix info test * type hints * linters