Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def load(io, py2str_as_py3str=False, py3str_as_py2str=False):
""" derserialize an object form the specified stream.
Behaviour and parameters are otherwise the same as with ``loads``
"""
strconfig = (py2str_as_py3str, py3str_as_py2str)
return Unserializer(io, strconfig=strconfig).load(versioned=True)
def loads_internal(bytestring, channelfactory=None, strconfig=None):
io = BytesIO(bytestring)
return Unserializer(io, channelfactory, strconfig).load()