diff --git a/rhodecode/apps/admin/tests/test_admin_audit_logs.py b/rhodecode/apps/admin/tests/test_admin_audit_logs.py --- a/rhodecode/apps/admin/tests/test_admin_audit_logs.py +++ b/rhodecode/apps/admin/tests/test_admin_audit_logs.py @@ -69,7 +69,7 @@ class TestAdminController(object): with open(os.path.join(FIXTURES, 'journal_dump.csv')) as f: for row in csv.DictReader(f): ul = UserLog() - for k, v in row.iteritems(): + for k, v in row.items(): v = safe_unicode(v) if k == 'action_date': v = strptime(v) diff --git a/rhodecode/apps/admin/tests/test_admin_settings.py b/rhodecode/apps/admin/tests/test_admin_settings.py --- a/rhodecode/apps/admin/tests/test_admin_settings.py +++ b/rhodecode/apps/admin/tests/test_admin_settings.py @@ -236,7 +236,7 @@ class TestAdminSettingsGlobal(object): assert_session_flash(response, 'Updated application settings') app_settings = SettingsModel().get_all_settings() del settings['csrf_token'] - for key, value in settings.iteritems(): + for key, value in settings.items(): assert app_settings[key] == value.decode('utf-8') return response diff --git a/rhodecode/apps/admin/views/defaults.py b/rhodecode/apps/admin/views/defaults.py --- a/rhodecode/apps/admin/views/defaults.py +++ b/rhodecode/apps/admin/views/defaults.py @@ -75,7 +75,7 @@ class AdminDefaultSettingsView(BaseAppVi try: form_result = form.to_python(dict(self.request.POST)) - for k, v in form_result.iteritems(): + for k, v in form_result.items(): setting = SettingsModel().create_or_update_setting(k, v) Session().add(setting) Session().commit() diff --git a/rhodecode/apps/repository/views/repo_summary.py b/rhodecode/apps/repository/views/repo_summary.py --- a/rhodecode/apps/repository/views/repo_summary.py +++ b/rhodecode/apps/repository/views/repo_summary.py @@ -128,7 +128,7 @@ class RepoSummaryView(RepoAppView): # Sort first by decreasing count and second by the file extension, # so we have a consistent output. - lang_stats_items = sorted(lang_stats_d.iteritems(), + lang_stats_items = sorted(lang_stats_d.items(), key=lambda k: (-k[1], k[0]))[:10] lang_stats = [(x, {"count": y, "desc": LANGUAGES_EXTENSIONS_MAP.get(x)}) @@ -267,7 +267,7 @@ class RepoSummaryView(RepoAppView): def _create_reference_items(self, repo, full_repo_name, refs, ref_type, format_ref_id): result = [] is_svn = h.is_svn(repo) - for ref_name, raw_id in refs.iteritems(): + for ref_name, raw_id in refs.items(): files_url = self._create_files_url( repo, full_repo_name, ref_name, raw_id, is_svn) result.append({ diff --git a/rhodecode/lib/auth.py b/rhodecode/lib/auth.py --- a/rhodecode/lib/auth.py +++ b/rhodecode/lib/auth.py @@ -1112,7 +1112,7 @@ class AuthUser(object): k: v for k, v in perms['user_groups'].items() if v != 'usergroup.none'} perms['repository_branches'] = { - k: v for k, v in perms['repository_branches'].iteritems() + k: v for k, v in perms['repository_branches'].items() if v != 'branch.none'} return perms diff --git a/rhodecode/lib/dbmigrate/migrate/versioning/genmodel.py b/rhodecode/lib/dbmigrate/migrate/versioning/genmodel.py --- a/rhodecode/lib/dbmigrate/migrate/versioning/genmodel.py +++ b/rhodecode/lib/dbmigrate/migrate/versioning/genmodel.py @@ -192,7 +192,7 @@ class ModelGenerator(object): downgradeCommands.append( "post_meta.tables[%(table)r].drop()" % {'table': tn}) - for (tn, td) in self.diff.tables_different.iteritems(): + for (tn, td) in self.diff.tables_different.items(): if td.columns_missing_from_A or td.columns_different: pre_table = self.diff.metadataB.tables[tn] decls.extend(self._getTableDefn( diff --git a/rhodecode/lib/dbmigrate/migrate/versioning/shell.py b/rhodecode/lib/dbmigrate/migrate/versioning/shell.py --- a/rhodecode/lib/dbmigrate/migrate/versioning/shell.py +++ b/rhodecode/lib/dbmigrate/migrate/versioning/shell.py @@ -23,7 +23,7 @@ alias = { def alias_setup(): global alias - for key, val in alias.iteritems(): + for key, val in alias.items(): setattr(api, key, val) alias_setup() @@ -135,7 +135,7 @@ def main(argv=None, **kwargs): override_kwargs[opt] = value # override kwargs with options if user is overwriting - for key, value in options.__dict__.iteritems(): + for key, value in options.__dict__.items(): if value is not None: override_kwargs[key] = value @@ -143,7 +143,7 @@ def main(argv=None, **kwargs): f_required = list(f_args) candidates = dict(kwargs) candidates.update(override_kwargs) - for key, value in candidates.iteritems(): + for key, value in candidates.items(): if key in f_args: f_required.remove(key) @@ -160,7 +160,7 @@ def main(argv=None, **kwargs): kwargs.update(override_kwargs) # configure options - for key, value in options.__dict__.iteritems(): + for key, value in options.__dict__.items(): kwargs.setdefault(key, value) # configure logging diff --git a/rhodecode/lib/dbmigrate/migrate/versioning/util/__init__.py b/rhodecode/lib/dbmigrate/migrate/versioning/util/__init__.py --- a/rhodecode/lib/dbmigrate/migrate/versioning/util/__init__.py +++ b/rhodecode/lib/dbmigrate/migrate/versioning/util/__init__.py @@ -131,7 +131,7 @@ def construct_engine(engine, **opts): kwargs['echo'] = echo # parse keyword arguments - for key, value in opts.iteritems(): + for key, value in opts.items(): if key.startswith('engine_arg_'): kwargs[key[11:]] = guess_obj_type(value) diff --git a/rhodecode/lib/dbmigrate/schema/db_1_3_0.py b/rhodecode/lib/dbmigrate/schema/db_1_3_0.py --- a/rhodecode/lib/dbmigrate/schema/db_1_3_0.py +++ b/rhodecode/lib/dbmigrate/schema/db_1_3_0.py @@ -103,7 +103,7 @@ class BaseModel(object): d[k] = getattr(self, k) # also use __json__() if present to get additional fields - for k, val in getattr(self, '__json__', lambda: {})().iteritems(): + for k, val in getattr(self, '__json__', lambda: {})().items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_1_4_0.py b/rhodecode/lib/dbmigrate/schema/db_1_4_0.py --- a/rhodecode/lib/dbmigrate/schema/db_1_4_0.py +++ b/rhodecode/lib/dbmigrate/schema/db_1_4_0.py @@ -82,7 +82,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_1_5_0.py b/rhodecode/lib/dbmigrate/schema/db_1_5_0.py --- a/rhodecode/lib/dbmigrate/schema/db_1_5_0.py +++ b/rhodecode/lib/dbmigrate/schema/db_1_5_0.py @@ -83,7 +83,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_1_5_2.py b/rhodecode/lib/dbmigrate/schema/db_1_5_2.py --- a/rhodecode/lib/dbmigrate/schema/db_1_5_2.py +++ b/rhodecode/lib/dbmigrate/schema/db_1_5_2.py @@ -83,7 +83,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_1_6_0.py b/rhodecode/lib/dbmigrate/schema/db_1_6_0.py --- a/rhodecode/lib/dbmigrate/schema/db_1_6_0.py +++ b/rhodecode/lib/dbmigrate/schema/db_1_6_0.py @@ -83,7 +83,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_1_7_0.py b/rhodecode/lib/dbmigrate/schema/db_1_7_0.py --- a/rhodecode/lib/dbmigrate/schema/db_1_7_0.py +++ b/rhodecode/lib/dbmigrate/schema/db_1_7_0.py @@ -83,7 +83,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_1_8_0.py b/rhodecode/lib/dbmigrate/schema/db_1_8_0.py --- a/rhodecode/lib/dbmigrate/schema/db_1_8_0.py +++ b/rhodecode/lib/dbmigrate/schema/db_1_8_0.py @@ -83,7 +83,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_2_0_0.py b/rhodecode/lib/dbmigrate/schema/db_2_0_0.py --- a/rhodecode/lib/dbmigrate/schema/db_2_0_0.py +++ b/rhodecode/lib/dbmigrate/schema/db_2_0_0.py @@ -84,7 +84,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_2_0_1.py b/rhodecode/lib/dbmigrate/schema/db_2_0_1.py --- a/rhodecode/lib/dbmigrate/schema/db_2_0_1.py +++ b/rhodecode/lib/dbmigrate/schema/db_2_0_1.py @@ -84,7 +84,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_2_0_2.py b/rhodecode/lib/dbmigrate/schema/db_2_0_2.py --- a/rhodecode/lib/dbmigrate/schema/db_2_0_2.py +++ b/rhodecode/lib/dbmigrate/schema/db_2_0_2.py @@ -84,7 +84,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_2_1_0.py b/rhodecode/lib/dbmigrate/schema/db_2_1_0.py --- a/rhodecode/lib/dbmigrate/schema/db_2_1_0.py +++ b/rhodecode/lib/dbmigrate/schema/db_2_1_0.py @@ -84,7 +84,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_2_2_0.py b/rhodecode/lib/dbmigrate/schema/db_2_2_0.py --- a/rhodecode/lib/dbmigrate/schema/db_2_2_0.py +++ b/rhodecode/lib/dbmigrate/schema/db_2_2_0.py @@ -85,7 +85,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_2_2_3.py b/rhodecode/lib/dbmigrate/schema/db_2_2_3.py --- a/rhodecode/lib/dbmigrate/schema/db_2_2_3.py +++ b/rhodecode/lib/dbmigrate/schema/db_2_2_3.py @@ -85,7 +85,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_2_3_0_0.py b/rhodecode/lib/dbmigrate/schema/db_2_3_0_0.py --- a/rhodecode/lib/dbmigrate/schema/db_2_3_0_0.py +++ b/rhodecode/lib/dbmigrate/schema/db_2_3_0_0.py @@ -85,7 +85,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_2_3_0_1.py b/rhodecode/lib/dbmigrate/schema/db_2_3_0_1.py --- a/rhodecode/lib/dbmigrate/schema/db_2_3_0_1.py +++ b/rhodecode/lib/dbmigrate/schema/db_2_3_0_1.py @@ -85,7 +85,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_2_3_0_2.py b/rhodecode/lib/dbmigrate/schema/db_2_3_0_2.py --- a/rhodecode/lib/dbmigrate/schema/db_2_3_0_2.py +++ b/rhodecode/lib/dbmigrate/schema/db_2_3_0_2.py @@ -88,7 +88,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_3_0_0_0.py b/rhodecode/lib/dbmigrate/schema/db_3_0_0_0.py --- a/rhodecode/lib/dbmigrate/schema/db_3_0_0_0.py +++ b/rhodecode/lib/dbmigrate/schema/db_3_0_0_0.py @@ -90,7 +90,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_3_0_0_1.py b/rhodecode/lib/dbmigrate/schema/db_3_0_0_1.py --- a/rhodecode/lib/dbmigrate/schema/db_3_0_0_1.py +++ b/rhodecode/lib/dbmigrate/schema/db_3_0_0_1.py @@ -134,7 +134,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_3_1_0_0.py b/rhodecode/lib/dbmigrate/schema/db_3_1_0_0.py --- a/rhodecode/lib/dbmigrate/schema/db_3_1_0_0.py +++ b/rhodecode/lib/dbmigrate/schema/db_3_1_0_0.py @@ -134,7 +134,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_3_1_0_1.py b/rhodecode/lib/dbmigrate/schema/db_3_1_0_1.py --- a/rhodecode/lib/dbmigrate/schema/db_3_1_0_1.py +++ b/rhodecode/lib/dbmigrate/schema/db_3_1_0_1.py @@ -135,7 +135,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_3_2_0_0.py b/rhodecode/lib/dbmigrate/schema/db_3_2_0_0.py --- a/rhodecode/lib/dbmigrate/schema/db_3_2_0_0.py +++ b/rhodecode/lib/dbmigrate/schema/db_3_2_0_0.py @@ -135,7 +135,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_3_3_0_0.py b/rhodecode/lib/dbmigrate/schema/db_3_3_0_0.py --- a/rhodecode/lib/dbmigrate/schema/db_3_3_0_0.py +++ b/rhodecode/lib/dbmigrate/schema/db_3_3_0_0.py @@ -136,7 +136,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_3_5_0_0.py b/rhodecode/lib/dbmigrate/schema/db_3_5_0_0.py --- a/rhodecode/lib/dbmigrate/schema/db_3_5_0_0.py +++ b/rhodecode/lib/dbmigrate/schema/db_3_5_0_0.py @@ -136,7 +136,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_3_7_0_0.py b/rhodecode/lib/dbmigrate/schema/db_3_7_0_0.py --- a/rhodecode/lib/dbmigrate/schema/db_3_7_0_0.py +++ b/rhodecode/lib/dbmigrate/schema/db_3_7_0_0.py @@ -158,7 +158,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_4_11_0_0.py b/rhodecode/lib/dbmigrate/schema/db_4_11_0_0.py --- a/rhodecode/lib/dbmigrate/schema/db_4_11_0_0.py +++ b/rhodecode/lib/dbmigrate/schema/db_4_11_0_0.py @@ -216,7 +216,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_4_13_0_0.py b/rhodecode/lib/dbmigrate/schema/db_4_13_0_0.py --- a/rhodecode/lib/dbmigrate/schema/db_4_13_0_0.py +++ b/rhodecode/lib/dbmigrate/schema/db_4_13_0_0.py @@ -216,7 +216,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_4_16_0_0.py b/rhodecode/lib/dbmigrate/schema/db_4_16_0_0.py --- a/rhodecode/lib/dbmigrate/schema/db_4_16_0_0.py +++ b/rhodecode/lib/dbmigrate/schema/db_4_16_0_0.py @@ -223,7 +223,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_4_16_0_1.py b/rhodecode/lib/dbmigrate/schema/db_4_16_0_1.py --- a/rhodecode/lib/dbmigrate/schema/db_4_16_0_1.py +++ b/rhodecode/lib/dbmigrate/schema/db_4_16_0_1.py @@ -223,7 +223,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_4_16_0_2.py b/rhodecode/lib/dbmigrate/schema/db_4_16_0_2.py --- a/rhodecode/lib/dbmigrate/schema/db_4_16_0_2.py +++ b/rhodecode/lib/dbmigrate/schema/db_4_16_0_2.py @@ -223,7 +223,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_4_18_0_1.py b/rhodecode/lib/dbmigrate/schema/db_4_18_0_1.py --- a/rhodecode/lib/dbmigrate/schema/db_4_18_0_1.py +++ b/rhodecode/lib/dbmigrate/schema/db_4_18_0_1.py @@ -230,7 +230,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_4_19_0_0.py b/rhodecode/lib/dbmigrate/schema/db_4_19_0_0.py --- a/rhodecode/lib/dbmigrate/schema/db_4_19_0_0.py +++ b/rhodecode/lib/dbmigrate/schema/db_4_19_0_0.py @@ -230,7 +230,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_4_19_0_2.py b/rhodecode/lib/dbmigrate/schema/db_4_19_0_2.py --- a/rhodecode/lib/dbmigrate/schema/db_4_19_0_2.py +++ b/rhodecode/lib/dbmigrate/schema/db_4_19_0_2.py @@ -230,7 +230,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_4_20_0_0.py b/rhodecode/lib/dbmigrate/schema/db_4_20_0_0.py --- a/rhodecode/lib/dbmigrate/schema/db_4_20_0_0.py +++ b/rhodecode/lib/dbmigrate/schema/db_4_20_0_0.py @@ -235,7 +235,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_4_3_0_0.py b/rhodecode/lib/dbmigrate/schema/db_4_3_0_0.py --- a/rhodecode/lib/dbmigrate/schema/db_4_3_0_0.py +++ b/rhodecode/lib/dbmigrate/schema/db_4_3_0_0.py @@ -179,7 +179,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py b/rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py --- a/rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py +++ b/rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py @@ -180,7 +180,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py b/rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py --- a/rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py +++ b/rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py @@ -179,7 +179,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py b/rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py --- a/rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py +++ b/rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py @@ -181,7 +181,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py b/rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py --- a/rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py +++ b/rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py @@ -181,7 +181,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_4_7_0_0.py b/rhodecode/lib/dbmigrate/schema/db_4_7_0_0.py --- a/rhodecode/lib/dbmigrate/schema/db_4_7_0_0.py +++ b/rhodecode/lib/dbmigrate/schema/db_4_7_0_0.py @@ -177,7 +177,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_4_7_0_1.py b/rhodecode/lib/dbmigrate/schema/db_4_7_0_1.py --- a/rhodecode/lib/dbmigrate/schema/db_4_7_0_1.py +++ b/rhodecode/lib/dbmigrate/schema/db_4_7_0_1.py @@ -177,7 +177,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/dbmigrate/schema/db_4_9_0_0.py b/rhodecode/lib/dbmigrate/schema/db_4_9_0_0.py --- a/rhodecode/lib/dbmigrate/schema/db_4_9_0_0.py +++ b/rhodecode/lib/dbmigrate/schema/db_4_9_0_0.py @@ -175,7 +175,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/lib/markup_renderer.py b/rhodecode/lib/markup_renderer.py --- a/rhodecode/lib/markup_renderer.py +++ b/rhodecode/lib/markup_renderer.py @@ -446,7 +446,7 @@ class MarkupRenderer(object): 'syntax_highlight': 'short', }) - for k, v in docutils_settings.iteritems(): + for k, v in docutils_settings.items(): directives.register_directive(k, v) parts = publish_parts(source=source, diff --git a/rhodecode/lib/middleware/utils/wsgi_app_caller_client.py b/rhodecode/lib/middleware/utils/wsgi_app_caller_client.py --- a/rhodecode/lib/middleware/utils/wsgi_app_caller_client.py +++ b/rhodecode/lib/middleware/utils/wsgi_app_caller_client.py @@ -40,7 +40,7 @@ def _get_clean_environ(environ): :rtype: dict """ clean_environ = dict( - (k, v) for k, v in environ.iteritems() + (k, v) for k, v in environ.items() if type(v) == str and type(k) == str and not k.startswith('wsgi.') ) diff --git a/rhodecode/lib/vcs/backends/base.py b/rhodecode/lib/vcs/backends/base.py --- a/rhodecode/lib/vcs/backends/base.py +++ b/rhodecode/lib/vcs/backends/base.py @@ -1802,7 +1802,7 @@ class Config(object): len(self._values), hex(id(self))) def items(self, section): - return self._values.get(section, {}).iteritems() + return self._values.get(section, {}).items() def get(self, section, option): return self._values.get(section, {}).get(option) diff --git a/rhodecode/lib/vcs/backends/git/commit.py b/rhodecode/lib/vcs/backends/git/commit.py --- a/rhodecode/lib/vcs/backends/git/commit.py +++ b/rhodecode/lib/vcs/backends/git/commit.py @@ -144,14 +144,14 @@ class GitCommit(base.BaseCommit): @LazyProperty def tags(self): tags = [safe_unicode(name) for name, - commit_id in self.repository.tags.iteritems() + commit_id in self.repository.tags.items() if commit_id == self.raw_id] return tags @LazyProperty def commit_branches(self): branches = [] - for name, commit_id in self.repository.branches.iteritems(): + for name, commit_id in self.repository.branches.items(): if commit_id == self.raw_id: branches.append(name) return branches diff --git a/rhodecode/lib/vcs/backends/git/repository.py b/rhodecode/lib/vcs/backends/git/repository.py --- a/rhodecode/lib/vcs/backends/git/repository.py +++ b/rhodecode/lib/vcs/backends/git/repository.py @@ -317,7 +317,7 @@ class GitRepository(BaseRepository): return OrderedDict() result = [] - for ref, sha in self._refs.iteritems(): + for ref, sha in self._refs.items(): if ref.startswith(prefix): ref_name = ref if strip_prefix: @@ -412,7 +412,7 @@ class GitRepository(BaseRepository): @property def _ref_tree(self): node = tree = {} - for ref, sha in self._refs.iteritems(): + for ref, sha in self._refs.items(): path = ref.split('/') for bit in path[:-1]: node = node.setdefault(bit, {}) diff --git a/rhodecode/lib/vcs/backends/hg/commit.py b/rhodecode/lib/vcs/backends/hg/commit.py --- a/rhodecode/lib/vcs/backends/hg/commit.py +++ b/rhodecode/lib/vcs/backends/hg/commit.py @@ -87,7 +87,7 @@ class MercurialCommit(base.BaseCommit): @LazyProperty def tags(self): - tags = [name for name, commit_id in self.repository.tags.iteritems() + tags = [name for name, commit_id in self.repository.tags.items() if commit_id == self.raw_id] return tags @@ -98,7 +98,7 @@ class MercurialCommit(base.BaseCommit): @LazyProperty def bookmarks(self): bookmarks = [ - name for name, commit_id in self.repository.bookmarks.iteritems() + name for name, commit_id in self.repository.bookmarks.items() if commit_id == self.raw_id] return bookmarks @@ -302,7 +302,7 @@ class MercurialCommit(base.BaseCommit): if os.path.dirname(d) == path] alias = self.repository.alias - for k, vals in self._submodules.iteritems(): + for k, vals in self._submodules.items(): if vcspath.dirname(k) == path: loc = vals[0] commit = vals[1] diff --git a/rhodecode/model/comment.py b/rhodecode/model/comment.py --- a/rhodecode/model/comment.py +++ b/rhodecode/model/comment.py @@ -659,8 +659,8 @@ class CommentsModel(BaseModel): def get_inline_comments_as_list(self, inline_comments, skip_outdated=True, version=None): inline_comms = [] - for fname, per_line_comments in inline_comments.iteritems(): - for lno, comments in per_line_comments.iteritems(): + for fname, per_line_comments in inline_comments.items(): + for lno, comments in per_line_comments.items(): for comm in comments: if not comm.outdated_at_version(version) and skip_outdated: inline_comms.append(comm) diff --git a/rhodecode/model/db.py b/rhodecode/model/db.py --- a/rhodecode/model/db.py +++ b/rhodecode/model/db.py @@ -236,7 +236,7 @@ class BaseModel(object): # update with attributes from __json__ if callable(_json_attr): _json_attr = _json_attr() - for k, val in _json_attr.iteritems(): + for k, val in _json_attr.items(): d[k] = val return d diff --git a/rhodecode/model/validators.py b/rhodecode/model/validators.py --- a/rhodecode/model/validators.py +++ b/rhodecode/model/validators.py @@ -749,7 +749,7 @@ def ValidPerms(localizer, type_='repo'): # them by they IDs new_perms_group = collections.defaultdict(dict) del_perms_group = collections.defaultdict(dict) - for k, v in value.copy().iteritems(): + for k, v in value.copy().items(): if k.startswith('perm_del_member'): # delete from org storage so we don't process that later del value[k] @@ -792,7 +792,7 @@ def ValidPerms(localizer, type_='repo'): # (read the existing radio button states) default_user_id = User.get_default_user_id() - for k, update_value in value.iteritems(): + for k, update_value in value.items(): if k.startswith('u_perm_') or k.startswith('g_perm_'): obj_type = k[0] obj_id = k[7:] @@ -1072,7 +1072,7 @@ def ValidPattern(localizer): patterns = [] prefix = 'new_pattern' - for name, v in value.iteritems(): + for name, v in value.items(): pattern_name = '_'.join((prefix, 'pattern')) if name.startswith(pattern_name): new_item_id = name[len(pattern_name)+1:] diff --git a/rhodecode/templates/changeset/diff_block.mako b/rhodecode/templates/changeset/diff_block.mako --- a/rhodecode/templates/changeset/diff_block.mako +++ b/rhodecode/templates/changeset/diff_block.mako @@ -12,7 +12,7 @@ <%def name="diff_block_changeset_table(change)">
- %for FID,(cs1, cs2, change, filenode_path, diff, stats, file_data) in change.iteritems(): + %for FID,(cs1, cs2, change, filenode_path, diff, stats, file_data) in change.items():
diff --git a/rhodecode/tests/lib/middleware/utils/test_wsgi_app_caller_client.py b/rhodecode/tests/lib/middleware/utils/test_wsgi_app_caller_client.py --- a/rhodecode/tests/lib/middleware/utils/test_wsgi_app_caller_client.py +++ b/rhodecode/tests/lib/middleware/utils/test_wsgi_app_caller_client.py @@ -43,7 +43,7 @@ BASE_ENVIRON = { def assert_all_values_are_str(environ): """Checks that all values of a dict are str.""" - for key, value in environ.iteritems(): + for key, value in environ.items(): assert isinstance(value, str), ( "Value for key %s: has type %s but 'str' was expected. Value: %s" % (key, type(value), repr(value))) @@ -51,7 +51,7 @@ def assert_all_values_are_str(environ): def assert_all_keys_are_str(environ): """Checks that all keys of a dict are str.""" - for key, value in environ.iteritems(): + for key, value in environ.items(): assert isinstance(value, str), ( "Key %s: has type %s but 'str' was expected. " % (repr(key), type(key))) diff --git a/rhodecode/tests/vcs/test_commits.py b/rhodecode/tests/vcs/test_commits.py --- a/rhodecode/tests/vcs/test_commits.py +++ b/rhodecode/tests/vcs/test_commits.py @@ -181,11 +181,11 @@ class TestCommitsInNonEmptyRepo(BackendT assert idx == self.repo.get_commit(commit_idx=idx).idx def test_get_commit_by_branch(self): - for branch, commit_id in self.repo.branches.iteritems(): + for branch, commit_id in self.repo.branches.items(): assert commit_id == self.repo.get_commit(branch).raw_id def test_get_commit_by_tag(self): - for tag, commit_id in self.repo.tags.iteritems(): + for tag, commit_id in self.repo.tags.items(): assert commit_id == self.repo.get_commit(tag).raw_id def test_get_commit_parents(self):