summaryrefslogtreecommitdiff
path: root/redis/asyncio
Commit message (Collapse)AuthorAgeFilesLines
* fix review commentscluster-fixesdvora-h2022-11-081-2/+2
|
* Merge branch 'master' into cluster-fixesChayim2022-11-082-2/+2
|\
| * fix docs for password protected socket access (#2378)Robert Hofer2022-11-072-2/+2
| | | | | | Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
* | Changed the default value of reinitialize_steps from 10 to 5Bar Shaul2022-11-021-1/+1
| |
* | Updating retry object for existing and new connectionsBar Shaul2022-11-023-1/+9
| |
* | Reverting deletion of connection_error_retry_attempts to maintain backward ↵Bar Shaul2022-11-021-0/+2
| | | | | | | | compatibility
* | Changed get_default_backoff to default_backoff, removed retry_on_error and ↵Bar Shaul2022-11-022-6/+8
| | | | | | | | connection_error_retry_attempts from RedisCluster, default retry changed to no retries
* | Fixed testBar Shaul2022-11-021-4/+4
| |
* | Added getter and setter for the client's retry object and added more testsBar Shaul2022-11-022-0/+14
| |
* | Type fixesBar Shaul2022-11-021-3/+3
| |
* | Fixed lintersBar Shaul2022-11-021-3/+3
| |
* | Cluster&AsyncCluster: Removed handling of timeouts/connection errors within ↵Bar Shaul2022-11-023-54/+48
|/ | | | the cluster loop, fixed "cannot pickle '_thread.lock' object" bug, added client's side failover handling improvements
* Remove the superflous SocketBuffer from asyncio PythonParser (#2418)Kristján Valur Jónsson2022-10-301-133/+37
| | | | | | | | | | | * Remove buffering from asyncio SocketBuffer and rely on on the underlying StreamReader * Skip the use of SocketBuffer in PythonParser * Remove SocketBuffer altogether * Code cleanup * Fix unittest mocking when SocketBuffer is gone
* fix: catch OSError on asyncio (#2412)송형근(Hyeongguen Song)/DnU2022-10-251-2/+2
|
* Simplify async timeouts and allowing `timeout=None` in ↵v4.4.0rc2Kristján Valur Jónsson2022-09-292-108/+52
| | | | | | | | | | | | | | | | | | | `PubSub.get_message()` to wait forever (#2295) * Avoid an extra "can_read" call and use timeout directly. * Remove low-level read timeouts from the Parser, now handled in the Connection * Allow pubsub.get_message(time=None) to block. * update Changes * increase test timeout for robustness * expand with statement to avoid invoking null context managers. remove nullcontext * Remove unused import
* Dev/no can read (#2360)Kristján Valur Jónsson2022-09-292-38/+35
| | | | | | | | * make can_read() destructive for simplicity, and rename the method. Remove timeout argument, always timeout immediately. * don't use can_read in pubsub * connection.connect() now has its own retry, don't need it inside a retry loop
* Add `nowait` flag to `asyncio.Connection.disconnect()` (#2356)Kristján Valur Jónsson2022-09-291-10/+11
| | | | | | | | | | | | | | * Don't wait for disconnect() when handling errors. This can result in other errors such as timeouts. * add CHANGES * Update redis/asyncio/connection.py Co-authored-by: Aarni Koskela <akx@iki.fi> * await a task to try to diagnose unittest failures in CI Co-authored-by: Aarni Koskela <akx@iki.fi>
* Catch `Exception` and not `BaseException` in the `Connection` (#2104)Kristján Valur Jónsson2022-09-291-5/+3
| | | | | | | * Add failing unittests for passing BaseException through * Resolve failing unittest * Remove redundant checks for asyncio.CancelledError
* Dev/no lock (#2308)Kristján Valur Jónsson2022-09-282-40/+3
| | | | | * Remove async lock in asyncio.Connection.read_response * Skip concurrent-commands test on non-pooled connections
* Handle auth errors for newer versions of Redis. (#2325) (#2329)Luca Cillario2022-08-301-0/+11
|
* Replace `ensure_future` with `create_task` (#2311)dvora-h2022-08-021-6/+6
| | | | | * Replace `ensure_future` with `create_task` * linters
* automatically reconnect pubsub when reading messages in blocking mode (#2281)Kristján Valur Jónsson2022-07-271-3/+9
| | | | | | | | | | | | | | | | * optimistic default info on test sessionstart. Makes test discovery work, even without a redis connection. * Add unittests verifying that (non-async) PubSub will automatically reconnect * Add tests for asyncio pubsub subsciription auto-reconnect * automatically connect for blocking reads (asyncio) * fix automatic connect on blocking pubsub read (non-async) * lint & format * Perform `connect()` call in PubSub code rather than `read_response`.
* Drop python 3.6 support (#2306)dvora-h2022-07-273-29/+12
|
* async_cluster: fix max_connections/ssl & improve args (#2217)Utkarsh Gupta2022-07-271-181/+196
| | | | | | | | | | | | | | | | | | | | | | * 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>
* async_cluster: fix concurrent pipeline (#2280)Utkarsh Gupta2022-07-241-9/+9
| | | - each pipeline should create separate stacks for each node
* fix: workaround asyncio bug on connection reset by peer (#2259)Mehdi ABAAKOUK2022-07-241-1/+10
| | | Fixes #2237
* fix is_connected (#2278)dvora-h2022-07-211-1/+1
|
* Use retry mechanism in async version of Connection objects (#2271)szumka2022-07-212-2/+12
|
* commands/cluster: use pipeline to execute split commands (#2230)Utkarsh Gupta2022-06-271-6/+11
| | | | | | - allow passing target_nodes to pipeline commands - move READ_COMMANDS to commands/cluster to avoid import cycle - add types to list_or_args
* Fix retries in async mode (#2180)Eric Lemoine2022-06-193-3/+39
| | | | | | | | | * Avoid mutating a global retry_on_error list * Make retries config consistent in sync and async * Fix async retries * Add new TestConnectionConstructorWithRetry tests
* async_cluster: fix simultaneous initialize (#2231)Utkarsh Gupta2022-06-191-2/+2
| | | - close startup_nodes too during client.close(), in case they are different
* Uppercase commands in CommandsParser.get_keys (#2236)Falk2022-06-191-2/+2
|
* async_cluster: improve docs (#2208)Utkarsh Gupta2022-06-021-36/+37
| | | | - move response_callbacks kwarg inside __init__ to hide it from docs - use :member-order: bysource to group similar commands together
* async_cluster: optimisations (#2205)Utkarsh Gupta2022-06-012-91/+97
| | | | | | | | | | - return true from execute_pipeline if there are any errors - use todo list to speedup retries - store initialisation node in CommandsParser object - add sync context manager for pipeline - use if/else instead of try/except - make command a function argument in _determine_nodes & _determine_slot - add async cluster pipeline benchmark script
* async_cluster: add pipeline support (#2199)Utkarsh Gupta2022-05-301-16/+312
| | | Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
* update black to 22.3.0 (#2171)Utkarsh Gupta2022-05-302-2/+2
|
* async_cluster: add/update typing (#2195)Utkarsh Gupta2022-05-303-82/+102
| | | | | | | * async_cluster: add/update typing * async_cluster: update cleanup_kwargs with kwargs from async Connection * async_cluster: properly remove old nodes
* set default response_callbacks to redis.asyncio.cluster.ClusterNode (#2201)rapidia2022-05-301-1/+1
| | | | | | | | | * set default response_callbacks to redis.asyncio.cluster.ClusterNode * add test case for ClusterNode class * fix lint error * merge test case into `test_startup_nodes`
* Add Async RedisCluster (#2099)Utkarsh Gupta2022-05-085-65/+1299
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Copy Cluster Client, Commands, Commands Parser, Tests for asyncio * Async Cluster Tests: Async/Await * Add Async RedisCluster * cluster: use ERRORS_ALLOW_RETRY from self.__class__ * async_cluster: rework redis_connection, initialize, & close - move redis_connection from NodesManager to ClusterNode & handle all related logic in ClusterNode class - use Locks while initializing or closing - in case of error, close connections instead of instantly reinitializing - create ResourceWarning instead of manually deleting client object - use asyncio.gather to run commands/initialize/close in parallel - inline single use functions - fix test_acl_log for py3.6 * async_cluster: add types * async_cluster: add docs * docs: update sphinx & add sphinx_autodoc_typehints * async_cluster: move TargetNodesT to cluster module * async_cluster/commands: inherit commands from sync class if possible * async_cluster: add benchmark script with aredis & aioredis-cluster * async_cluster: remove logging * async_cluster: inline functions * async_cluster: manage Connection instead of Redis Client * async_cluster/commands: optimize parser * async_cluster: use ensure_future & generators for gather * async_conn: optimize * async_cluster: optimize determine_slot * async_cluster: optimize determine_nodes * async_cluster/parser: optimize _get_moveable_keys * async_cluster: inlined check_slots_coverage * async_cluster: update docstrings * async_cluster: add concurrent test & use read_response/_update_moved_slots without lock Co-authored-by: Chayim <chayim@users.noreply.github.com>
* Replace OSError exceptions from `can_read` with `redis.ConnectionError` (#2140)Kristján Valur Jónsson2022-05-081-1/+7
| | | | | | | * Replace OSError exceptions from `can_read` with `redis.ConnectionError` * Fix formatting * Revert unintended formatting change
* Async Connection: Allow `PubSub.run()` without previous `subscribe()` (#2148)Kristján Valur Jónsson2022-05-021-3/+12
|
* Fix incorrect return annotation in asyncio.lock (#2155)Jelle Zijlstra2022-05-021-3/+3
| | | | | NoReturn should be used only when the function never returns. In this case, the awaitable returns None if releasing the lock succeeds, so `Awaitable[None]` is right. Noticed this while reviewing python/typeshed#7676
* Add async supoort for SEARCH commands (#2096)dvora-h2022-04-281-2/+2
| | | | | | | | | | | | | * Add async supoort for SEARCH commands * linters * linters * linters * linters * linters
* `Retry()`: Support negative `retries` value (#2110)Kristján Valur Jónsson2022-04-281-1/+2
| | | | | | | * Support negative `retries` value * Add unit test * Add unittest for blocking api
* Async tests for redis commands, json, bloom, timeseries (#2087)dvora-h2022-04-071-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | * test async commands * test async json commands * test async timeseries commands * test async bloom commands * linters * linters * skip on cluster * linters * linters * isort * flynt * remove print
* fix asynic/client.py's import (#2079)wwqgtxx2022-04-041-2/+2
| | | | | | | * fix asynic/client.py's import Lock and Retry should be from redis.asyncio * for code linters
* always clear reference to closed reader/writer (#2077)Bea Steers2022-04-041-2/+3
| | | | | * always clear reference to reader/writer * add #2065 to changes
* Fix disable decode for dump command on asyncio (#2070)Mason2022-04-041-1/+1
| | | Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
* Add support to use certificates from string in ssl connection (#2048)dvora-h2022-03-142-2/+13
| | | | | | | | | * ssl string cert * fix async test * linters * change test name
* redis_connect_func (#2046)Lazaros Toumanidis2022-03-141-0/+2
|