frostyx / copr / copr

Forked from copr/copr 7 years ago
Clone

48880cc [backend] fix default arguments in redis scripts

Authored and Committed by praiskup 5 years ago
    [backend] fix default arguments in redis scripts
    
    Per redis upstream documentation:
    
        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.
    
    This was exactly our case, so we shouldn't rely on the fact that
    None is transformed to "None".
    
    Fixes: PR#583