-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously python2 code using python-future to backport the py3 bytes behavior would trigger the following exception: code: from builtins import bytes as newbytes from pymemcache.client.base import Client client = Client(('localhost', 11211)) client.set(newbytes('key'), 'value') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/site-packages/pymemcache/client/base.py", line 297, in set return self._store_cmd(b'set', key, expire, noreply, value) File "/usr/local/lib/python2.7/site-packages/pymemcache/client/base.py", line 770, in _store_cmd key = self.check_key(key) File "/usr/local/lib/python2.7/site-packages/pymemcache/client/base.py", line 251, in check_key key_prefix=self.key_prefix) File "/usr/local/lib/python2.7/site-packages/pymemcache/client/base.py", line 91, in _check_key key = key.encode('ascii') File "/usr/local/lib/python2.7/site-packages/future/types/newbytes.py", line 381, in __getattribute__ raise AttributeError("encode method has been disabled in newbytes") AttributeError: encode method has been disabled in newbytes Add a test case for this and fix.
- Loading branch information
Showing
5 changed files
with
25 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ pytest-cov | |
gevent==1.3.6; "PyPy" not in platform_python_implementation | ||
pylibmc | ||
python-memcached | ||
future |