Skip to content

Add redis-py < 3 to requirements

Vincent Michel requested to merge pin-redis into master

It turns out we're not compatible with redis 5. Turns out we are 😅

However, we're not compatible with redis-py 3:

________________________________________________________________ test_channel_not_initialized ________________________________________________________________

beacon = <bliss.config.static.Config object at 0x7fb6c3d17390>

    def test_channel_not_initialized(beacon):
>       c = channels.Channel("tagada")

tests/test_channels.py:20: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
bliss/config/channels.py:293: in __new__
    bus = Bus(kwargs.get("redis"))
bliss/config/channels.py:94: in __new__
    redis = client.get_cache()
bliss/config/conductor/client.py:34: in f
    return func(*args, **keys)
bliss/config/conductor/client.py:94: in get_cache
    return connection.get_redis_connection(db=db)
bliss/config/conductor/connection.py:48: in f
    return func(self, *args, **keys)
bliss/config/conductor/connection.py:322: in get_redis_connection
    cnx.client_setname(my_name)
../miniconda/envs/bliss/lib/python2.7/site-packages/redis/client.py:820: in client_setname
    return self.execute_command('CLIENT SETNAME', name)
../miniconda/envs/bliss/lib/python2.7/site-packages/redis/client.py:754: in execute_command
    connection.send_command(*args)
../miniconda/envs/bliss/lib/python2.7/site-packages/redis/connection.py:619: in send_command
    self.send_packed_command(self.pack_command(*args))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = UnixDomainSocketConnection<path=/tmp/pytest-of-vimiche/pytest-3/beacon0/test_configuration/redis.sock,db=0>, args = (CLIENT, SETNAME, 'pytest:11043')
output = [], command = 'CLIENT SETNAME', buff = '*3\r\n'

    def pack_command(self, *args):
        "Pack a series of arguments into the Redis protocol"
        output = []
        # the client might have included 1 or more literal arguments in
        # the command name, e.g., 'CONFIG GET'. The Redis server expects these
        # arguments to be sent separately, so split the first argument
        # manually. All of these arguements get wrapped in the Token class
        # to prevent them from being encoded.
        command = args[0]
        if ' ' in command:
            args = tuple(Token.get_token(s)
                         for s in command.split()) + args[1:]
        else:
            args = (Token.get_token(command),) + args[1:]
    
        buff = SYM_EMPTY.join((SYM_STAR, str(len(args)).encode(), SYM_CRLF))
    
>       buffer_cutoff = self._buffer_cutoff
E       AttributeError: 'UnixDomainSocketConnection' object has no attribute '_buffer_cutoff'

../miniconda/envs/bliss/lib/python2.7/site-packages/redis/connection.py:658: AttributeError
Edited by Vincent Michel

Merge request reports