Python 3 version does not handle unicode in delete.

Bug #1159867 reported by Albertas Agejevas on 2013-03-25
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Python Memcached

Bug Description

Non-ascii keys are not handled in delete:

>>> import memcache
>>> memcache.__file__
>>> c = memcache.Client(("localhost:11211",))
>>> c.set("føøk", 42, 0)
>>> c.get("føøk")
>>> c.delete("føøk")
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/home/alga/src/eggs/python3_memcached-1.44-py3.3.egg/", line 370, in delete
  File "/home/alga/src/eggs/python3_memcached-1.44-py3.3.egg/", line 922, in send_cmd
    self.socket.sendall((cmd + '\r\n').encode('ascii'))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 8-9: ordinal not in range(128)

Sean Reifschneider (jafo) wrote :

The Python 3 version is done by Eren Güven, you will need to report this issue to them unless it impacts this version as well.

Changed in python-memcached:
status: New → Invalid
Eren Güven (eguven) wrote :

This has been fixed, sorry for the confusion about Python3 version.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers