BUG: basestring not defined on PY3