| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
| |
Co-authored-by: Chayim <chayim@users.noreply.github.com>
|
|
|
|
|
| |
* exclusive gt and lt in zadd
* docs update
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* zinter
* change options in _zaggregate
* skip for previous versions
* flake8
* validate the aggregate value
* invalid aggregation
* invalid aggregation
* change options to get
Co-authored-by: Chayim <chayim@users.noreply.github.com>
|
|
|
| |
Small typo in documentation
|
| |
|
| |
|
| |
|
|
|
|
| |
Co-authored-by: malinaa96 <52569986+malinaa96@users.noreply.github.com>
Co-authored-by: Avital Fine <79420960+AvitalFineRedis@users.noreply.github.com>
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* hrandfield
* use mapping in hset
* skip if version not fit
* remove empty line
* flake8 comments
* new line for each comment
|
| |
|
|
|
|
|
|
|
| |
* getex
* flake8 fix
* comments
|
| |
|
|
|
|
| |
command is always a list. If index 3 is not a list, assume Redis Enterprise and return index 4 instead
|
| |
|
|
|
| |
Add support for the ABSTTL option of the RESTORE command.
|
|
|
|
|
| |
Add optional exception handler to PubSubWorkerThread
Co-authored-by: Abhimanyu Deora <adeora@drwholdings.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During a call to `acquire()`, if the call is `blocking` and has a
`blocking_timeout` set, it uses `time.time()` calls to determine when to
give up attempting to acquire the lock.
However, since `time.time()` is marked as "adjustable", it is possible
for it to go backwards or forwards at a rate other than 1 second per
second, meaning the spinloop may exit earlier or later than expected.
By changing the implementation to use `time.monotonic()`, which is
guaranteed to never go backwards, and not be affected by system clock
updates, this potential problem is fixed.
For the same reason, some time dependent lock tests have also been
changed to use `time.monotonic()`.
|
|
|
|
|
| |
When modules are present, INFO's response will contain a `modules` key which will be a list of dicts describing each module.
Co-authored-by: jiekun.zhu <jiekun.zhu@shopee.com>
|
|
|
|
|
|
|
|
|
| |
`acl_log()` returns a list of dictionaries, each describing a log entry.
`acl_log_reset()` instructs the server to truncate the log.
Thanks @2014BDuck
Fixes #1307
|
| |
|
|
|
|
|
|
|
|
| |
Prior versions of redis-py supported this by specifying the
``decode_components`` flag to the ``from_url`` functions. This is now done by
default and cannot be disabled.
Fixes #589
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Fix a few broken links and class references, move a docstring, and fix a
code block.
|
|
|
|
|
| |
Added the LPOS command from Redis 6.0.6
Fixes #1353
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Support for loading, unloading and listing Redis Modules
* minor fixes for flake
* unit test for module list - only the empty use case
* ModuleError should inherit from ResponseError rather than RedisError
Co-authored-by: Vamsi Atluri <vamc19@gmail.com>
|
|
|
| |
Fix the docstring for acl_setuser() so that it refers to the correct parameter name,`passwords`.
|
|
|
|
|
|
|
| |
Prior to this, escaped slashes ("\\") were un-escaped. This caused the strings
"foo\x92" and "foo\\x92" to be represented the same way in the output.
Fixes #1349
|
| |
|
|
|
|
|
|
|
|
|
| |
Prevent the pool from closing sockets on connections that are actively in use
by other threads when the master address changes. Connections returned to the
pool that are still connected to the old master will be disconnected
gracefully.
Fixes #1345
|
|
|
| |
Update the cached master_address if the Sentinels promote a new master.
|
|
|
|
| |
Fixed #1339
|
| |
|
|
|
|
|
| |
The lock does not need to be held while waiting for the socket to
establish and validate the TCP connection.
|
| |
|
|
|
|
|
| |
Fixes #1337
Fixes #1341
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
flake8 catches a wider net of mistakes than pycodestyle and is more
commonly used by the larger community. For example, it catches unused
imports, a few of which existed. These have since been removed.
Two "noqa" comments were added. One ignores the _compat.py file as it
has a large amount of Python version specific code. The second is in
utils.py which intentionally does not use an import.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Python command line argument -b causes Python to emit a warning when
bytes and str usage is mixed. This is generally considered bad practice
as either one or the other is required. Enabling this feature during
tests helps catch them before reaching production.
The warning appeared as:
tests/test_scripting.py::TestScripting::test_eval_msgpack_pipeline_error_in_lua
.../redis-py/redis/client.py:3967: BytesWarning: str() on a bytes instance
cmd = ' '.join(imap(safe_unicode, command))
|
|
|
|
|
|
|
|
|
|
|
|
| |
Calling str() on a bytes object can result in a BytesWarning being
emitted and usually indicates a mixup between byte and string handling.
Now, in the event of an invalid RESP response, use the repr value of the
raw response in the exception message.
Can further simplify the bytes/str handling by comparing the first byte
as a bytes object instead of converting it to str. The bytes literal is
available on all supported Pythons. This removes the need for the
compatibility function, byte_to_chr().
|
|
|
|
| |
As Python 3 is the future of the language, when the docs need to make a
syntax choice, use the Python 3 version.
|
|
|
|
|
|
|
|
|
| |
Use the "as" keyword to capture the exception in a variable instead of
sys.exc_info().
Re-raise exception with the bare "raise" syntax.
Avoid "# noqa: E722" by catching BaseException, which includes all
exceptions including SystemExit.
|
| |
|