summaryrefslogtreecommitdiff
path: root/tests/test_encoding.py
Commit message (Collapse)AuthorAgeFilesLines
* remove Token class in favor of bytestringremove_tokenAndy McCurdy2019-05-281-1/+1
| | | | | | | The Token class was needed when supporting Python 2.6. Now that we've dropped support for 2.6, we don't need it anymore. Fixes #1066
* only accept bytes, strings, ints, longs and floats as user inputAndy McCurdy2018-11-141-7/+21
| | | | | | | | | | | | | | | | | All input sent to Redis is coerced into bytes. This includes key names and values. Prior to this change, redis-py made an effort to cooerce all input into strings by calling str() (Python 3) or unicode() (Python 2). While this works for a handful of types like ints, longs and floats, it fails for other types like bools ('True' or 'False'), None ('None') and many user defined types. Starting with redis-py version 3.0, sending input of any other type is considered an error an a DataError exception will be raised. Fixes #471 Fixes #472 Fixes #321 Fixes #190
* Use unicode literals throughout projectJon Dufresne2018-11-031-4/+5
| | | | Remove workaround for handling unicode with older Pythons.
* Remove from __future__ import with_statementJon Dufresne2018-11-031-1/+0
| | | | All supported Python versions support the with statement.
* avoid calling pytest fixtures directly since that's frowned uponAndy McCurdy2018-10-311-3/+4
|
* Fix warning during testJon Dufresne2017-01-281-1/+1
| | | | | | Fixes warning output: DeprecationWarning: "charset" is deprecated. Use "encoding" instead
* fix: Connection.encode complains when value is an object having unicode ↵Eric Du2015-05-041-0/+7
| | | | characters in its printable representation
* string literals no longer get encoded before being send to RedisAndy McCurdy2014-05-121-0/+9
| | | | | | | | | | | | previously all pieces of a command, including the command name and literal options to it (such as "WITHSCORES" on ZSET commands) would get encoded. this works fine on utf-8, but other encodings like utf-16 break. a new Token class has been introduced that command names and literal options get wrapped. the encoder falls back to the latin-1 encoding for these literals as they are all ascii. fixes #430
* with tox/travis, tests don't need to know about the environmentAndy McCurdy2014-01-281-14/+4
|
* encoding fixandy2013-06-071-1/+1
|
* encoding testsandy2013-06-061-0/+34