summaryrefslogtreecommitdiff
path: root/memcache.py
Commit message (Collapse)AuthorAgeFilesLines
* Updating version in memcache.pySean Reifschneider2015-07-261-1/+1
|
* Port memcache to Python 3Victor Stinner2015-04-231-89/+149
| | | | | | | | | | | | | | | | | | * travis: make python 3 tests voting (cannot fail anymore) * setup.py: add Python 3 classifiers * Encode unicode key to UTF-8: add _encode_key() method * Add _encode_cmd() helper method to format a memcache command as a byte string (bytes%args will only be supported in Python 3.5) * Rewrite _map_and_prefix_keys() code converting keys * _val_to_store_info() now accepts Unicode: Unicode is encoded to UTF-8 * _set('cas') doesn't call _val_to_store_info() anymore when it's not needed: begin by checking if the key is in the cas_ids dictionary * Process server reply as bytes * _recv_value() now clears the _FLAG_COMPRESSED flag after decompressing to simplify the code * On Python 3, _recv_value() now decodes byte strings from UTF-8 * Simplify check_key(), _encode_key() now encodes Unicode to UTF-8 * Replace u'...' with six.u('...') in tests for Python 3.2
* updating comment to account for -I optionDave Forgac2014-10-111-3/+4
|
* Merge pull request #50 from cactus/support-alternate-compressionSean Reifschneider2014-09-271-20/+10
|\ | | | | add support for pluggable compressor/decompressor
| * add support for pluggable compressor/decompressorelij2014-08-241-20/+10
| | | | | | | | | | | | | | | | Add support for pluggable compressors. zlib is a fine choice for a default compressor, but in some environments alternatives (lz4/lzf/snappy) that offer differet tradeoffs for size/time, may be preferred.
* | Merge pull request #49 from cactus/noreplySean Reifschneider2014-09-271-43/+110
|\ \ | | | | | | add support for noreply
| * | CAS supports noreply tooelij2014-08-251-2/+2
| | |
| * | add support for noreplyelij2014-08-241-41/+108
| |/ | | | | | | | | | | the memcache protocol defines a 'noreply' optional parameter, which instructs the server to not send a reply. In heavy usage environments this can lead to significant performance improvements.
* | Fixes for empty/None keys.Sean Reifschneider2014-09-241-1/+12
| | | | | | | | | | Empty keys with a prefix are ok (for _multi() mostly). _multi() was silently converting None key to a string.
* | MemcachedKeyCharacterError better describes errorSean Reifschneider2014-09-211-1/+1
|/
* pep8: H201 no 'except:' at least use 'except Exception:'Marc Abramowitz2014-06-091-1/+1
|
* pep8: E227 missing whitespace around bitwise or shift operatorMarc Abramowitz2014-06-091-1/+1
|
* pep8: F402 import 'pickle' from line 52 shadowed by loop variableMarc Abramowitz2014-06-091-1/+0
|
* pep8: H405 multi line docstring summary not separated with an empty lineMarc Abramowitz2014-06-091-4/+13
|
* pep8: E711 comparison to None should be 'if cond is None:'Marc Abramowitz2014-06-091-4/+4
|
* pep8: E265 block comment should start with '# 'Marc Abramowitz2014-06-091-13/+13
|
* Clean up long lines for pep8Marc Abramowitz2014-06-091-7/+8
|
* Sort imports for pep8Marc Abramowitz2014-06-091-3/+4
|
* Resolving conflicts from cabrera-py33_fixes.Sean Reifschneider2014-06-071-316/+413
|
* Complete the Python3 work!Alex Gaynor2014-05-101-1/+1
|
* Merge pull request #42 from alex/iterkeysSean Reifschneider2014-05-101-5/+5
|\ | | | | Removed usage of iterkeys for python3
| * Removed usage of iterkeys for python3Alex Gaynor2014-05-101-5/+5
| |
* | Included Python3 changes from Dustin OpreaSean Reifschneider2014-05-101-5/+19
|/ | | | From #38.
* Merge pull request #41 from alex/stringio-py3kSean Reifschneider2014-05-101-7/+4
|\ | | | | Use io.BytesIO() in favor of StringIO to be python3 friendly
| * Use io.BytesIO() in favor of StringIO to be python3 friendlyAlex Gaynor2014-05-101-7/+4
| |
* | Fixing connection-dead subscript issue.Sean Reifschneider2014-05-101-1/+1
| | | | | | | | From Dustin Oprea, part of #38.
* | Doc fix from Dustin Oprea (part of #38).Sean Reifschneider2014-05-101-1/+1
|/
* Converted print statements to use the Python3 compatible formAlex Gaynor2014-05-101-57/+77
|
* Made the "except" syntax py3 friendly.Alex Gaynor2014-05-101-20/+20
| | | Note that this makes the minimum supported version be 2.6
* Adding Changelog for touch()Sean Reifschneider2014-02-081-1/+1
|
* Merge pull request #28 from erankor/masterSean Reifschneider2014-02-081-6/+22
|\ | | | | add support for touch command
| * add support for touch commanderan.kornblau2014-01-281-6/+22
| |
* | Allow specifying an empty server list.Glenn Maynard2014-02-061-0/+3
|/ | | | | | | | | | | | | | | | | | If the server list is empty, behave the same as if all servers are down. This allows clients to not care whether memcache is actually in use: mc = memcache.Client(get_my_memcache_servers()) mc.get('cache') If you're not using memcache at all, get_my_memcache_servers() just returns [], and the client code doesn't need to know the difference. Previously, it would fail: >>> mc = memcache.Client([]) >>> mc.get('x') File "memcache.py", line 353, in _get_server server = self.buckets[serverhash % len(self.buckets)] ZeroDivisionError: integer division or modulo by zero
* Changing unknown flags on GET to raise ValueError.Sean Reifschneider2013-08-251-0/+1
|
* Reverting an accidental key-space change.Sean Reifschneider2013-08-191-1/+1
|
* Alowing SERVER_MAX* to be set after import.Sean Reifschneider2013-08-121-3/+6
|
* For 1.53 release.release-1.53Sean Reifschneider2013-06-071-1/+1
|
* Marking connection dead in readline().Sean Reifschneider2013-06-031-9/+4
| | | | Also fixing a docstring test.
* Fixing AttributeError raised during set_multi.Sean Reifschneider2013-06-021-4/+10
|
* Fixing readability of set_multi docstrings.Sean Reifschneider2013-06-021-21/+34
|
* Updating version number.release-1.52Sean Reifschneider2013-06-021-1/+1
|
* Reverting back to re.match for key checking.Sean Reifschneider2013-06-021-15/+4
|
* If Python <2.6, use regex to test keys.Sean Reifschneider2013-06-021-6/+17
|
* For 1.51 release.release-1.51Sean Reifschneider2013-05-061-1/+1
|
* Changing check_key to check_keys.release-1.49Sean Reifschneider2013-05-061-3/+3
|
* check_key disabling and performance improvements.Sean Reifschneider2013-05-041-11/+20
| | | | | | | | | | * Client() now takes a "check_key" option, which defaults to True. If False, it disables the checking of keys to ensure they have acceptable size and are composed of non-control characters. Suggested by Ben Hoyt. * Converting control character checking of keys based on performance testing of alternatives by Ben Hoyt.
* Converting unicode test from using u''.Sean Reifschneider2013-04-171-3/+4
|
* Set after server dies raises AttributeError.Sean Reifschneider2013-03-301-2/+2
|
* incr/decr return None on server connection fail.Sean Reifschneider2013-03-291-2/+2
|
* Adding patch for IPv6 connection string.Sean Reifschneider2013-03-281-0/+14
|