| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| | |
Implement RetryingClient
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
These changes allow us to rely on tox when we execute our linters on CI.
They centralize the way we define our jobs and targets to use them
in standardized way locally and during CI pipelines.
With these changes we are sure to execute the same commands everywhere.
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
During network maintenance operations or during server reboot users could
face MemcacheUnexpectedCloseError.
This kind of exception will be raised down the stack. It's a design
choice [1]. Users should manage this kind of exception.
However, at some points the opened sockets remains more or less opened
after this kind of fail on the client side [2]. It will require n+1
calls to see them recreated when the connection will be possible. That's
could be problem with services that implement several cache logics in parallel
and where their clients are based on pymemcache.
These changes simply ensure to close the socket properly. The socket
will be recreated by the client if needed.
[1] https://github.com/pinterest/pymemcache/issues/307
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1977711
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
The _store_cmd method became a bit to complexe and the linter complains
when we add new conditions or try/except clause.
These changes outsource some some processsing to reduce the complexity
of the method.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
I think the value provided by codespell is low and not worth the CPU
cycles to run it on ever change.
Also, the flake8 complexity check isn't particularly helpful (in my
opinion).
|
| | |
|
| |
| |
| | |
Closes #330
|
|/
|
|
|
|
|
| |
9551dfd0 introduced a call to socket.getaddrinfo() to support IPv6, but
we never added an implementation of that function to MockSocketModule.
This resulted in some tests making "live" socket.getaddrinfo() calls
because of the default MockSocketModule.__getattr__ implementation
(which we need to forward other module attribute lookups).
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
The Memcached server can be configured to drop idle connections (via the
idle_timeout option). When this occurs, pymemcache may still try to
use the connection, resulting in MemcacheUnexpectedCloseError. Hence
the need for client-side idle timeout logic.
|
|\
| |
| | |
Use client.set_many in HashClient.
|
|/ |
|
|\ |
|
|/ |
|
|\ |
|
|/
|
|
|
|
|
| |
Overlooked when UNIX socket support was added to `HashClient` in
acd962b586a4fe018a00acb7e1621be373c13c3b.
Fixes #314.
|
| |
|
|
|
| |
According to the Memcached Protocol, the no argument form of the stats command should have no trailing spaces. Currently, b'stats \r\n' instead of b'stats\r\n' is being sent to the socket which leads to a malformed response.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
_check_cas() does a good job of normalizing a CAS value and raising
MemcacheIllegalInputError when fed an invalid value. We were only using
this function in the `cas is not None` path within _store_cmd().
By moving this check into cas() itself, it allows us to also raise
MemcacheIllegalInputError when `cas is None`, which can happen when this
pattern is used for a new key:
val, cas = c.gets('key')
c.cas('key', 'value', cas)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GitHub Actions appears to be busted with regard to IPv6-based localhost
resolution between containers. This prevents us from successfully
connecting to our memcached service containers.
We can't resolve this by using `--server` (and `--tls-server`) to
explicitly specify 127.0.0.1 to force IPv4, but that unfortunately
breaks TLS certification verification because that expects 'localhost'.
We should come up with a better solution for this, but for the short
term, this unblocks the failing CI builds.
|
|
|
|
|
| |
IPv6 may be used in preference to IPv4 when passing a domain name as the
host if an IPv6 address can be resolved for that domain.
|
|
|
|
|
| |
- https://pythoninsider.blogspot.com/2020/10/python-35-is-no-longer-supported.html
- https://pythoninsider.blogspot.com/2020/10/python-390-is-now-available-and-you-can.html
|
| |
|
| |
|
|\
| |
| | |
Removed print() in test.
|
|/ |
|
|\ |
|
|/
|
|
| |
Fixes #257.
|
|\ |
|
| | |
|
| | |
|
|/ |
|
|\ |
|
| | |
|
| | |
|
| | |
|
| | |
|