-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
dynamodbfeature-requestThis issue requests a feature.This issue requests a feature.p3This is a minor priority issueThis is a minor priority issue
Description
The Binary
class has a problematic implementation of the __str__()
method that assumes str
and bytes
are interchangeable. Example:
Python 3.5.2 (default, Sep 28 2016, 18:11:34)
>>> from boto3.dynamodb.types import Binary
>>> b = Binary(b'hello')
>>> b
Binary(b'hello')
>>> print(b)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: __str__ returned non-string (type bytes)
>>> bytes(b)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'Binary' object is not iterable
The above examples all succeed under Python 2.7.
cosmopetrich, pbae, scribu, ff-olegsv, TryTryAgain and 9 more
Metadata
Metadata
Assignees
Labels
dynamodbfeature-requestThis issue requests a feature.This issue requests a feature.p3This is a minor priority issueThis is a minor priority issue