This is an automated email from the ASF dual-hosted git repository.

kentontaylor pushed a commit to branch kt/8415
in repository https://gitbox.apache.org/repos/asf/allura.git


The following commit(s) were added to refs/heads/kt/8415 by this push:
     new 0f3492d  fixup! [#8415] py2 removal - removal of six.PY2 checks
0f3492d is described below

commit 0f3492d3cbd3f6c3cdaeb44667737a387902cdf6
Author: Kenton Taylor <[email protected]>
AuthorDate: Tue Mar 1 21:12:42 2022 +0000

    fixup! [#8415] py2 removal - removal of six.PY2 checks
---
 Allura/allura/controllers/basetest_project_root.py             | 2 +-
 Allura/allura/lib/utils.py                                     | 2 +-
 Allura/allura/tests/test_tasks.py                              | 2 +-
 Allura/allura/tests/test_webhooks.py                           | 2 +-
 ForgeDiscussion/forgediscussion/tests/functional/test_forum.py | 4 ++--
 ForgeTracker/forgetracker/tests/functional/test_root.py        | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/Allura/allura/controllers/basetest_project_root.py 
b/Allura/allura/controllers/basetest_project_root.py
index dc63048..7d382de 100644
--- a/Allura/allura/controllers/basetest_project_root.py
+++ b/Allura/allura/controllers/basetest_project_root.py
@@ -109,7 +109,7 @@ class BasetestProjectRootController(WsgiDispatchController, 
ProjectController):
 
     def _perform_call(self, context):
         """ Called from a WebTest 'app' instance, going through TurboGears 
dispatcher code
-        Example: self.app.get('/auth/', extra_environ={'disable_auth_magic': 
str("True")})
+        Example: self.app.get('/auth/', extra_environ={'disable_auth_magic': 
"True"})
         """
         environ = context.request.environ
         c.app = None
diff --git a/Allura/allura/lib/utils.py b/Allura/allura/lib/utils.py
index 987e497..f98cfc2 100644
--- a/Allura/allura/lib/utils.py
+++ b/Allura/allura/lib/utils.py
@@ -525,7 +525,7 @@ def serve_file(fp, filename, content_type, 
last_modified=None,
         from allura.lib import helpers as h
         tg.response.headers.add(
             'Content-Disposition',
-            str('attachment;filename="%s"' % h.urlquote(filename)))
+            'attachment;filename="%s"' % h.urlquote(filename))
     # http://code.google.com/p/modwsgi/wiki/FileWrapperExtension
     block_size = 4096
     if 'wsgi.file_wrapper' in tg.request.environ:
diff --git a/Allura/allura/tests/test_tasks.py 
b/Allura/allura/tests/test_tasks.py
index d35634e..b1b2215 100644
--- a/Allura/allura/tests/test_tasks.py
+++ b/Allura/allura/tests/test_tasks.py
@@ -591,7 +591,7 @@ def raise_exc():
     errs = []
     for x in range(10):
         try:
-            assert False, str('assert %d' % x)
+            assert False, 'assert %d' % x
         except Exception:
             errs.append(sys.exc_info())
     raise CompoundError(*errs)
diff --git a/Allura/allura/tests/test_webhooks.py 
b/Allura/allura/tests/test_webhooks.py
index d7b87d2..da3035f 100644
--- a/Allura/allura/tests/test_webhooks.py
+++ b/Allura/allura/tests/test_webhooks.py
@@ -678,7 +678,7 @@ class TestWebhookRestController(TestRestApiBase):
         self.setup_with_tools()
         self.project = M.Project.query.get(shortname=test_project_with_repo)
         self.git = self.project.app_instance('src')
-        self.url = str('/rest' + self.git.admin_url + 'webhooks')
+        self.url = '/rest' + self.git.admin_url + 'webhooks'
         self.webhooks = []
         for i in range(3):
             webhook = M.Webhook(
diff --git a/ForgeDiscussion/forgediscussion/tests/functional/test_forum.py 
b/ForgeDiscussion/forgediscussion/tests/functional/test_forum.py
index 941d07a..3bfd8b8 100644
--- a/ForgeDiscussion/forgediscussion/tests/functional/test_forum.py
+++ b/ForgeDiscussion/forgediscussion/tests/functional/test_forum.py
@@ -222,7 +222,7 @@ class TestForumMessageHandling(TestController):
     def test_threads(self):
         self._post('testforum', 'Test', 'test')
         thd = FM.ForumThread.query.find().first()
-        url = str('/discussion/testforum/thread/%s/' % thd._id)
+        url = '/discussion/testforum/thread/%s/' % thd._id
         self.app.get(url)
         # accessing a non-existent thread should return a 404
         self.app.get('/discussion/testforum/thread/foobar/', status=404)
@@ -232,7 +232,7 @@ class TestForumMessageHandling(TestController):
         c.user = M.User.by_username('test-admin')
         self._post('testforum', 'Test', 'test')
         thd = FM.ForumThread.query.find().first()
-        thd_url = str('/discussion/testforum/thread/%s/' % thd._id)
+        thd_url = '/discussion/testforum/thread/%s/' % thd._id
         r = self.app.get(thd_url)
         p = FM.ForumPost.query.find().first()
         url = str(f'/discussion/testforum/thread/{thd._id}/{p.slug}/')
diff --git a/ForgeTracker/forgetracker/tests/functional/test_root.py 
b/ForgeTracker/forgetracker/tests/functional/test_root.py
index 1ca515c..a5c8b23 100644
--- a/ForgeTracker/forgetracker/tests/functional/test_root.py
+++ b/ForgeTracker/forgetracker/tests/functional/test_root.py
@@ -377,7 +377,7 @@ class TestFunctionalController(TrackerTestController):
 
         # Private tickets shouldn't be included in counts if user doesn't
         # have read access to private tickets.
-        r = self.app.get('/bugs/bin_counts', 
extra_environ=dict(username=str('*anonymous')))
+        r = self.app.get('/bugs/bin_counts', 
extra_environ=dict(username='*anonymous'))
         assert_equal(r.json, {"bin_counts": [{"count": 1, "label": "Changes"},
                                              {"count": 0, "label": "Closed 
Tickets"},
                                              {"count": 1, "label": "Open 
Tickets"}]})

Reply via email to