From 04f1c78c13bd54050b1d2d3baa9e86d9e79b3629 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 23 Apr 2015 15:29:57 +0200 Subject: Port memcache to Python 3 * 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 --- setup.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 2a01f84..f105bf2 100644 --- a/setup.py +++ b/setup.py @@ -27,8 +27,8 @@ setup(name="python-memcached", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", -# "Programming Language :: Python :: 3", -# "Programming Language :: Python :: 3.2", -# "Programming Language :: Python :: 3.3", -# "Programming Language :: Python :: 3.4" + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.2", + "Programming Language :: Python :: 3.3", + "Programming Language :: Python :: 3.4" ]) -- cgit v1.2.1