Python 3 version does not handle unicode in delete.

Bug #1159867 reported by Albertas Agejevas
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Python Memcached
Invalid
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)

Revision history for this message
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
Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.