| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Use provided redis address. Bind to IPv4
* Add missing "await" and perform the correct test for pipe eimpty
* Wait for a send event, rather than rely on sleep time. Excpect cancel errors.
* set delay to 0 except for operation we want to cancel
This speeds up the unit tests considerably by eliminating unnecessary delay.
* Release resources in test
* Fix cluster test to use address_remap and multiple proxies.
* Use context manager to manage DelayProxy
* Mark failing pipeline tests
* lint
* Use a common "master_host" test fixture
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* add cluster "host_port_remap" feature for asyncio.RedisCluster
* Add a unittest for asyncio.RedisCluster
* Add host_port_remap to _sync_ RedisCluster
* add synchronous tests
* rename arg to `address_remap` and take and return an address tuple.
* Add class documentation
* Add CHANGES
|
|
|
|
|
|
|
|
|
| |
* add withscores to zrevrank
* change 0 -> 2
* fix errors
* split test
|
|
|
|
|
|
|
|
|
| |
* return response in case of KeyError
* fix code linters error
* fix linters 2
* fix linters 3
|
| |
|
|
|
|
|
| |
Co-authored-by: James R T <jamestiotio@gmail.com>
Co-authored-by: dvora-h <dvora.heller@redis.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
There's an issue in asyncio's timeout lib before 3.11.3 that causes
async calls to raise `CancelledError`.
This is a cpython issue that was fixed in this commit [1] and
cherry-picked to previous versions, meaning 3.11.3 will work correctly.
Check [2] for more info.
[1] https://github.com/python/cpython/commit/04adf2df395ded81922c71360a5d66b597471e49
[2] https://github.com/redis/redis-py/issues/2633
|
| |
|
|
|
|
|
|
|
| |
(#2582)
* Allow data to drain from PythonParser after connection close.
* Add Changes
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'_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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
| |
(#2568)
Co-authored-by: Viktor Ivanov <viktor@infogrid.io>
|
|
|
|
| |
Implement unlink() like delete() to make it work when
used in a cluster pipeline.
|
|
|
|
|
|
|
| |
* Add support to BF.CARD
* Add Async test
* change to with pytest.raises
|
|
|
| |
Co-authored-by: zach.lee <zach.lee@sendbird.com>
|
|
|
| |
Co-authored-by: zach.lee <zach.lee@sendbird.com>
|
|
|
|
|
|
|
| |
* Fixed string escape and added tests
* Add Change
* Name change
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
* add dialect to aggregate request
* added test
* format
* async test
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
* 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
|
|
|
|
|
|
|
| |
* Fix test json.arrindex
* linters
* linters
|
|
|
| |
Co-authored-by: Chayim <chayim@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
* add latency commands
* fix tests in cluster
|
|
|
|
| |
client (#2501)
|
| |
|
| |
|
|
|
| |
Co-authored-by: Chayim <chayim@users.noreply.github.com>
|
|
|
|
| |
(#2463)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Cluster&AsyncCluster: Removed handling of timeouts/connection errors within the cluster loop, fixed "cannot pickle '_thread.lock' object" bug, added client's side failover handling improvements
* Fixed linters
* Type fixes
* Added to CHANGES
* Added getter and setter for the client's retry object and added more tests
* Fixed linters
* Fixed test
* Fixed test_client_kill test
* Changed get_default_backoff to default_backoff, removed retry_on_error and connection_error_retry_attempts from RedisCluster, default retry changed to no retries
* Fixing linters
* Reverting deletion of connection_error_retry_attempts to maintain backward compatibility
* Updating retry object for existing and new connections
* Changed the default value of reinitialize_steps from 10 to 5
* fix review comments
Co-authored-by: Chayim <chayim@users.noreply.github.com>
Co-authored-by: dvora-h <dvora.heller@redis.com>
Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* A CredentialsProvider class has been added to allow the user to add his own provider for password rotation
* Moved CredentialsProvider to a separate file, added type hints
* Changed username and password to properties
* Added: StaticCredentialProvider, examples, tests
Changed: CredentialsProvider to CredentialProvider
Fixed: calling AUTH only with password
* Changed private members' prefix to __
* fixed linters
* fixed auth test
* fixed credential test
* Raise an error if username or password are passed along with credential_provider
* fixing linters
* fixing test
* Changed dundered to single per side underscore
* Changed Connection class members username and password to properties to enable backward compatibility with changing the members value on existing connection.
* Reverting last commit and adding backward compatibility to 'username' and 'password' inside on_connect function
* Refactored CredentialProvider class
* Fixing tuple type to Tuple
* Fixing optional string members in UsernamePasswordCredentialProvider
* Fixed credential test
* Added credential provider support to AsyncRedis
* linters
* linters
* linters
* linters - black
Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
Co-authored-by: dvora-h <dvora.heller@redis.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix special response parsing options handling
When using special response parsing options like `NEVER_DECODE` and
`EMPTY_RESPONSE`, don't pass them to the response callbacks because some
of them are not prepared for receiving named arguments.
Instead, redis-py should use them before calling the callbacks and
then discard them.
* Use kwargs instead of options
* change options to kwargs in asyncio/cluster.py/L878
Co-authored-by: Chayim <chayim@users.noreply.github.com>
Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
|
|
|
| |
Co-authored-by: Chayim <chayim@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
| |
(#2439)
* Fix KeyError in async cluster
* link to issue
* typo
|
|
|
|
|
|
|
|
|
| |
* Test `test_get_moveable_keys` was broken
* Update test_command_parser.py
* Do not sort constant lists
Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
* deprecate add_doccuments
* linters
* linters
* async tests
|
|
|
|
|
| |
* Fix timeseries tests (round floats)
* fix json tests
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`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
|