diff --git a/rhodecode/apps/login/tests/test_login.py b/rhodecode/apps/login/tests/test_login.py --- a/rhodecode/apps/login/tests/test_login.py +++ b/rhodecode/apps/login/tests/test_login.py @@ -196,7 +196,7 @@ class TestLoginController(object): response = self.app.post( route_path('login'), {'username': user.username, - 'password': password.encode('utf-8')}) + 'password': password}) assert response.status_code == 302 def test_login_wrong_username_password(self): 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 @@ -340,8 +340,6 @@ class GitCommit(base.BaseCommit): return nodes def get_node(self, path, pre_load=None): - if isinstance(path, unicode): - path = path.encode('utf-8') path = self._fix_path(path) if path not in self.nodes: try: diff --git a/rhodecode/lib/vcs/backends/hg/inmemory.py b/rhodecode/lib/vcs/backends/hg/inmemory.py --- a/rhodecode/lib/vcs/backends/hg/inmemory.py +++ b/rhodecode/lib/vcs/backends/hg/inmemory.py @@ -49,11 +49,12 @@ class MercurialInMemoryCommit(BaseInMemo """ self.check_integrity(parents) - if not isinstance(message, unicode) or not isinstance(author, unicode): + if not isinstance(message, str) or not isinstance(author, str): # TODO: johbo: Should be a TypeError - raise RepositoryError('Given message and author needs to be ' - 'an instance got %r & %r instead' - % (type(message), type(author))) + raise RepositoryError( + f'Given message and author needs to be ' + f'an instance got {type(message)} & {type(author)} instead' + ) if branch is None: branch = self.repository.DEFAULT_BRANCH_NAME diff --git a/rhodecode/lib/vcs/backends/hg/repository.py b/rhodecode/lib/vcs/backends/hg/repository.py --- a/rhodecode/lib/vcs/backends/hg/repository.py +++ b/rhodecode/lib/vcs/backends/hg/repository.py @@ -959,7 +959,7 @@ class MercurialRepository(BaseRepository self._remote.invalidate_vcs_cache() def bookmark(self, bookmark, revision=None): - if isinstance(bookmark, unicode): + if isinstance(bookmark, str): bookmark = safe_str(bookmark) self._remote.bookmark(bookmark, revision=revision) self._remote.invalidate_vcs_cache() diff --git a/rhodecode/lib/vcs/backends/svn/commit.py b/rhodecode/lib/vcs/backends/svn/commit.py --- a/rhodecode/lib/vcs/backends/svn/commit.py +++ b/rhodecode/lib/vcs/backends/svn/commit.py @@ -207,7 +207,7 @@ class SubversionCommit(base.BaseCommit): @LazyProperty def affected_files(self): changed_files = set() - for files in self._changes_cache.itervalues(): + for files in self._changes_cache.values(): changed_files.update(files) return list(changed_files) diff --git a/rhodecode/tests/rhodecode.ini b/rhodecode/tests/rhodecode.ini --- a/rhodecode/tests/rhodecode.ini +++ b/rhodecode/tests/rhodecode.ini @@ -458,7 +458,6 @@ sqlalchemy.db1.echo = false ; recycle the connections after this amount of seconds sqlalchemy.db1.pool_recycle = 3600 -sqlalchemy.db1.convert_unicode = true ; the number of connections to keep open inside the connection pool. ; 0 indicates no limit