| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
|
|\ \
| | |
| | | |
Use IPPROTO_TCP constant instead of SOL_TCP constant
|
| |/ |
|
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| | |
Hiredisparser and Connection — do not close socket on disconnect.
Resolves #1085
|
| |
| |
| |
| |
| | |
Fixes #969
Fixes #961
|
|\ \
| | |
| | | |
Add support for SNI connection to Redis-py
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| |_|/
|/| | |
Fix ConnectionPool repr when using default values
|
| | | |
|
| |/
|/|
| |
| |
| |
| | |
Both Python 2.7 & Python 3 have the types bytes. On Python 2.7, it is an
alias for the type str, same as what was previously defined in
_compat.py.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Without this using `unix_socket_path` will fail:
AttributeError: 'UnixDomainSocketConnection' object has no attribute '_buffer_cutoff'
Fixes #1067
|
|\ \
| | |
| | | |
Enforce ssl_cert_reqs='required' by default
|
| |/ |
|
|\ \
| | |
| | | |
Improve performence of transactions / pipeline requests which involve large chunks of data.
|
| | |
| | |
| | |
| | | |
chunks of data.
|
| | |
| | |
| | |
| | |
| | | |
on python2.7, repr() on a long produces '123L', which is clearly not what
we want
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
All input sent to Redis is coerced into bytes. This includes key names and
values. Prior to this change, redis-py made an effort to cooerce all input
into strings by calling str() (Python 3) or unicode() (Python 2). While this
works for a handful of types like ints, longs and floats, it fails for other
types like bools ('True' or 'False'), None ('None') and many user defined
types.
Starting with redis-py version 3.0, sending input of any other type is
considered an error an a DataError exception will be raised.
Fixes #471
Fixes #472
Fixes #321
Fixes #190
|
| | |
| | |
| | |
| | | |
Remove workaround for handling unicode with older Pythons.
|
| | |
| | |
| | |
| | | |
Available on all supported Python versions.
|
| | | |
|
|/ /
| |
| |
| | |
All supported Python versions support the with statement.
|
|\ \
| | |
| | | |
Fix parsing max_connections URL query string parameter
|
| |/
| |
| |
| |
| | |
Previously ConnectionPool.from_url kept it as a string, causing a 'ValueError:
"max_connections" must be a positive integer'.
|
| | |
|
|/ |
|
| |
|
|
|
|
| |
this simplifies multiple places that needs to encode and decode values
|
| |
|
| |
|
|\
| |
| | |
Link to redis:// & rediss:// scheme IANA registrations in docs
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
Ref #738
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
fixes #675
|
| |
| |
| |
| | |
fixes #641
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
| |
it turns out just calling into hiredis to test this is faster than
doing string compare in Python. fixes #615 and #650.
|
|
|
|
| |
characters in its printable representation
|