summaryrefslogtreecommitdiff
path: root/redis/connection.py
Commit message (Collapse)AuthorAgeFilesLines
* move resonse string decoding from hiredis to pythonoptional-encodingAndy McCurdy2018-11-081-9/+15
|
* Use unicode literals throughout projectJon Dufresne2018-11-031-31/+17
| | | | Remove workaround for handling unicode with older Pythons.
* Use io package for BytesIOJon Dufresne2018-11-031-2/+3
| | | | Available on all supported Python versions.
* Pass iterator to tuple() without coercing to a listJon Dufresne2018-11-031-2/+2
|
* Remove from __future__ import with_statementJon Dufresne2018-11-031-1/+0
| | | | All supported Python versions support the with statement.
* Merge pull request #985 from mmaslowskicc/from-url-max-connectionsAndy McCurdy2018-11-021-1/+2
|\ | | | | Fix parsing max_connections URL query string parameter
| * Fix parsing max_connections URL query string parameterMichał Masłowski2018-05-231-1/+2
| | | | | | | | | | Previously ConnectionPool.from_url kept it as a string, causing a 'ValueError: "max_connections" must be a positive integer'.
* | Prefer https:// for URLs when availableJon Dufresne2018-11-011-3/+4
| |
* | pycodestyle fixes in clientRoey Prat2018-10-281-5/+5
|/
* Allow socket type to be configured in ConnectionAJ Ortega2017-11-071-2/+3
|
* add an Encoder object responsible for encoding/decoding bytes and stringsAndy McCurdy2017-08-021-39/+49
| | | | this simplifies multiple places that needs to encode and decode values
* added get_encoding() to ConnectionPoolAndy McCurdy2017-07-311-0/+10
|
* insert missing wordPeter van Dijk2016-11-151-2/+2
|
* Merge pull request #645 from cvrebert/redis-urlAndy McCurdy2016-09-061-3/+8
|\ | | | | Link to redis:// & rediss:// scheme IANA registrations in docs
| * Link to redis:// & rediss:// scheme IANA registrations in docsChris Rebert2015-08-131-3/+8
| |
* | Cache Token objects to improve performance.Chris Simpson2016-06-121-3/+21
| | | | | | | | | | | | | | | | The Token class now contains a cache of tokens, and each token stores its encoded value. In Python 3 this prevents encoding the Token commands (get, set, incr, etc...) repeatly. There is also a smaller performance improvement by creating fewer objects. A very basic benchmark script was also added.
* | Retry `select` calls on `InterruptedError`Carlton Gibson2016-06-101-2/+1
| | | | | | | | Ref #738
* | For Python < 3.5, automatically retry EINTRThomas Steinacher2016-05-241-4/+4
| |
* | PEP8 fixesTim Savage2016-03-291-5/+11
| |
* | Extend ConnectionPool.to_url to parse querystring arguments to correct type.Tim Savage2016-03-291-3/+30
| | | | | | | | | | Previously if a value for socket_timeout was supplied as part fo the URL an error would be raised when a socket was created with an invalid type, this change fixes that by parsing `socket_timeout`, `socket_connect_timeout` to float values. In addition the boolean values `socket_keepalive` and `retry_on_timeout` are parsed to bool types taking into account the usage of True/False, Yes/No strings.
* | raise TimeoutError if a socket.timeout is raised while connectingAndy McCurdy2015-11-091-0/+2
| | | | | | | | fixes #675
* | socket errors on windows contain more than 2 arguments.Andy McCurdy2015-11-021-3/+4
| | | | | | | | fixes #641
* | typoAndy McCurdy2015-11-021-2/+2
| |
* | ignore errors raised in SocketBuffer's close method. See #633.Andy McCurdy2015-11-021-2/+10
| |
* | cleanupAndy McCurdy2015-11-021-7/+2
| |
* | decreased length of exception class retrieving lineth13f2015-10-261-1/+4
| |
* | parsing 'max number of clients reached' as ConnectionErrorth13f2015-10-261-2/+9
| |
* | removed the proactive check in HiredisParser for a line endingAndy McCurdy2015-09-281-9/+0
|/ | | | | it turns out just calling into hiredis to test this is faster than doing string compare in Python. fixes #615 and #650.
* fix: Connection.encode complains when value is an object having unicode ↵Eric Du2015-05-041-1/+1
| | | | characters in its printable representation
* Handle percent-encoded URLs in parsing codePaul Keene2015-02-091-8/+24
|
* Merge branch 'pr/520'Andy McCurdy2014-08-151-2/+3
|\
| * pep8Andy McCurdy2014-08-151-1/+2
| |
| * add optional "timeout" parameter to pubsub.can_readAndy Isaacson2014-08-121-2/+2
| |
* | pep8Andy McCurdy2014-08-141-1/+2
| |
* | handle buffer edgecaseJosh Owen2014-08-131-1/+1
|/
* fix for pipelines when sending large valuesAndy McCurdy2014-07-281-3/+3
|
* bytearray didn't work with socket.recv_into in python 2.6Andy McCurdy2014-07-211-7/+6
|
* cleanup and optimizations to new bytearray codeAndy McCurdy2014-07-211-23/+25
|
* Merge branch 'master' into pr/505Andy McCurdy2014-07-211-10/+25
|\ | | | | | | | | Conflicts: redis/connection.py
| * check for the server closing a connection that's compatible with Python 3Andy McCurdy2014-07-061-2/+2
| | | | | | | | fixes #508
| * Consistent option names for encoding and encoding_errors. Fixes #510Andy McCurdy2014-07-031-0/+11
| |
| * better pack_commands algorithm with less string joiningAndy McCurdy2014-07-031-9/+13
| |
* | Added support for reusing a bytearray buffer when parsing with hiredis-py 0.1.4tzickel2014-06-271-9/+32
|/
* fix python3 compatAndy McCurdy2014-06-161-2/+2
|
* pack multiple commands in a pipeline into larger strings.Andy McCurdy2014-06-161-0/+16
| | | | fixes #495
* using repr() on a long value includes the trailing "L". use str() instead.Andy McCurdy2014-05-281-2/+4
| | | | fixes #484
* Don't retry commands that fail due to a socket.timeout by default.Andy McCurdy2014-05-271-3/+14
| | | | | | | | | | | | | | | | | | | | 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
* it's ok if max_connections is a long.Andy McCurdy2014-05-261-9/+5
|
* consistent naming, #446Andy McCurdy2014-05-141-12/+13
|
* added socket_connect_timeout and socket_keepalive options. fixed #353Andy McCurdy2014-05-131-11/+43
|