Python 3 version does not handle unicode in delete.

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

Bug Description

Non-ascii keys are not handled in delete:

>>> import memcache
>>> memcache.__file__
'/home/alga/src/eggs/python3_memcached-1.44-py3.3.egg/memcache.py'
>>> c = memcache.Client(("localhost:11211",))
>>> c.set("føøk", 42, 0)
True
>>> c.get("føøk")
42
>>> 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/memcache.py", line 370, in delete
    server.send_cmd(cmd)
  File "/home/alga/src/eggs/python3_memcached-1.44-py3.3.egg/memcache.py", 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