10

So, I have decided to write my next project with python3, why? Due to the plan for Ubuntu to gradually drop all Python2 support within the next year and only support Python3. (Starting with Ubuntu 13.04)

gevent and the memcached modules aren't officially ported to Python3.

What are some alternatives, already officially ported to Python3, for gevent and pylibmc or python-memcached?

David Nehme
  • 21,379
  • 8
  • 78
  • 117
Nadav
  • 168
  • 2
  • 10

4 Answers4

4

Circuits has now support for Python 3, try it it is great.

Darek
  • 2,861
  • 4
  • 29
  • 52
  • +1 I looked into it. Not deeply tho. I will try rolling with this and report findings :) – Nadav Nov 04 '13 at 09:41
1

for memcached you probably know alternative: redis+python3

Sławomir Lenart
  • 7,543
  • 4
  • 45
  • 61
0

I am stuck in the same point.

Its core is greenlet 0.4.0, which is available in python 3, but not the full libraries (gevent, evenlet or concurrence).

There are some attempts to migrate it, but with no luck.

You can check packages availability in this website: http://py3ksupport.appspot.com/pypi/greenlet

If I find any alternative I would let you know.

arutaku
  • 5,937
  • 1
  • 24
  • 38
0

pymemcache : A comprehensive, fast, pure-Python memcached client.

Comparison with other clients

pylibmc

The pylibmc library is a wrapper around libmemcached, implemented in C. It is fast, implements consistent hashing, the full memcached protocol and timeouts. It does not provide access to the "noreply" flag. It also isn't pure Python, so using it with libraries like gevent is out of the question, and its dependency on libmemcached poses challenges (e.g., it must be built against the same version of libmemcached that it will use at runtime).

Python-memcache

The python-memcache library implements the entire memcached text protocol, has a single timeout for all socket calls and has a flexible approach to serialization and deserialization. It is also written entirely in Python, so it works well with libraries like gevent. However, it is tied to using thread locals, doesn't implement "noreply", can't treat errors as cache misses and is slower than both pylibmc and pymemcache. It is also tied to a specific method for handling clusters of memcached servers.

Nik
  • 28
  • 6