summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Actually bump the release to 3.5.2v3.5.2v3.xJon Parise2022-04-011-1/+1
|
* Prepare the 3.5.2 releaseJon Parise2022-04-011-0/+4
|
* Handle a blank stat value (#388)liquidpele2022-04-012-1/+6
| | | | | | | | | | | | | | | | | | | | | | | A stat with a blank value makes the .stats() call fail with index error. ``` memcache_connection.stats() File "/lib/python3.6/site-packages/pymemcache/client/base.py", line 741, in stats result = self._fetch_cmd(b'stats', args, False) File "/lib/python3.6/site-packages/pymemcache/client/base.py", line 921, in _fetch_cmd result[key_value[1]] = key_value[2] IndexError: list index out of range ``` The line in question we saw that caused this: ``` b'STAT ep_initfile ' ``` This fixes things to no longer blow up. I chose to use a blank binary string instead of None because I suspect other code might make assumptions about the data being binary strings due to this bug. Co-authored-by: reecepeg <reecepeg@amazon.com>
* Prepare the 3.5.1 releasev3.5.1Jon Parise2022-02-202-3/+4
|
* Support noreply for hash flush_allJoe Gordon2022-02-202-2/+6
| | | | | | | The regular client supports noreply so pass args, kwargs like for other functions in hash client Fixes issue #360
* Return default from hash client when using positional argument (#354)Ludwig Hähne2022-02-203-5/+22
| | | | | | | | | | | | When using HashClient with ignore_exc, get would always return None if no server is available and the default is passed as a positional argument. The other clients return the default value in this case. An earlier fix only had the desired effect when passing default as a keyword argument. For example, Django passes the default as a positional argument. Return the default value so HashClient behaves like the other clients.
* Return default from hash client (#352)Ludwig H2022-02-202-1/+4
|
* Use default for get ignore_excJoe Gordon2022-02-202-1/+11
| | | | | | | ignore_exc should treat an error as a cache miss and default specifies what should be returned on a miss. Fixes issue #350
* docs: Fix a few typos (#348)Tim Gates2022-02-203-8/+8
|
* Update README.rst - (broken link) (#347)juandoleal2022-02-201-1/+1
|
* Update link to my GitHub profile.Nick Pope2022-02-201-1/+1
|
* Fix typo in doc (#342)Hervé Beraud2022-02-201-1/+1
|
* Prepare the v3.5.0 release (#341)v3.5.0Hervé Beraud2021-07-132-1/+7
|
* Merge pull request #324 from martinnj/feature/retrying-clientCharles Gordon2021-07-124-0/+530
|\ | | | | Implement RetryingClient
| * Add RetryingClient. Fixes #307Martin Jørgensen2021-07-134-0/+530
| |
* | [py27] Fixing a bug with bad conditions (#337)Hervé Beraud2021-07-062-2/+42
| |
* | adding code coverage (#336)Hervé Beraud2021-07-061-0/+4
| |
* | Configure the socket keepalive from various clients (#338)Hervé Beraud2021-07-052-0/+5
| |
* | Allow us to import the KeepalivOpts from the root pymemcache namespace (#340)Hervé Beraud2021-07-051-0/+1
| |
* | Fix doc rendering (#339)Hervé Beraud2021-07-051-14/+10
| |
* | Rely on tox for CI linter (#334)Hervé Beraud2021-07-032-13/+12
| | | | | | | | | | | | | | | | 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.
* | Merge pull request #333 from 4383/force-closing-socketJon Parise2021-07-012-12/+46
|\ \
| * | Ensure us to close socket on MemcacheUnexpectedCloseErrorHervé Beraud2021-07-012-4/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Reduce method complexity to pass linter testsHervé Beraud2021-07-011-8/+8
|/ / | | | | | | | | | | | | | | 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.
* | Implement socket keepalive configuration mechanisms (#332)Hervé Beraud2021-07-012-1/+147
| |
* | Remove codespell and flake8 complexity check (#335)Jon Parise2021-07-011-3/+2
| | | | | | | | | | | | | | 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).
* | Client API for server shutdown protocol command (#328)LINKIWI2021-06-212-0/+44
| |
* | MANIFEST.in: Add test data and docs (#331)John Vandenberg2021-06-181-0/+4
| | | | | | Closes #330
* | Provide a mock implementation of socket.getaddrinfo (#327)Jon Parise2021-06-181-4/+20
|/ | | | | | | 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).
* Fix doc rendering (#323)Hervé Beraud2021-06-161-0/+6
|
* Document how to use pymemcache Client from shell. (#221)Hervé Beraud2021-06-163-0/+82
|
* Prepare version 3.4.4 (#322)v3.4.4Jon Parise2021-06-022-1/+5
|
* Remove idle connections from pool (#309)Jordan Carlson2021-06-014-7/+59
| | | | | | 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.
* Merge pull request #320 from martinnj/fix/hashclient-set-manyJon Parise2021-05-272-9/+6
|\ | | | | Use client.set_many in HashClient.
| * Use client.set_many in HashClient.Martin Jørgensen2021-05-272-9/+6
|/
* Merge pull request #316 from jparise/version-3.4.3v3.4.3Jon Parise2021-05-122-1/+5
|\
| * Prepare version 3.4.3Jon Parise2021-05-112-1/+5
|/
* Merge pull request #315 from pope1ni/fix-unix-get-set-manyJon Parise2021-05-102-15/+64
|\
| * Fixed `HashClient.{get,set}_many()` with UNIX sockets.Nick Pope2021-05-102-15/+64
|/ | | | | | | Overlooked when UNIX socket support was added to `HashClient` in acd962b586a4fe018a00acb7e1621be373c13c3b. Fixes #314.
* Prepare the version 3.4.2 release (#312)v3.4.2Jon Parise2021-04-142-1/+6
|
* Removing trailing space after a command if there are no arguments. (#311)Jerry Miu2021-04-142-3/+6
| | | 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.
* Prepare the 3.4.1 patch release (#310)v3.4.1Jon Parise2021-03-042-1/+6
|
* Move _check_cas() check into cas() methodJon Parise2021-02-042-1/+4
| | | | | | | | | | | | | _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)
* Add Python 3.9 to tox.ini as the newest versionJon Parise2021-02-041-2/+2
|
* Disable IPv6 localhost resolution for CIJon Parise2021-02-041-0/+3
| | | | | | | | | | | | | 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.
* Highlight an important part of the IPv6 supportJon Parise2021-01-111-1/+3
| | | | | 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.
* Drop Python version 3.5 and add 3.9Jon Parise2020-10-133-5/+5
| | | | | - 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
* Remove unnecessary quotes around descriptionv3.4.0Jon Parise2020-09-151-1/+1
|
* Prepare the v3.4.0 release (#298)Jon Parise2020-09-152-1/+6
|
* Merge pull request #297 from pope1ni/patch-1Jon Parise2020-09-031-1/+0
|\ | | | | Removed print() in test.