8000 redis module 3.0 no longer accepts booleans, changing them to strings by sandyhider · Pull Request #13 · jhuapl-boss/spdb · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

redis module 3.0 no longer accepts booleans, changing them to strings #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 20, 2019

Conversation

sandyhider
Copy link
Member
@sandyhider sandyhider commented Feb 20, 2019

From: https://github.com/andymccurdy/redis-py#upgrading-from-redis-py-2x-to-30
Encoding of User Input
redis-py 3.0 only accepts user data as bytes, strings or numbers (ints, longs and floats). Attempting to specify a key or a value as any other type will raise a DataError exception.

redis-py 2.X attempted to coerce any type of input into a string. While occasionally convenient, this caused all sorts of hidden errors when users passed boolean values (which were coerced to 'True' or 'False'), a None value (which was coerced to 'None') or other values, such as user defined types.

All 2.X users should make sure that the keys and values they pass into redis-py are either bytes, strings or numbers.

this caused errors in our tests which led us to finding the error.

@sandyhider sandyhider merged commit e9d951c into master Feb 20, 2019
@sandyhider sandyhider deleted the redis-no-bool branch February 20, 2019 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0