commit 38d581996b436bae9f294be9b030a8e1c427f1a6
Author: Pablo Caruana <email address hidden>
Date: Wed Aug 14 14:37:59 2019 +0200
Google backup: correct string encoding between py 2 and 3
Correcting encode() and decode() methods of 8-bit and Unicode
string objects.
In Python 2, Both 8-bit and Unicode strings had both methods
and the type of the return value was based on the specific
encoding passed in.
In Python 3, Text strings only have an encode() method, and
that method can only be used with codecs that produce bytes
objects. Similarly bytes and bytearray objects only have a
decode() method which can only be used with codecs that
produce string objects.
Reviewed: https:/ /review. opendev. org/676403 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=38d581996b4 36bae9f294be9b0 30a8e1c427f1a6
Committed: https:/
Submitter: Zuul
Branch: master
commit 38d581996b436ba e9f294be9b030a8 e1c427f1a6
Author: Pablo Caruana <email address hidden>
Date: Wed Aug 14 14:37:59 2019 +0200
Google backup: correct string encoding between py 2 and 3
Correcting encode() and decode() methods of 8-bit and Unicode
string objects.
In Python 2, Both 8-bit and Unicode strings had both methods
and the type of the return value was based on the specific
encoding passed in.
In Python 3, Text strings only have an encode() method, and
that method can only be used with codecs that produce bytes
objects. Similarly bytes and bytearray objects only have a
decode() method which can only be used with codecs that
produce string objects.
Change-Id: I214a786858655b 8caf9612f3da540 3c7d0bb7387
Closes-Bug: #1831735