-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Description
Version: redis-py 3.3.8 and redis 5.0.5
Platform: Python 3.6.8 on Ubuntu 18.04
Description: Redis strings are should be binary safe, but redis.set(key, value)
doesn't accept a bytearray as a valid type. Passing a bytearray in as a value, results in the following exception:
Invalid input of type: 'bytearray'. Convert to a byte, string or number first.
I understand that this might be a limitation of Python or perhaps I've misunderstood the Redis documentation. Thanks in advance.
Example code:
#!/usr/bin/python3
import redis
redis = redis.Redis(host="localhost", port=6379, db=0)
# This will result in an exception
redis.set("my-key", bytearray(10))
Metadata
Metadata
Assignees
Labels
No labels