summaryrefslogtreecommitdiff
path: root/redis/connection.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Fixed Python 3.2+ compatibilityAlex Grönholm2012-08-071-23/+36
|
* Cleaned up code for PEP 8 complianceAlex Grönholm2012-08-061-10/+16
|
* Merge remote-tracking branch 'encoding/2.4.11-fix' into encodingandy2012-06-101-10/+25
|\ | | | | | | | | Conflicts: redis/connection.py
| * Have PythonParser handle result encoding similarly to hiredis.Reader.Frankie Dintino2012-02-081-5/+11
| | | | | | | | | | If the connection encoding is set to utf-8, pass the socket read results through decode()
| * Pass the connection encoding to hiredis.ReaderFrankie Dintino2012-02-081-1/+2
| | | | | | | | | | | | HiredisParser was not previously passing the character encoding to the hiredis.Reader constructor from redis.connection.Connection (the default there is 'utf-8').
* | Made redis-py work with IronPythonGil Tayar2012-05-161-1/+1
| | | | | | | | | | Open socket connection with mode='rb' instead of 'r'. From Python documentation: ...when opening a binary file, you should append 'b' to the mode value to open the file in binary mode, which will improve portability. (Appending 'b' is useful even on systems that don’t treat binary and text files differently, where it serves as documentation.)
* | Fix re-used connection errors after fork().Josiah Carlson2012-04-111-2/+14
|/
* Raise an authentication error if an invalid password is suppliedandy2011-11-071-2/+3
|
* HiredisParser raises a RedisError if Hiredis is unavailableandy2011-11-071-4/+19
|
* pep8andy2011-10-251-1/+0
|
* should .close() the bufferandy2011-10-241-7/+10
|
* Limit the maximum bytes read from the PythonParser. Fix for #205.andy2011-10-241-2/+24
|
* Added __del__ methods for classes that hold on to resources that need to be ↵andy2011-10-141-1/+20
| | | | cleaned up. This should prevent resource leakage when these objects leave scope due to misuse or unhandled exceptions.
* Raise ConnectionError if the reader has been closed under us. ThisOvidiu Predescu2011-08-301-0/+2
| | | | | happens if someone calls the disconnect method. This matches the same behavior as in PythonParser.
* Ensure connections get disconnected if there's a protocol errorandy2011-07-221-3/+9
|
* Removed socket retry logic in Connection. This is the responsbility of the ↵andy2011-07-221-13/+2
| | | | caller to determine if the command is safe and can be retried.
* Fix for #153, can only reliably check the last byte of the responseAndy McCurdy2011-07-101-3/+3
|
* fix for PythonParser when reading empty stringsAndy McCurdy2011-06-101-1/+1
|
* fix a typo introduced in last commit. thanks Ask Solem for finding.Andy McCurdy2011-06-071-1/+1
|
* fix UnixDomainSocketConnection to report error messages based on it's ↵Andy McCurdy2011-06-071-9/+23
| | | | attributes rather than the TCP socket attributes. fixes #140
* make sure the class instance always has an ._fp attribute in case disconnect ↵Andy McCurdy2011-06-011-3/+6
| | | | gets called before connect
* ConnectionPool's get_connection() now can take optional kwargsAndy McCurdy2011-05-251-1/+1
|
* new pubsub testsAndy McCurdy2011-05-231-1/+1
|
* more error checking for socket errorsAndy McCurdy2011-05-221-5/+7
|
* connection pool is now a real pool. we no longer rely on threading.local for ↵Andy McCurdy2011-05-171-24/+30
| | | | anything in redis-py. yaa!
* all tests pass now except pub/sub. connection_pool's get_connection now ↵Andy McCurdy2011-05-171-2/+11
| | | | always received the command name for the next command. still need to pass keys.
* all tests passing with new connection poolAndy McCurdy2011-05-161-25/+53
|
* make a formal hook so other types of connections don't have to repeat the ↵Andy McCurdy2011-05-121-4/+4
| | | | same connection setup logic
* connection class completely refactored. encoding and command packing moved ↵Andy McCurdy2011-05-121-113/+148
| | | | from client to connection. introduced concept of protocol parsers and implemented both a PythonParse and a hiredis parser. the parser class can be overridden in the __init__ of the connection if desired.
* Added socket disconnection if commands are rejected due to AOF/RDB load.Benjamin Anderson2011-04-221-0/+5
| | | | SELECT commands are issued only on initial socket connection. If a user issues a command during an AOF/RDB load, the socket connection will be successfully opened, but the SELECT command will be lost. If subsequent commands are sent after the AOF/RDB load is completed, the SELECT command will not be retried (due to the open socket), and those commands will go to the wrong DB. This behavior appears to be present in hiredis as well as redis-py. Fixing it here by special casing the AOF/RDB load message and closing the socket connection before raising ResponseError.
* Use IPPROTO_TCP instead of SOL_TCPAdam Vandenberg2011-03-271-6/+1
| | | | | The constant value is the same, 6, but the former works in Jython as well as CPython.
* Jython doesn't define socket.SOL_TCP, but seems to work by using ↵Andy McCurdy2011-03-271-1/+7
| | | | socket.SOL_TCP's constant value, 6. Fix for #97
* Fix for #103, handling socket errors betterAndy McCurdy2011-03-141-2/+2
|
* allow the user to choose a connection class via the ConnectionPoolAndy McCurdy2011-02-081-22/+22
|
* Integer replies may be of type longPieter Noordhuis2011-01-301-1/+1
|
* Use hiredis for protocol parsing when availablePieter Noordhuis2011-01-301-1/+36
|
* Move Connection and ConnectionPool to different filePieter Noordhuis2011-01-301-0/+157