commit 47726fb3ad104698327e40efb94b088d311ce543
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: I214a786858655b8caf9612f3da5403c7d0bb7387
Closes-Bug: #1831735
(cherry picked from commit 38d581996b436bae9f294be9b030a8e1c427f1a6)
Reviewed: https:/ /review. opendev. org/684722 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=47726fb3ad1 04698327e40efb9 4b088d311ce543
Committed: https:/
Submitter: Zuul
Branch: stable/stein
commit 47726fb3ad10469 8327e40efb94b08 8d311ce543
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 e9f294be9b030a8 e1c427f1a6)
Closes-Bug: #1831735
(cherry picked from commit 38d581996b436ba