Skip to content

[3.26][py3] Fix `AttributeError: 'str' object has no attribute 'decode'`

Nicola Spanti requested to merge topic/3.26/3-26_py3-str-no-decode into branch/3.26
$ python2
>>> str('a').decode('utf-8')
u'a'
$ python3
>>> str('a').decode('utf-8')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'str' object has no attribute 'decode'

Merge request reports