I have a small script that makes requests with httplib2
which returns the response body as bytes. I normally want to immediately decode it to str so that my code can work as it previously did with 2.7.
However, when the response is XML with encoding as the first line, lxml.objectify
fails in python 3 as it expects bytes not str. What is the best way to go from XML str to a objectified object in Python 3?