diff --git a/reviewboard/hostingsvcs/admin.py b/reviewboard/hostingsvcs/admin.py
index fa39e250efd1c2798907b28f37a4c0d4c8dfcf0d..9461d1935756dc61aa434a52b050540f274c8aa5 100644
--- a/reviewboard/hostingsvcs/admin.py
+++ b/reviewboard/hostingsvcs/admin.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
 from django.contrib import admin
 
 from reviewboard.hostingsvcs.models import HostingServiceAccount
diff --git a/reviewboard/hostingsvcs/beanstalk.py b/reviewboard/hostingsvcs/beanstalk.py
index 7b7dd0a5f8b1eb7703031c9ec3faa58fe9aa5a32..a54059c71dec35d0f8ed6e4b432b24e3d69ed050 100644
--- a/reviewboard/hostingsvcs/beanstalk.py
+++ b/reviewboard/hostingsvcs/beanstalk.py
@@ -1,8 +1,11 @@
+from __future__ import unicode_literals
+
 import json
 import os
 
 from django import forms
 from django.utils.translation import ugettext_lazy as _
+from djblets.util.compat import six
 from djblets.util.compat.six.moves.urllib.error import HTTPError, URLError
 from djblets.util.compat.six.moves.urllib.parse import quote
 
@@ -169,4 +172,4 @@ class Beanstalk(HostingService):
             if rsp and 'errors' in rsp:
                 raise Exception('; '.join(rsp['errors']))
             else:
-                raise Exception(str(e))
+                raise Exception(six.text_type(e))
diff --git a/reviewboard/hostingsvcs/bitbucket.py b/reviewboard/hostingsvcs/bitbucket.py
index df4e28688adccea5ace2efdfc914e3375570d1ee..548791428519f16097e144f20eafdb96ae05f592 100644
--- a/reviewboard/hostingsvcs/bitbucket.py
+++ b/reviewboard/hostingsvcs/bitbucket.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
 import json
 
 from django import forms
diff --git a/reviewboard/hostingsvcs/bugzilla.py b/reviewboard/hostingsvcs/bugzilla.py
index 06abda4d36c11741da079362d04ec9c5adc71be3..29dbce14c20d8ee2bbaed246462f9f15cd17906d 100644
--- a/reviewboard/hostingsvcs/bugzilla.py
+++ b/reviewboard/hostingsvcs/bugzilla.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
 from django import forms
 from django.utils.translation import ugettext_lazy as _
 
diff --git a/reviewboard/hostingsvcs/codebasehq.py b/reviewboard/hostingsvcs/codebasehq.py
index 9383a4d0692f58d04e81c6ec950b235b416a49ff..06acb44cad214d6ab3592e73070b021b1c980cf1 100644
--- a/reviewboard/hostingsvcs/codebasehq.py
+++ b/reviewboard/hostingsvcs/codebasehq.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
 from django import forms
 from django.utils.translation import ugettext_lazy as _
 
diff --git a/reviewboard/hostingsvcs/errors.py b/reviewboard/hostingsvcs/errors.py
index 60af0deae521ddc6bb0df53d9d0367a96312bf34..ec40aa6e150d9fc25212a416d9a3be87a3ba872b 100644
--- a/reviewboard/hostingsvcs/errors.py
+++ b/reviewboard/hostingsvcs/errors.py
@@ -1,3 +1,6 @@
+from __future__ import unicode_literals
+
+
 class HostingServiceError(Exception):
     """Base class for errors related to a hosting service."""
     pass
diff --git a/reviewboard/hostingsvcs/evolutions/__init__.py b/reviewboard/hostingsvcs/evolutions/__init__.py
index 2f344cef625241a5722cd9e597ae23a4b31d0c82..202d27833df68e4b6a14cca8de3edfbee6b87621 100644
--- a/reviewboard/hostingsvcs/evolutions/__init__.py
+++ b/reviewboard/hostingsvcs/evolutions/__init__.py
@@ -1,3 +1,6 @@
+from __future__ import unicode_literals
+
+
 SEQUENCE = [
     'account_hosting_url',
     'account_hosting_url_max_length_255',
diff --git a/reviewboard/hostingsvcs/evolutions/account_hosting_url.py b/reviewboard/hostingsvcs/evolutions/account_hosting_url.py
index 59ecc66c5651e85ddedfcbc82fb3b5ab4737a25e..2b3dd519acf84683364becc1ba2292fe93eb2150 100644
--- a/reviewboard/hostingsvcs/evolutions/account_hosting_url.py
+++ b/reviewboard/hostingsvcs/evolutions/account_hosting_url.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
 from django_evolution.mutations import AddField
 from django.db import models
 
diff --git a/reviewboard/hostingsvcs/evolutions/account_hosting_url_max_length_255.py b/reviewboard/hostingsvcs/evolutions/account_hosting_url_max_length_255.py
index ba0bd1b4ae1e7a14b8d11a83586fcfe4f704f440..3524f66086d6902268a5be3b6b4baf1a85b983fe 100644
--- a/reviewboard/hostingsvcs/evolutions/account_hosting_url_max_length_255.py
+++ b/reviewboard/hostingsvcs/evolutions/account_hosting_url_max_length_255.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
 from django_evolution.mutations import ChangeField
 
 
diff --git a/reviewboard/hostingsvcs/fedorahosted.py b/reviewboard/hostingsvcs/fedorahosted.py
index 267fbfe0643427a759ec1862b3df4adb8fd79ddc..d5e78b6e5f899a515acce702b615bab5f9a995ec 100644
--- a/reviewboard/hostingsvcs/fedorahosted.py
+++ b/reviewboard/hostingsvcs/fedorahosted.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
 from django import forms
 from django.utils.translation import ugettext_lazy as _
 
@@ -40,5 +42,5 @@ class FedoraHosted(HostingService):
                            '%(fedorahosted_repo_name)s/',
         },
     }
-    bug_tracker_field = 'https://fedorahosted.org/%(fedorahosted_repo_name)s' \
-                        '/ticket/%%s'
+    bug_tracker_field = \
+        'https://fedorahosted.org/%(fedorahosted_repo_name)s/ticket/%%s'
diff --git a/reviewboard/hostingsvcs/forms.py b/reviewboard/hostingsvcs/forms.py
index c5a3ccebbc65d64d35d4263d0618d79933063313..172650ba92e243d75cdf114cc16324001605d935 100644
--- a/reviewboard/hostingsvcs/forms.py
+++ b/reviewboard/hostingsvcs/forms.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
 from django import forms
 from django.utils import six
 
diff --git a/reviewboard/hostingsvcs/github.py b/reviewboard/hostingsvcs/github.py
index ed13aa654fe624745a5ee2c7a6abe480e2082c27..07be040c08d9c99d4bd67d67cd42f8892e061aba 100644
--- a/reviewboard/hostingsvcs/github.py
+++ b/reviewboard/hostingsvcs/github.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
 import json
 import logging
 
@@ -7,6 +9,7 @@ from django.contrib.sites.models import Site
 from django.core.cache import cache
 from django.utils.translation import ugettext_lazy as _
 from djblets.siteconfig.models import SiteConfiguration
+from djblets.util.compat import six
 from djblets.util.compat.six.moves import http_client
 from djblets.util.compat.six.moves.urllib.error import HTTPError, URLError
 
@@ -191,7 +194,7 @@ class GitHub(HostingService):
                 self._get_repository_owner_raw(plan, kwargs),
                 self._get_repository_name_raw(plan, kwargs))
         except Exception as e:
-            if str(e) == 'Not Found':
+            if six.text_type(e) == 'Not Found':
                 if plan in ('public', 'private'):
                     raise RepositoryError(
                         _('A repository with this name was not found, or your '
@@ -266,7 +269,7 @@ class GitHub(HostingService):
             if rsp and 'message' in rsp:
                 raise AuthorizationError(rsp['message'])
             else:
-                raise AuthorizationError(str(e))
+                raise AuthorizationError(six.text_type(e))
 
         self.account.data['authorization'] = rsp
         self.account.save()
@@ -486,7 +489,7 @@ class GitHub(HostingService):
 
     def _get_repo_api_url_raw(self, owner, repo_name):
         return '%srepos/%s/%s' % (self.get_api_url(self.account.hosting_url),
-                                   owner, repo_name)
+                                  owner, repo_name)
 
     def _get_repository_owner_raw(self, plan, extra_data):
         if plan in ('public', 'private'):
@@ -518,4 +521,4 @@ class GitHub(HostingService):
             if rsp and 'message' in rsp:
                 raise Exception(rsp['message'])
             else:
-                raise Exception(str(e))
+                raise Exception(six.text_type(e))
diff --git a/reviewboard/hostingsvcs/gitorious.py b/reviewboard/hostingsvcs/gitorious.py
index 4a15cccb410f00e5235218141ea95a9f0e0668f0..856e5259bdfcebc1247322b34af019832876bb51 100644
--- a/reviewboard/hostingsvcs/gitorious.py
+++ b/reviewboard/hostingsvcs/gitorious.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
 from django import forms
 from django.utils.translation import ugettext_lazy as _
 
diff --git a/reviewboard/hostingsvcs/googlecode.py b/reviewboard/hostingsvcs/googlecode.py
index be3109ea3c65c9537c9cc99efc8dbedef14e5657..88376994de2a6139209173e83ee1247a72bd73bb 100644
--- a/reviewboard/hostingsvcs/googlecode.py
+++ b/reviewboard/hostingsvcs/googlecode.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
 from django import forms
 from django.utils.translation import ugettext_lazy as _
 
diff --git a/reviewboard/hostingsvcs/managers.py b/reviewboard/hostingsvcs/managers.py
index 97c0cdfac5a5e1a6bbf3190e624dad17f3ed471a..1f38e1ee05d16cf175a25ebf0d32dea0cd3b9f54 100644
--- a/reviewboard/hostingsvcs/managers.py
+++ b/reviewboard/hostingsvcs/managers.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
 from django.db.models import Manager
 
 
diff --git a/reviewboard/hostingsvcs/models.py b/reviewboard/hostingsvcs/models.py
index 0211521b0a220b57414b1f6103f726c6aeedef39..fae04ddc4c27f6a1c0422a54b8f2213ba9d73618 100644
--- a/reviewboard/hostingsvcs/models.py
+++ b/reviewboard/hostingsvcs/models.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
 from django.db import models
 from django.utils.encoding import python_2_unicode_compatible
 from django.utils.translation import ugettext_lazy as _
diff --git a/reviewboard/hostingsvcs/redmine.py b/reviewboard/hostingsvcs/redmine.py
index 2b637c4c90da214f46acf6c2402d2fef26831cae..c2bd9de5d7f93a14c568cdab308646c7fc9741eb 100644
--- a/reviewboard/hostingsvcs/redmine.py
+++ b/reviewboard/hostingsvcs/redmine.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
 from django import forms
 from django.utils.translation import ugettext_lazy as _
 
diff --git a/reviewboard/hostingsvcs/service.py b/reviewboard/hostingsvcs/service.py
index 034c2f948022e3c27b5ed82014091ed3c11e002a..1c75f5a400cb83e021a0d8c317c36e5327c8c003 100644
--- a/reviewboard/hostingsvcs/service.py
+++ b/reviewboard/hostingsvcs/service.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
 import base64
 import json
 import logging
@@ -252,7 +254,7 @@ class HostingService(object):
         if content_type:
             headers['Content-Type'] = content_type
 
-        headers['Content-Length'] = str(len(body))
+        headers['Content-Length'] = '%d' % len(body)
 
         return self._http_request(url, body, headers, **kwargs)
 
@@ -261,9 +263,10 @@ class HostingService(object):
         r = URLRequest(url, body, headers)
 
         if username is not None and password is not None:
+            auth_key = username + ':' + password
             r.add_header(HTTPBasicAuthHandler.auth_header,
-                         'Basic %s' % base64.b64encode(username + ':' +
-                                                       password))
+                         'Basic %s' %
+                         base64.b64encode(auth_key.encode('utf-8')))
 
         return r
 
@@ -282,7 +285,7 @@ class HostingService(object):
             content += "--" + BOUNDARY + "\r\n"
             content += "Content-Disposition: form-data; name=\"%s\"\r\n" % key
             content += "\r\n"
-            content += str(fields[key]) + "\r\n"
+            content += six.text_type(fields[key]) + "\r\n"
 
         for key in files:
             filename = files[key]['filename']
diff --git a/reviewboard/hostingsvcs/sourceforge.py b/reviewboard/hostingsvcs/sourceforge.py
index 0466589f42bcf115194f1db93cfa68059897be9e..a9666fd44839ba5c7c1583d91880ba68a76d13d8 100644
--- a/reviewboard/hostingsvcs/sourceforge.py
+++ b/reviewboard/hostingsvcs/sourceforge.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
 from django import forms
 from django.utils.translation import ugettext_lazy as _
 
diff --git a/reviewboard/hostingsvcs/tests.py b/reviewboard/hostingsvcs/tests.py
index be9c99945345b7384f52e062d269b2cddcfccf3b..dc0f60ba10c2c77829379a72fdbc1ba419862452 100644
--- a/reviewboard/hostingsvcs/tests.py
+++ b/reviewboard/hostingsvcs/tests.py
@@ -1,10 +1,11 @@
-from __future__ import print_function
+from __future__ import print_function, unicode_literals
 
 import json
 from hashlib import md5
 from textwrap import dedent
 
 from django.contrib.sites.models import Site
+from djblets.util.compat import six
 from djblets.util.compat.six.moves import cStringIO as StringIO
 from djblets.util.compat.six.moves.urllib.error import HTTPError
 from djblets.util.compat.six.moves.urllib.parse import urlparse
@@ -267,7 +268,7 @@ class BeanstalkTests(ServiceTests):
             self.assertEqual(url, expected_url)
 
             if expected_found:
-                return '{}', {}
+                return b'{}', {}
             else:
                 raise HTTPError()
 
@@ -345,7 +346,7 @@ class BitbucketTests(ServiceTests):
             self.assertEqual(
                 url,
                 'https://bitbucket.org/api/1.0/repositories/myuser/myrepo')
-            return '{}', {}
+            return b'{}', {}
 
         account = self._get_hosting_account()
         service = account.service
@@ -405,7 +406,7 @@ class BitbucketTests(ServiceTests):
             self.assertEqual(
                 url,
                 'https://bitbucket.org/api/1.0/repositories/myteam/myrepo')
-            return '{}', {}
+            return b'{}', {}
 
         account = self._get_hosting_account()
         service = account.service
@@ -511,7 +512,7 @@ class BitbucketTests(ServiceTests):
                 'https://bitbucket.org/api/1.0/repositories/'
                 'myuser/myrepo/raw/%s/path'
                 % expected_revision)
-            return 'My data', {}
+            return b'My data', {}
 
         account = self._get_hosting_account()
         service = account.service
@@ -541,7 +542,7 @@ class BitbucketTests(ServiceTests):
                 % expected_revision)
 
             if expected_found:
-                return '{}', {}
+                return b'{}', {}
             else:
                 raise HTTPError()
 
@@ -813,7 +814,7 @@ class GitHubTests(ServiceTests):
             plan='public',
             github_public_repo_name='myrepo',
             http_status=404,
-            payload='{"message": "Not Found"}',
+            payload=b'{"message": "Not Found"}',
             expected_error='A repository with this name was not found, '
                            'or your user may not own it.')
 
@@ -824,7 +825,7 @@ class GitHubTests(ServiceTests):
             plan='private',
             github_private_repo_name='myrepo',
             http_status=404,
-            payload='{"message": "Not Found"}',
+            payload=b'{"message": "Not Found"}',
             expected_error='A repository with this name was not found, '
                            'or your user may not own it.')
 
@@ -836,7 +837,7 @@ class GitHubTests(ServiceTests):
             github_public_org_name='myorg',
             github_public_org_repo_name='myrepo',
             http_status=404,
-            payload='{"message": "Not Found"}',
+            payload=b'{"message": "Not Found"}',
             expected_error='A repository with this organization or name '
                            'was not found.')
 
@@ -848,7 +849,7 @@ class GitHubTests(ServiceTests):
             github_private_org_name='myorg',
             github_private_org_repo_name='myrepo',
             http_status=404,
-            payload='{"message": "Not Found"}',
+            payload=b'{"message": "Not Found"}',
             expected_error='A repository with this organization or name '
                            'was not found, or your user may not have access '
                            'to it.')
@@ -860,7 +861,7 @@ class GitHubTests(ServiceTests):
             plan='public',
             github_public_repo_name='myrepo',
             http_status=200,
-            payload='{"private": true}',
+            payload=b'{"private": true}',
             expected_error='This is a private repository, but you have '
                            'selected a public plan.')
 
@@ -871,7 +872,7 @@ class GitHubTests(ServiceTests):
             plan='private',
             github_private_repo_name='myrepo',
             http_status=200,
-            payload='{"private": false}',
+            payload=b'{"private": false}',
             expected_error='This is a public repository, but you have '
                            'selected a private plan.')
 
@@ -883,7 +884,7 @@ class GitHubTests(ServiceTests):
             github_public_org_name='myorg',
             github_public_org_repo_name='myrepo',
             http_status=200,
-            payload='{"private": true}',
+            payload=b'{"private": true}',
             expected_error='This is a private repository, but you have '
                            'selected a public plan.')
 
@@ -895,7 +896,7 @@ class GitHubTests(ServiceTests):
             github_private_org_name='myorg',
             github_private_org_repo_name='myrepo',
             http_status=200,
-            payload='{"private": false}',
+            payload=b'{"private": false}',
             expected_error='This is a public repository, but you have '
                            'selected a private plan.')
 
@@ -1236,7 +1237,7 @@ class GitHubTests(ServiceTests):
         change = service.get_change(repository, commit_sha)
 
         self.assertEqual(change.message, 'Move .clearfix to defs.less')
-        self.assertEqual(md5(change.diff).hexdigest(),
+        self.assertEqual(md5(change.diff.encode('utf-8')).hexdigest(),
                          '5f63bd4f1cd8c4d8b46f2f72ea8d33bc')
 
     def _test_check_repository(self, expected_user='myuser', **kwargs):
@@ -1245,7 +1246,7 @@ class GitHubTests(ServiceTests):
                 url,
                 'https://api.github.com/repos/%s/myrepo?access_token=123'
                 % expected_user)
-            return '{}', {}
+            return b'{}', {}
 
         account = self._get_hosting_account()
         service = account.service
@@ -1276,7 +1277,7 @@ class GitHubTests(ServiceTests):
             service.check_repository(**kwargs)
             saw_exception = False
         except Exception as e:
-            self.assertEqual(unicode(e), expected_error)
+            self.assertEqual(six.text_type(e), expected_error)
             saw_exception = True
 
         self.assertTrue(saw_exception)
diff --git a/reviewboard/hostingsvcs/trac.py b/reviewboard/hostingsvcs/trac.py
index 088d72c8646a7faaedc02ab7022e1d1fb35412ab..0153ffd1357e23faee6d6bdf3bb6f596c286e93a 100644
--- a/reviewboard/hostingsvcs/trac.py
+++ b/reviewboard/hostingsvcs/trac.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
 from django import forms
 from django.utils.translation import ugettext_lazy as _
 
diff --git a/reviewboard/hostingsvcs/versionone.py b/reviewboard/hostingsvcs/versionone.py
index 8da0a0fe75a1348f34ebf6e7d9d38c493804bb24..af4fa41d56261d07907dce0e0a0cc1fae80a1e4b 100644
--- a/reviewboard/hostingsvcs/versionone.py
+++ b/reviewboard/hostingsvcs/versionone.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
 from django import forms
 from django.utils.translation import ugettext_lazy as _
 
