summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | Merged the error process of "reading socket error" in two Parser class and ↵vic0202019-04-111-36/+31
|/ / / | | | | | | | | | | | | | | | | | | | | | added "host":"port" to Exception message for easy debug Change-Id: Ifaa3bef0c8daf3dd2c60b143746b75a26c182a88
* | | Merge pull request #1156 from horizon365/masterAndy McCurdy2019-03-251-1/+1
|\ \ \ | | | | | | | | miss positional argument in README example
| * | | miss positional argument: 'message'horizon3652019-03-251-1/+1
|/ / / | | | | | | raise TypeError.
* | | make sure the selector is instantiated prior to cleaning it upAndy McCurdy2019-03-182-2/+6
| | |
* | | Merge pull request #1153 from bmerry/unregister-ready-pollerAndy McCurdy2019-03-182-1/+3
|\ \ \ | |_|/ |/| | Unregister socket from ready_poller
| * | Close the selector on disconnectBruce Merry2019-03-181-0/+2
| | |
| * | Unregister socket from ready_pollerBruce Merry2019-03-181-1/+1
|/ / | | | | | | | | It looks like there was a typo in PollSelector.close that made it unregister from the read_poller twice instead of once from each poller.
* | 3.2.13.2.1Andy McCurdy2019-03-152-1/+3
| |
* | remove unneccessary checkpid from SentinelConnectionPoolsentinel_pool_fixAndy McCurdy2019-03-141-12/+0
|/
* actual 3.2.03.2.0Andy McCurdy2019-02-171-1/+1
|
* 3.2.0Andy McCurdy2019-02-171-1/+14
|
* test all selectors via pytest parameterizationhealty_connectionsAndy McCurdy2019-02-113-68/+151
|
* python2 compatAndy McCurdy2019-02-041-1/+1
|
* attempt to provide only healthy connections from the poolAndy McCurdy2019-02-044-21/+295
| | | | | | | | | | | | | | | | | | | | | | | | | | | Adds redis.selector, a module that provides the best selector strategy available on the current platform. A redis.selector polls a socket to provide two pieces of functionality: 1. Check whether data can be read from the socket. Prior versions of redis-py provided this behavior with just select.select(). select() has lots of limitations, most notably a limit of ~1024 file descriptors. Now that better selectors are available, this should make can_read() faster and able to accomodate more clients. See #1115 and #486 2. Check whether a socket is ready for a command to be sent. This doubles as a health check. It ensures that the socket is available for writing, has no data to read and has no known errors. Anytime a socket is disconnected or hung up, data is available to be read, typically zero bytes. ConnectionPool.get_connection has been modified to ensure that connections it returns are connected and are ready for a command to be sent. If get_connection encounters a case where a socket isn't ready for a command the connection is reconnected and checked again. TODO: more tests for this stuff. implement EPoll and KQueue selectors. Fixes #1115 Fixes #486
* Merge pull request #1129 from Chronial/feature/fix-exceptAndy McCurdy2019-02-011-4/+4
|\ | | | | Do not leave connections in invalid state
| * Do not leave connections in invalid stateChronial2019-01-301-4/+4
| |
* | Merge pull request #1130 from Junnplus/socket-patchAndy McCurdy2019-02-011-1/+1
|\ \ | | | | | | Use IPPROTO_TCP constant instead of SOL_TCP constant
| * | use IPPROTO_TCP constant instead of SOL_TCP constantjunnplus2019-01-311-1/+1
| |/
* | Merge pull request #1131 from Junnplus/fix-typoAndy McCurdy2019-02-011-1/+1
|\ \ | | | | | | Fix github pull template typo
| * | fix typojunnplus2019-01-311-1/+1
| |/
* | readd the connection destructorAndy McCurdy2019-02-011-0/+6
| | | | | | | | | | | | Since Connection.disconnect() now verifies that the current process owns the connection before shutting the socket down we can safely readd the destructor just to make sure things are really cleaned up
* | changelogAndy McCurdy2019-01-311-1/+1
| |
* | changelogAndy McCurdy2019-01-311-0/+7
| |
* | Merge branch 'pythonparser'Andy McCurdy2019-01-312-11/+159
|\ \
| * | Improve how connection pools operate in forked/child proceeses.Andy McCurdy2019-01-312-29/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes a process with an active connection to Redis forks and creates child processes taht also want to talk to Redis. Prior to this change there were a number of potential conflicts that could cause this to fail. Retrieving a connection from the pool and releasing a connection back to the pool check the current proceeses PID. If it's different than the PID that created the pool, reset() is called to get a fresh set of connections for the current process. However in doing so, pool.disconnect() was caused which closes the file descriptors that the parent may still be using. Further when the available_connections and in_use_connections lists are reset, all of those connections inherited from the parent are GC'd and the connection's `__del__` was called, which also closed the socket and file descriptor. This change prevents pool.disconnect() from being called when a pid is changed. It also removes the `__del__` destructor from connections. Neither of these are necessary or practical. Child processes still reset() their copy of the pool when first accessed causing their own connections to be created. `ConnectionPool.disconnect()` now checks the current process ID so that a child or parent can't disconnect the other's connections. Additionally, `Connection.disconnect()` now checks the current process ID and only calls `socket.shutdown()` if `disconnect()` is called by the same process that created the connection. This allows for a child process that inherited a connection to call `Connection.disconnect()` and not shutdown the parent's copy of the socket. Fixes #863 Fixes #784 Fixes #732 Fixes #1085 Fixes #504
| * | Merge branch 'pr/1108' into pythonparserAndy McCurdy2019-01-282-3/+131
| |\ \ | | |/ | |/|
| | * Make PythonParser's on_disconnect consistent withAlexey Popravka2019-01-031-3/+1
| | | | | | | | | | | | | | | Hiredisparser and Connection — do not close socket on disconnect. Resolves #1085
| | * update test to expect errorsAlexey Popravka2019-01-031-5/+8
| | |
| | * Add failing tests to show difference between protocol parsers on_disconnectAlexey Popravka2019-01-031-0/+127
| | | | | | | | | | | | | | | | | | | | | implementation/behavior (related to #1085). When hiredis is installed and HiredisParser is used (implicitly), connection can not be securily shared between process forks.
* | | 3.1.03.1.0Andy McCurdy2019-01-282-2/+2
|/ /
* | Merge pull request #972 from lamby/dont-assume-64-bit-server-in-testsAndy McCurdy2019-01-272-8/+20
|\ \ | | | | | | Skip 64-bit specific tests. (Closes: #899)
| * | Skip 64-bit specific tests. (Closes: #899)Chris Lamb2018-11-162-8/+20
| | | | | | | | | | | | Signed-off-by: Chris Lamb <lamby@debian.org>
* | | Connection URLs must have a valid scheme.Andy McCurdy2019-01-273-2/+12
| | | | | | | | | | | | | | | Fixes #969 Fixes #961
* | | the fix to TimeoutErrors had a side affect on test teardownsAndy McCurdy2019-01-272-3/+8
| | |
* | | changelogAndy McCurdy2019-01-271-0/+2
| | |
* | | Merge pull request #1023 from ycraaron/1022-fix-retry-logicAndy McCurdy2019-01-271-2/+4
|\ \ \ | | | | | | | | 1022: Fix retry logic for StricRedis and PubSub
| * | | put not outside of the parenthesesAaron Yang2018-09-021-2/+2
| | | |
| * | | fix retry for PubSubAaron Yang2018-08-231-1/+2
| | | |
| * | | pep8Aaron Yang2018-08-231-1/+2
| | | |
| * | | fix retry logic for StricRedisAaron Yang2018-08-231-1/+1
| | | |
* | | | changelogAndy McCurdy2019-01-271-0/+3
| | | |
* | | | Merge pull request #1087 from oridistor/ssl_sniAndy McCurdy2019-01-271-5/+18
|\ \ \ \ | | | | | | | | | | Add support for SNI connection to Redis-py
| * \ \ \ Merge pull request #1 from RoeyPrat/roey-pycodestyle_oridistororidistor2018-11-271-4/+5
| |\ \ \ \ | | | | | | | | | | | | pycodestyle fixes to connection.py
| | * | | | pycodestyle fixes to connection.pyRoey Prat2018-11-271-4/+5
| |/ / / /
| * | | | Made sure SSL SNI will not affect using redis-py in versions older than 2.7.9Ori Markovitch2018-11-261-9/+17
| | | | |
| * | | | Add SSL SNI supportDanni Moiseyev2018-11-261-5/+9
| | | | |
* | | | | Merge pull request #1043 from Siecje/reprAndy McCurdy2019-01-271-1/+1
|\ \ \ \ \ | | | | | | | | | | | | Fix ConnectionPool repr when using default values
| * | | | | Fix ConnectionPool repr when using default valuesCody Scot2018-10-261-1/+1
| | | | | |
* | | | | | Added a test for #1126Andy McCurdy2019-01-273-4/+6
| | | | | |
* | | | | | Merge pull request #1126 from guybe7/geohash_fixAndy McCurdy2019-01-271-1/+7
|\ \ \ \ \ \ | | | | | | | | | | | | | | GEOHASH response may contain None elements