diff --git a/rhodecode/config/rcextensions/utils.py b/rhodecode/config/rcextensions/utils.py --- a/rhodecode/config/rcextensions/utils.py +++ b/rhodecode/config/rcextensions/utils.py @@ -178,7 +178,7 @@ def aslist(obj, sep=None, strip=True): :param sep: :param strip: """ - if isinstance(obj, (basestring,)): + if isinstance(obj, (str,)): lst = obj.split(sep) if strip: lst = [v.strip() for v in lst] diff --git a/rhodecode/config/settings_maker.py b/rhodecode/config/settings_maker.py --- a/rhodecode/config/settings_maker.py +++ b/rhodecode/config/settings_maker.py @@ -58,7 +58,7 @@ def aslist(obj, sep=None, strip=True): :param sep: :param strip: """ - if isinstance(obj, (basestring,)): + if isinstance(obj, (str,)): if obj in ['', ""]: return [] diff --git a/rhodecode/lib/_vendor/authomatic/six.py b/rhodecode/lib/_vendor/authomatic/six.py --- a/rhodecode/lib/_vendor/authomatic/six.py +++ b/rhodecode/lib/_vendor/authomatic/six.py @@ -46,7 +46,7 @@ if PY3: MAXSIZE = sys.maxsize else: - string_types = basestring, + string_types = str, integer_types = (int, long) class_types = (type, types.ClassType) text_type = unicode @@ -701,7 +701,7 @@ if print_ is None: if fp is None: return def write(data): - if not isinstance(data, basestring): + if not isinstance(data, str): data = str(data) # If the file has an encoding, encode unicode with it. if (isinstance(fp, file) and diff --git a/rhodecode/lib/channelstream.py b/rhodecode/lib/channelstream.py --- a/rhodecode/lib/channelstream.py +++ b/rhodecode/lib/channelstream.py @@ -247,7 +247,7 @@ def post_message(channel, message, usern return message_obj = message - if isinstance(message, basestring): + if isinstance(message, str): message_obj = { 'message': message, 'level': 'success', diff --git a/rhodecode/lib/helpers.py b/rhodecode/lib/helpers.py --- a/rhodecode/lib/helpers.py +++ b/rhodecode/lib/helpers.py @@ -185,7 +185,7 @@ def select(name, selected_values, option for opt in options_iter: if isinstance(opt, tuple) and len(opt) == 2: value, label = opt - elif isinstance(opt, basestring): + elif isinstance(opt, str): value = label = opt else: raise ValueError('invalid select option type %r' % type(opt)) @@ -195,7 +195,7 @@ def select(name, selected_values, option for opt2 in value: if isinstance(opt2, tuple) and len(opt2) == 2: group_value, group_label = opt2 - elif isinstance(opt2, basestring): + elif isinstance(opt2, str): group_value = group_label = opt2 else: raise ValueError('invalid select option type %r' % type(opt2)) diff --git a/rhodecode/model/scm.py b/rhodecode/model/scm.py --- a/rhodecode/model/scm.py +++ b/rhodecode/model/scm.py @@ -767,7 +767,7 @@ class ScmModel(BaseModel): f_path = safe_str(f_path) # decoding here will force that we have proper encoded values # in any other case this will throw exceptions and deny commit - if isinstance(content, (basestring,)): + if isinstance(content, (str,)): content = safe_str(content) elif isinstance(content, (file, cStringIO.OutputType,)): content = content.read()