##// END OF EJS Templates
python3: more unicode fixes
super-admin -
r4961:f77d0ff9 default
parent child Browse files
Show More
@@ -196,7 +196,7 b' class TestLoginController(object):'
196 196 response = self.app.post(
197 197 route_path('login'),
198 198 {'username': user.username,
199 'password': password.encode('utf-8')})
199 'password': password})
200 200 assert response.status_code == 302
201 201
202 202 def test_login_wrong_username_password(self):
@@ -340,8 +340,6 b' class GitCommit(base.BaseCommit):'
340 340 return nodes
341 341
342 342 def get_node(self, path, pre_load=None):
343 if isinstance(path, unicode):
344 path = path.encode('utf-8')
345 343 path = self._fix_path(path)
346 344 if path not in self.nodes:
347 345 try:
@@ -49,11 +49,12 b' class MercurialInMemoryCommit(BaseInMemo'
49 49 """
50 50 self.check_integrity(parents)
51 51
52 if not isinstance(message, unicode) or not isinstance(author, unicode):
52 if not isinstance(message, str) or not isinstance(author, str):
53 53 # TODO: johbo: Should be a TypeError
54 raise RepositoryError('Given message and author needs to be '
55 'an <unicode> instance got %r & %r instead'
56 % (type(message), type(author)))
54 raise RepositoryError(
55 f'Given message and author needs to be '
56 f'an <str> instance got {type(message)} & {type(author)} instead'
57 )
57 58
58 59 if branch is None:
59 60 branch = self.repository.DEFAULT_BRANCH_NAME
@@ -959,7 +959,7 b' class MercurialRepository(BaseRepository'
959 959 self._remote.invalidate_vcs_cache()
960 960
961 961 def bookmark(self, bookmark, revision=None):
962 if isinstance(bookmark, unicode):
962 if isinstance(bookmark, str):
963 963 bookmark = safe_str(bookmark)
964 964 self._remote.bookmark(bookmark, revision=revision)
965 965 self._remote.invalidate_vcs_cache()
@@ -207,7 +207,7 b' class SubversionCommit(base.BaseCommit):'
207 207 @LazyProperty
208 208 def affected_files(self):
209 209 changed_files = set()
210 for files in self._changes_cache.itervalues():
210 for files in self._changes_cache.values():
211 211 changed_files.update(files)
212 212 return list(changed_files)
213 213
@@ -458,7 +458,6 b' sqlalchemy.db1.echo = false'
458 458
459 459 ; recycle the connections after this amount of seconds
460 460 sqlalchemy.db1.pool_recycle = 3600
461 sqlalchemy.db1.convert_unicode = true
462 461
463 462 ; the number of connections to keep open inside the connection pool.
464 463 ; 0 indicates no limit
General Comments 0
You need to be logged in to leave comments. Login now