summaryrefslogtreecommitdiff
path: root/redis/exceptions.py
Commit message (Collapse)AuthorAgeFilesLines
* OCSP stapling support (#1820)Chayim2021-12-261-0/+4
|
* Added black and isort (#1734)Anas2021-11-301-2/+11
|
* Adding RedisCluster client to support Redis Cluster Mode (#1660)Bar Shaul2021-11-251-0/+102
| | | | Co-authored-by: Chayim <chayim@users.noreply.github.com> Co-authored-by: Anas <anas.el.amraoui@live.com>
* fix typo (#1367)Roey Prat2020-07-131-1/+1
|
* Support for loading, unloading and listing Redis Modules (#1360)Roey Prat2020-07-131-0/+4
| | | | | | | | | | | * 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>
* Provide AUTH fallback support for connection URLs with a username componentAndy McCurdy2020-01-311-0/+8
| | | | | | | | | | | | | Prior to ACL support, redis-py ignored the username component of Connection URLs. With ACL support, usernames are no longer ignored and are used to authenticate against an ACL rule. Some cloud vendors with managed Redis instances (like Heroku) provide connection URLs with a username component pre-ACL that is not intended to be used. Sending that username to Redis servers < 6.0.0 results in an error. Attempt to detect this condition and retry the AUTH command with only the password such that authentication continues to work for these users. Fixes #1274
* better thread-safety for ConnectionPool (#1270)Andy McCurdy2020-01-301-0/+5
| | | Better thread and fork safety for ConnectionPool and BlockingConnectionPool
* Added support for ACL commandsAndy McCurdy2019-12-281-0/+4
|
* All authentication-related errors now raise AuthenticationErrorAndy McCurdy2019-06-031-3/+3
| | | | | | | AuthenticationError is now a subclass of ConnectionError, which means the connection will be shut down and cleaned up. Fixes #923
* rename new LockErrorNotOwned to LockNotOwnedErrorAndy McCurdy2018-12-031-2/+2
|
* Extend lock error for not owned special caseJoshua Harlow2018-12-031-0/+5
| | | | | | | | Using the locking routines, it is useful to be able to distingush a generic lock error from a one that is related to the lock not being owned anymore (without doing string checks); this allows say a lock extension thread to attempt to re-acquire the lock in this case (vs just dying).
* Use unicode literals throughout projectJon Dufresne2018-11-031-11/+0
| | | | Remove workaround for handling unicode with older Pythons.
* updated Lock class:Andy McCurdy2014-06-011-1/+4
| | | | | * now uses unique string tokens to claim lock ownership * added extend() method to extend the timeout on an already acquired lock
* move Lock class to it's own moduleAndy McCurdy2014-05-311-0/+4
|
* Don't retry commands that fail due to a socket.timeout by default.Andy McCurdy2014-05-271-3/+3
| | | | | | | | | | | | | | | | | | | | Users now have the ability about how socket.timeout errors are handled. Previously socket.timeout errors were handled just like any other socket error in that the command would be retried once. This createed a potential race condition when the client sends a command to a busy Redis server that can't reply faster than the client's `socket_timeout` option. In this case, the server will still eventually process the command. There's now a `retry_on_timeout` option that's set to False by default. If `retry_on_timeout` is False, any socket.timeout error will raise a TimeoutError exception. If `retry_on_timeout` is set to True, the client will retry executing the command once just like other socket.error exceptions. TODO: Write better tests for this code. TODO: Much of this logic could/should be moved to the ConnectionPool or Connection objects. Fixes #261
* SentinelManagedConnections to master servers disconnect on READONLY errors.Andy McCurdy2014-05-061-0/+4
| | | | | Any attempt to reconnect will force all connections in that pool to update their connections to the new master. Fixes #435
* Add extra info to exceptions raised in pipelines. Fixes #407Andy McCurdy2013-12-081-0/+11
| | | | | | | | | ResponseErrors generated by commands executed in a pipeline now includes the command position in the pipeline and the actual command sent to the Redis server. For example: Command # 3 (LPUSH c 3) of pipeline caused error: <actual error message from Redis server>
* BusyLoadingError should inherit ConnectionError.Yossi Gottlieb2013-06-041-1/+1
|
* Add BusyLoadingError exception to differentiate -LOADING errors from connect ↵Yossi Gottlieb2013-06-041-0/+4
| | | | errors.
* Format code per pep8 guidelinesPaul Belanger2013-03-301-0/+6
| | | | | | A simple patch to enable pep8 in tox and format our code properly. Signed-off-by: Paul Belanger <paul.belanger@polybeacon.com>
* Merge branch 'master' of git://github.com/mattrobenolt/redis-py into ↵andy2013-03-281-5/+5
|\ | | | | | | | | | | | | mattrobenolt-master Conflicts: redis/exceptions.py
| * A base class for server-side exceptions to be grouped byMatt Robenolt2013-03-271-3/+6
| | | | | | | | | | | | | | This is important if you want to detect if there was an issue that resulted from the server being broken specifically, as opposed to the client issuing a bad command. See: https://github.com/disqus/nydus/pull/31 Also, let me know if there are other exceptions that could extend the base `ServerError`. These are just the two that stood out.
* | always raise parse error exceptions in multi/exec pipelines as a result of thisandy2012-11-161-0/+3
| | | | | | | | server change: https://groups.google.com/forum/?hl=en&fromgroups=#!topic/redis-db/VUiEFT8U8U0
* | implementing LUA scripting, still need tests.andy2012-08-231-0/+3
| |
* | Cleaned up code for PEP 8 complianceAlex Grönholm2012-08-061-1/+8
|/
* add PubSubError to better report disallowed command when using pub/subDan Colish2011-03-141-0/+4
|
* Raise DataError on empty hmset mappings, remove InvalidDataDan Colish2011-03-141-1/+1
|
* Add WATCH command to redis-pyCraig Hawco2010-09-031-6/+8
|
* new client passes all command tests, still need tests for connection pool ↵andymccurdy2010-02-151-5/+20
| | | | and pipelining.
* helps to actually include the new fileandy2010-01-131-0/+5