← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:pyupgrade-py3-soyuz into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:pyupgrade-py3-soyuz into launchpad:master.

Commit message:
lp.soyuz: Apply "pyupgrade --py3-plus"

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/413916
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:pyupgrade-py3-soyuz into launchpad:master.
diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs
index c6458be..7b39f1f 100644
--- a/.git-blame-ignore-revs
+++ b/.git-blame-ignore-revs
@@ -42,3 +42,5 @@ fbed83f22424df8fa5647349493f78937a520db5
 f3f15787ebabe305fbf3e3ae6c0fd8ca7dfb4465
 # apply pyupgrade --py3-plus to lp.snappy
 2cda038936743a2f9271953c23b9fcc98968db63
+# apply pyupgrade --py3-plus to lp.soyuz
+21fb5364d9371c0ad2edf41fa6920c4e16ead2b0
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index d70d934..d969ed2 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -56,6 +56,7 @@ repos:
             |scripts
             |services
             |snappy
+            |soyuz
           )/
 -   repo: https://github.com/PyCQA/isort
     rev: 5.9.2
diff --git a/lib/lp/soyuz/adapters/overrides.py b/lib/lp/soyuz/adapters/overrides.py
index 3f93f64..f78c769 100644
--- a/lib/lp/soyuz/adapters/overrides.py
+++ b/lib/lp/soyuz/adapters/overrides.py
@@ -127,7 +127,7 @@ class BinaryOverride(Override):
     def __init__(self, component=None, section=None, priority=None,
                  phased_update_percentage=None, version=None, new=None,
                  source_override=None):
-        super(BinaryOverride, self).__init__(
+        super().__init__(
             component=component, section=section, version=version, new=new)
         self.priority = priority
         self.phased_update_percentage = phased_update_percentage
@@ -201,7 +201,7 @@ class BaseOverridePolicy:
 
     def __init__(self, archive, distroseries, pocket,
                  phased_update_percentage=None):
-        super(BaseOverridePolicy, self).__init__()
+        super().__init__()
         self.archive = archive
         self.distroseries = distroseries
         self.pocket = pocket
@@ -226,7 +226,7 @@ class FromExistingOverridePolicy(BaseOverridePolicy):
     def __init__(self, *args, **kwargs):
         self.any_arch = kwargs.pop('any_arch', False)
         self.include_deleted = kwargs.pop('include_deleted', False)
-        super(FromExistingOverridePolicy, self).__init__(*args, **kwargs)
+        super().__init__(*args, **kwargs)
 
     def getExistingPublishingStatuses(self, include_deleted):
         status = list(active_publishing_status)
diff --git a/lib/lp/soyuz/adapters/tests/test_archivedependencies.py b/lib/lp/soyuz/adapters/tests/test_archivedependencies.py
index a6374a5..5f49b53 100644
--- a/lib/lp/soyuz/adapters/tests/test_archivedependencies.py
+++ b/lib/lp/soyuz/adapters/tests/test_archivedependencies.py
@@ -139,7 +139,7 @@ class TestSourcesList(TestCaseWithFactory):
         }
 
     def setUp(self):
-        super(TestSourcesList, self).setUp()
+        super().setUp()
         self.publisher = SoyuzTestPublisher()
         self.ubuntu = getUtility(IDistributionSet).getByName("ubuntu")
         self.hoary = self.ubuntu.getSeries("hoary")
diff --git a/lib/lp/soyuz/adapters/tests/test_buildarch.py b/lib/lp/soyuz/adapters/tests/test_buildarch.py
index 1427127..50d7bc3 100644
--- a/lib/lp/soyuz/adapters/tests/test_buildarch.py
+++ b/lib/lp/soyuz/adapters/tests/test_buildarch.py
@@ -17,7 +17,7 @@ from lp.testing.fixture import CaptureTimeline
 class TestDpkgArchitectureCache(TestCase):
 
     def setUp(self):
-        super(TestDpkgArchitectureCache, self).setUp()
+        super().setUp()
         self.timeline = self.useFixture(CaptureTimeline()).timeline
 
     def assertTimeline(self, expected_details):
diff --git a/lib/lp/soyuz/adapters/tests/test_packagelocation.py b/lib/lp/soyuz/adapters/tests/test_packagelocation.py
index 62ac744..3d45f14 100644
--- a/lib/lp/soyuz/adapters/tests/test_packagelocation.py
+++ b/lib/lp/soyuz/adapters/tests/test_packagelocation.py
@@ -84,8 +84,8 @@ class TestPackageLocation(TestCaseWithFactory):
         self.assertEqual([], location.packagesets)
 
     def testSetupLocationWithPackagesets(self):
-        packageset_name1 = u"foo-packageset"
-        packageset_name2 = u"bar-packageset"
+        packageset_name1 = "foo-packageset"
+        packageset_name2 = "bar-packageset"
         packageset1 = self.factory.makePackageset(name=packageset_name1)
         packageset2 = self.factory.makePackageset(name=packageset_name2)
         location = self.getPackageLocation(
@@ -138,17 +138,17 @@ class TestPackageLocation(TestCaseWithFactory):
             PackageLocationError,
             self.getPackageLocation,
             distribution_name='debian',
-            packageset_names=[u"unknown"])
+            packageset_names=["unknown"])
 
     def test_build_package_location_when_one_packageset_unknown(self):
         """Test that with one of two packagesets unknown."""
-        packageset_name = u"foo-packageset"
+        packageset_name = "foo-packageset"
         self.factory.makePackageset(name=packageset_name)
         self.assertRaises(
             PackageLocationError,
             self.getPackageLocation,
             distribution_name='debian',
-            packageset_names=[packageset_name, u"unknown"])
+            packageset_names=[packageset_name, "unknown"])
 
     def testSetupLocationPPANotMatchingDistribution(self):
         """`PackageLocationError` is raised when PPA does not match the
@@ -247,9 +247,9 @@ class TestPackageLocation(TestCaseWithFactory):
         self.assertEqual(
             str(location_ubuntu_partner), 'ubuntu/partner: hoary-RELEASE')
 
-        self.factory.makePackageset(name=u"foo-packageset")
+        self.factory.makePackageset(name="foo-packageset")
         location_ubuntu_packageset = self.getPackageLocation(
-            packageset_names=[u"foo-packageset"])
+            packageset_names=["foo-packageset"])
         self.assertEqual(
             str(location_ubuntu_packageset),
             'ubuntu: hoary-RELEASE [foo-packageset]')
diff --git a/lib/lp/soyuz/browser/archive.py b/lib/lp/soyuz/browser/archive.py
index 05066a0..90c5b6e 100644
--- a/lib/lp/soyuz/browser/archive.py
+++ b/lib/lp/soyuz/browser/archive.py
@@ -218,7 +218,7 @@ class DistributionArchiveURL:
 
     @property
     def path(self):
-        return u"+archive/%s" % self.context.name
+        return "+archive/%s" % self.context.name
 
 
 @implementer(ICanonicalUrlData)
@@ -235,7 +235,7 @@ class PPAURL:
 
     @property
     def path(self):
-        return u"+archive/%s/%s" % (
+        return "+archive/%s/%s" % (
             self.context.distribution.name, self.context.name)
 
 
@@ -651,7 +651,7 @@ class ArchiveViewBase(LaunchpadView, SourcesListEntriesWidget):
                     " Since this archive is private, no builds are "
                     "being dispatched.")
             self.request.response.addNotification(structured(notification))
-        super(ArchiveViewBase, self).initialize()
+        super().initialize()
         # Set properties for SourcesListEntriesWidget.
         self.archive = self.context
         self.sources_list_user = self.user
@@ -948,7 +948,7 @@ class ArchiveView(ArchiveSourcePackageListViewBase):
             self.request.response.redirect(
                 canonical_url(self.context.distribution))
             return
-        super(ArchiveView, self).initialize()
+        super().initialize()
 
     @property
     def displayname_edit_widget(self):
@@ -1150,7 +1150,7 @@ class ArchiveSourceSelectionFormView(ArchiveSourcePackageListViewBase):
         # batched_sources) but this itself requires the current values of
         # the filtering widgets. So we setup the widgets, then add the
         # extra field and create its widget too.
-        super(ArchiveSourceSelectionFormView, self).setUpWidgets()
+        super().setUpWidgets()
 
         self.form_fields += self.createSelectedSourcesField()
 
@@ -2116,12 +2116,12 @@ class ArchiveEditView(BaseArchiveEditView, EnableProcessorsMixin):
 
         See `createEnabledProcessors` method.
         """
-        super(ArchiveEditView, self).setUpFields()
+        super().setUpFields()
         self.form_fields += self.createEnabledProcessors(
             self.context.available_processors,
-            u"The architectures on which the archive can build. Some "
-            u"architectures are restricted and may only be enabled or "
-            u"disabled by administrators.")
+            "The architectures on which the archive can build. Some "
+            "architectures are restricted and may only be enabled or "
+            "disabled by administrators.")
 
     def validate(self, data):
         if 'processors' in data:
@@ -2161,7 +2161,7 @@ class ArchiveAdminView(BaseArchiveEditView, EnableProcessorsMixin):
 
     def validate_save(self, action, data):
         """Validate the save action on ArchiveAdminView."""
-        super(ArchiveAdminView, self).validate_save(action, data)
+        super().validate_save(action, data)
 
         if data.get('private') != self.context.private:
             # The privacy is being switched.
diff --git a/lib/lp/soyuz/browser/archivepermission.py b/lib/lp/soyuz/browser/archivepermission.py
index 4459fc1..dde0672 100644
--- a/lib/lp/soyuz/browser/archivepermission.py
+++ b/lib/lp/soyuz/browser/archivepermission.py
@@ -56,4 +56,4 @@ class ArchivePermissionURL:
                 "One of component, sourcepackagename or package set should "
                 "be set")
 
-        return u"%s/%s?%s" % (perm_type, username, item)
+        return "%s/%s?%s" % (perm_type, username, item)
diff --git a/lib/lp/soyuz/browser/archivesubscription.py b/lib/lp/soyuz/browser/archivesubscription.py
index 24059a3..8cff69b 100644
--- a/lib/lp/soyuz/browser/archivesubscription.py
+++ b/lib/lp/soyuz/browser/archivesubscription.py
@@ -149,7 +149,7 @@ class ArchiveSubscribersView(LaunchpadFormView):
                 canonical_url(self.context))
             return
 
-        super(ArchiveSubscribersView, self).initialize()
+        super().initialize()
         subscription_set = getUtility(IArchiveSubscriberSet)
         self.subscriptions = subscription_set.getByArchive(self.context)
         self.batchnav = BatchNavigator(
@@ -207,7 +207,7 @@ class ArchiveSubscribersView(LaunchpadFormView):
                 self.setFieldError('date_expires',
                     "The expiry date must be in the future.")
 
-    @action(u"Add", name="add",
+    @action("Add", name="add",
             validator="validate_new_subscription")
     def create_subscription(self, action, data):
         """Create a subscription for the supplied user."""
@@ -272,7 +272,7 @@ class ArchiveSubscriptionEditView(LaunchpadEditFormView):
                     "The expiry date must be in the future.")
 
     @action(
-        u'Save', name='update', validator="validate_update_subscription")
+        'Save', name='update', validator="validate_update_subscription")
     def update_subscription(self, action, data):
         """Update the context subscription with the new data."""
         # As we present a date selection to the user for expiry, we
@@ -292,7 +292,7 @@ class ArchiveSubscriptionEditView(LaunchpadEditFormView):
             self.context.subscriber.displayname)
         self.request.response.addNotification(notification)
 
-    @action(u'Revoke access', name='cancel')
+    @action('Revoke access', name='cancel')
     def cancel_subscription(self, action, data):
         """Cancel the context subscription."""
         self.context.cancel(self.user)
@@ -371,7 +371,7 @@ class PersonArchiveSubscriptionView(LaunchpadView, SourcesListEntriesWidget):
 
     def initialize(self):
         """Process any posted actions."""
-        super(PersonArchiveSubscriptionView, self).initialize()
+        super().initialize()
         # Set properties for SourcesListEntriesWidget.
         self.archive = self.context.archive
         self.sources_list_user = self.context.subscriber
diff --git a/lib/lp/soyuz/browser/build.py b/lib/lp/soyuz/browser/build.py
index e997277..2ff61ac 100644
--- a/lib/lp/soyuz/browser/build.py
+++ b/lib/lp/soyuz/browser/build.py
@@ -121,7 +121,7 @@ class BuildUrl:
 
     @property
     def path(self):
-        return u"+build/%d" % self.context.id
+        return "+build/%d" % self.context.id
 
 
 class BuildNavigation(GetitemNavigation, FileNavigationMixin):
diff --git a/lib/lp/soyuz/browser/distroarchseriesbinarypackagerelease.py b/lib/lp/soyuz/browser/distroarchseriesbinarypackagerelease.py
index 6cae515..335d278 100644
--- a/lib/lp/soyuz/browser/distroarchseriesbinarypackagerelease.py
+++ b/lib/lp/soyuz/browser/distroarchseriesbinarypackagerelease.py
@@ -45,5 +45,5 @@ class DistroArchSeriesBinaryPackageReleaseView(LaunchpadView):
     def phased_update_percentage(self):
         """Return the formatted phased update percentage, or empty."""
         if self.context.phased_update_percentage is not None:
-            return u"%d%% of users" % self.context.phased_update_percentage
-        return u""
+            return "%d%% of users" % self.context.phased_update_percentage
+        return ""
diff --git a/lib/lp/soyuz/browser/livefs.py b/lib/lp/soyuz/browser/livefs.py
index ebfc41f..5409eea 100644
--- a/lib/lp/soyuz/browser/livefs.py
+++ b/lib/lp/soyuz/browser/livefs.py
@@ -191,12 +191,12 @@ class ILiveFSEditSchema(Interface):
         'keep_binary_files_days',
         ])
     distro_series = Choice(
-        vocabulary='BuildableDistroSeries', title=u'Distribution series')
+        vocabulary='BuildableDistroSeries', title='Distribution series')
     metadata = Text(
-        title=u'Live filesystem build metadata',
+        title='Live filesystem build metadata',
         description=(
-            u'A JSON dictionary of data about the image.  Entries here will '
-             'be passed to the builder.'))
+            'A JSON dictionary of data about the image.  Entries here will '
+            'be passed to the builder.'))
 
 
 class LiveFSMetadataValidatorMixin:
@@ -223,7 +223,7 @@ class LiveFSAddView(LiveFSMetadataValidatorMixin, LaunchpadFormView):
         """See `LaunchpadView`."""
         if not getFeatureFlag(LIVEFS_FEATURE_FLAG):
             raise LiveFSFeatureDisabled
-        super(LiveFSAddView, self).initialize()
+        super().initialize()
 
     @property
     def initial_values(self):
@@ -249,7 +249,7 @@ class LiveFSAddView(LiveFSMetadataValidatorMixin, LaunchpadFormView):
         self.next_url = canonical_url(livefs)
 
     def validate(self, data):
-        super(LiveFSAddView, self).validate(data)
+        super().validate(data)
         owner = data.get('owner', None)
         distro_series = data['distro_series']
         name = data.get('name', None)
@@ -330,11 +330,11 @@ class LiveFSEditView(LiveFSMetadataValidatorMixin, BaseLiveFSEditView):
         """See `LaunchpadEditFormView`."""
         if 'metadata' in data:
             data['metadata'] = json.loads(data['metadata'])
-        super(LiveFSEditView, self).updateContextFromData(
+        super().updateContextFromData(
             data, context=context, notify_modified=notify_modified)
 
     def validate(self, data):
-        super(LiveFSEditView, self).validate(data)
+        super().validate(data)
         owner = data.get('owner', None)
         distro_series = data['distro_series']
         name = data.get('name', None)
diff --git a/lib/lp/soyuz/browser/livefsbuild.py b/lib/lp/soyuz/browser/livefsbuild.py
index f4b1d93..78c4f1f 100644
--- a/lib/lp/soyuz/browser/livefsbuild.py
+++ b/lib/lp/soyuz/browser/livefsbuild.py
@@ -150,7 +150,7 @@ class LiveFSBuildRescoreView(LaunchpadFormView):
 
     def __call__(self):
         if self.context.can_be_rescored:
-            return super(LiveFSBuildRescoreView, self).__call__()
+            return super().__call__()
         self.request.response.addWarningNotification(
             "Cannot rescore this build because it is not queued.")
         self.request.response.redirect(canonical_url(self.context))
diff --git a/lib/lp/soyuz/browser/packagerelationship.py b/lib/lp/soyuz/browser/packagerelationship.py
index 9816d03..8123efc 100644
--- a/lib/lp/soyuz/browser/packagerelationship.py
+++ b/lib/lp/soyuz/browser/packagerelationship.py
@@ -44,8 +44,8 @@ def relationship_builder(relationship_line, getter):
         else:
             url = None
         if rel['version'] is None:
-            operator = u''
-            version = u''
+            operator = ''
+            version = ''
         else:
             operator, version = rel['version']
         relationship_set.add(name, operator, version, url)
diff --git a/lib/lp/soyuz/browser/publishing.py b/lib/lp/soyuz/browser/publishing.py
index 86bbb19..a6d16c5 100644
--- a/lib/lp/soyuz/browser/publishing.py
+++ b/lib/lp/soyuz/browser/publishing.py
@@ -58,14 +58,14 @@ class SourcePublicationURL(PublicationURLBase):
     """Dynamic URL declaration for `ISourcePackagePublishingHistory`"""
     @property
     def path(self):
-        return u"+sourcepub/%s" % self.context.id
+        return "+sourcepub/%s" % self.context.id
 
 
 class BinaryPublicationURL(PublicationURLBase):
     """Dynamic URL declaration for `IBinaryPackagePublishingHistory`"""
     @property
     def path(self):
-        return u"+binarypub/%s" % self.context.id
+        return "+binarypub/%s" % self.context.id
 
 
 class SourcePackagePublishingHistoryNavigation(Navigation,
@@ -188,7 +188,7 @@ class BasePublishingRecordView(LaunchpadView):
         """Return the removal comment or 'None provided'."""
         removal_comment = self.context.removal_comment
         if removal_comment is None or not removal_comment.strip():
-            removal_comment = u'None provided.'
+            removal_comment = 'None provided.'
 
         return removal_comment
 
@@ -197,8 +197,8 @@ class BasePublishingRecordView(LaunchpadView):
         """Return the formatted phased update percentage, or empty."""
         if (self.is_binary and
             self.context.phased_update_percentage is not None):
-            return u"%d%% of users" % self.context.phased_update_percentage
-        return u""
+            return "%d%% of users" % self.context.phased_update_percentage
+        return ""
 
     @property
     def linkify_copied_from_archive(self):
diff --git a/lib/lp/soyuz/browser/sourceslist.py b/lib/lp/soyuz/browser/sourceslist.py
index 29697aa..6a63a44 100644
--- a/lib/lp/soyuz/browser/sourceslist.py
+++ b/lib/lp/soyuz/browser/sourceslist.py
@@ -41,7 +41,7 @@ class SourcesListEntriesView(LaunchpadView):
         comment=None):
         self._initially_without_selection = initially_without_selection
         self.comment = comment
-        super(SourcesListEntriesView, self).__init__(context, request)
+        super().__init__(context, request)
 
     def initialize(self):
         self.terms = []
diff --git a/lib/lp/soyuz/browser/tests/test_archive.py b/lib/lp/soyuz/browser/tests/test_archive.py
index 9ed6c08..07e8614 100644
--- a/lib/lp/soyuz/browser/tests/test_archive.py
+++ b/lib/lp/soyuz/browser/tests/test_archive.py
@@ -58,7 +58,7 @@ class TestArchiveEditView(TestCaseWithFactory):
     layer = LaunchpadFunctionalLayer
 
     def setUp(self):
-        super(TestArchiveEditView, self).setUp()
+        super().setUp()
         # None of the Ubuntu series in sampledata have amd64.  Add it to
         # breezy so that it shows up in the list of available processors.
         self.ubuntu = getUtility(ILaunchpadCelebrities).ubuntu
diff --git a/lib/lp/soyuz/browser/tests/test_archive_admin_view.py b/lib/lp/soyuz/browser/tests/test_archive_admin_view.py
index aecf106..7a2abdf 100644
--- a/lib/lp/soyuz/browser/tests/test_archive_admin_view.py
+++ b/lib/lp/soyuz/browser/tests/test_archive_admin_view.py
@@ -17,7 +17,7 @@ class TestArchivePrivacySwitchingView(TestCaseWithFactory):
 
     def setUp(self):
         """Create a ppa for the tests and login as an admin."""
-        super(TestArchivePrivacySwitchingView, self).setUp()
+        super().setUp()
         self.ppa = self.factory.makeArchive()
         # Login as an admin to ensure access to the view's context
         # object.
diff --git a/lib/lp/soyuz/browser/tests/test_archive_packages.py b/lib/lp/soyuz/browser/tests/test_archive_packages.py
index db5f7e2..ea6d517 100644
--- a/lib/lp/soyuz/browser/tests/test_archive_packages.py
+++ b/lib/lp/soyuz/browser/tests/test_archive_packages.py
@@ -54,7 +54,7 @@ class TestP3APackages(TestCaseWithFactory):
     layer = LaunchpadFunctionalLayer
 
     def setUp(self):
-        super(TestP3APackages, self).setUp()
+        super().setUp()
         self.private_ppa = self.factory.makeArchive(description='Foo')
         login('admin@xxxxxxxxxxxxx')
         self.private_ppa.private = True
@@ -333,7 +333,7 @@ class TestPPAPackagesJobNotifications(TestCaseWithFactory):
     layer = LaunchpadFunctionalLayer
 
     def setUp(self):
-        super(TestPPAPackagesJobNotifications, self).setUp()
+        super().setUp()
         self.ws_version = 'devel'
         self.person = self.factory.makePerson()
         self.archive = self.factory.makeArchive(owner=self.person)
@@ -494,7 +494,7 @@ class TestP3APackagesQueryCount(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestP3APackagesQueryCount, self).setUp()
+        super().setUp()
         self.team = self.factory.makeTeam()
         login_person(self.team.teamowner)
         self.person = self.factory.makePerson()
diff --git a/lib/lp/soyuz/browser/tests/test_archive_webservice.py b/lib/lp/soyuz/browser/tests/test_archive_webservice.py
index 87a33a2..352b346 100644
--- a/lib/lp/soyuz/browser/tests/test_archive_webservice.py
+++ b/lib/lp/soyuz/browser/tests/test_archive_webservice.py
@@ -49,7 +49,7 @@ class TestArchiveWebservice(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestArchiveWebservice, self).setUp()
+        super().setUp()
         with admin_logged_in() as _admin:
             admin = _admin
             self.archive = self.factory.makeArchive(
@@ -682,7 +682,7 @@ class TestGetPublishedBinaries(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestGetPublishedBinaries, self).setUp()
+        super().setUp()
         self.person = self.factory.makePerson()
         self.archive = self.factory.makeArchive()
         self.person_url = api_url(self.person)
@@ -817,7 +817,7 @@ class TestRemoveCopyNotification(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestRemoveCopyNotification, self).setUp()
+        super().setUp()
         self.person = self.factory.makePerson()
         self.archive = self.factory.makeArchive(owner=self.person)
         self.archive_url = api_url(self.archive)
diff --git a/lib/lp/soyuz/browser/tests/test_archivesubscription.py b/lib/lp/soyuz/browser/tests/test_archivesubscription.py
index 24ecb0f..31daf54 100644
--- a/lib/lp/soyuz/browser/tests/test_archivesubscription.py
+++ b/lib/lp/soyuz/browser/tests/test_archivesubscription.py
@@ -29,7 +29,7 @@ class TestArchiveSubscribersView(TestCaseWithFactory):
     layer = LaunchpadFunctionalLayer
 
     def setUp(self):
-        super(TestArchiveSubscribersView, self).setUp()
+        super().setUp()
         self.p3a_owner = self.factory.makePerson()
         admin = getUtility(IPersonSet).getByEmail('admin@xxxxxxxxxxxxx')
         with person_logged_in(admin):
diff --git a/lib/lp/soyuz/browser/tests/test_breadcrumbs.py b/lib/lp/soyuz/browser/tests/test_breadcrumbs.py
index c3c1789..23875f3 100644
--- a/lib/lp/soyuz/browser/tests/test_breadcrumbs.py
+++ b/lib/lp/soyuz/browser/tests/test_breadcrumbs.py
@@ -16,7 +16,7 @@ from lp.testing.breadcrumbs import BaseBreadcrumbTestCase
 class TestDistroArchSeriesBreadcrumb(BaseBreadcrumbTestCase):
 
     def setUp(self):
-        super(TestDistroArchSeriesBreadcrumb, self).setUp()
+        super().setUp()
         self.ubuntu = getUtility(IDistributionSet).getByName('ubuntu')
         self.hoary = self.ubuntu.getSeries('hoary')
         self.hoary_i386 = self.hoary['i386']
@@ -46,7 +46,7 @@ class TestDistroArchSeriesBreadcrumb(BaseBreadcrumbTestCase):
 class TestArchiveSubscriptionBreadcrumb(BaseBreadcrumbTestCase):
 
     def setUp(self):
-        super(TestArchiveSubscriptionBreadcrumb, self).setUp()
+        super().setUp()
 
         # Create a private ppa
         self.ppa = self.factory.makeArchive()
diff --git a/lib/lp/soyuz/browser/tests/test_build_views.py b/lib/lp/soyuz/browser/tests/test_build_views.py
index 02bb4a1..477a9f6 100644
--- a/lib/lp/soyuz/browser/tests/test_build_views.py
+++ b/lib/lp/soyuz/browser/tests/test_build_views.py
@@ -45,7 +45,7 @@ class TestBuildViews(TestCaseWithFactory):
     layer = LaunchpadFunctionalLayer
 
     def setUp(self):
-        super(TestBuildViews, self).setUp()
+        super().setUp()
         self.empty_request = LaunchpadTestRequest(form={})
         self.admin = getUtility(IPersonSet).getByEmail(ADMIN_EMAIL)
 
diff --git a/lib/lp/soyuz/browser/tests/test_distributionsourcepackagerelease.py b/lib/lp/soyuz/browser/tests/test_distributionsourcepackagerelease.py
index c33246e..e02d995 100644
--- a/lib/lp/soyuz/browser/tests/test_distributionsourcepackagerelease.py
+++ b/lib/lp/soyuz/browser/tests/test_distributionsourcepackagerelease.py
@@ -66,7 +66,7 @@ class TestDistributionSourcePackageReleaseFiles(TestCaseWithFactory):
     layer = LaunchpadFunctionalLayer
 
     def setUp(self):
-        super(TestDistributionSourcePackageReleaseFiles, self).setUp()
+        super().setUp()
         # SourcePackageRelease itself is contextless, so wrap it in DSPR
         # to give it a URL.
         spr = self.factory.makeSourcePackageRelease()
diff --git a/lib/lp/soyuz/browser/tests/test_distroarchseries_view.py b/lib/lp/soyuz/browser/tests/test_distroarchseries_view.py
index 4357b71..0e5237b 100644
--- a/lib/lp/soyuz/browser/tests/test_distroarchseries_view.py
+++ b/lib/lp/soyuz/browser/tests/test_distroarchseries_view.py
@@ -17,7 +17,7 @@ class TestDistroArchSeriesView(TestCaseWithFactory):
 
     def setUp(self):
         """Create a distroarchseries for the tests and login as an admin."""
-        super(TestDistroArchSeriesView, self).setUp()
+        super().setUp()
         self.das = self.factory.makeDistroArchSeries()
         # Login as an admin to ensure access to the view's context
         # object.
diff --git a/lib/lp/soyuz/browser/tests/test_distrosourcepackagerelease.py b/lib/lp/soyuz/browser/tests/test_distrosourcepackagerelease.py
index b903fef..e80f847 100644
--- a/lib/lp/soyuz/browser/tests/test_distrosourcepackagerelease.py
+++ b/lib/lp/soyuz/browser/tests/test_distrosourcepackagerelease.py
@@ -21,7 +21,7 @@ class TestDistroSourcePackageReleaseFiles(TestCaseWithFactory):
     layer = LaunchpadFunctionalLayer
 
     def setUp(self):
-        super(TestDistroSourcePackageReleaseFiles, self).setUp()
+        super().setUp()
         # The package must be published for the page to render.
         stp = SoyuzTestPublisher()
         distroseries = stp.setUpDefaultDistroSeries()
diff --git a/lib/lp/soyuz/browser/tests/test_livefs.py b/lib/lp/soyuz/browser/tests/test_livefs.py
index af61b1e..26a020e 100644
--- a/lib/lp/soyuz/browser/tests/test_livefs.py
+++ b/lib/lp/soyuz/browser/tests/test_livefs.py
@@ -66,7 +66,7 @@ class TestLiveFSNavigation(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestLiveFSNavigation, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture({LIVEFS_FEATURE_FLAG: "on"}))
 
     def test_canonical_url(self):
@@ -138,7 +138,7 @@ class TestLiveFSAddView(BrowserTestCase):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestLiveFSAddView, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture({LIVEFS_FEATURE_FLAG: "on"}))
         self.useFixture(FakeLogger())
         self.person = self.factory.makePerson(
@@ -217,7 +217,7 @@ class TestLiveFSAdminView(BrowserTestCase):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestLiveFSAdminView, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture({LIVEFS_FEATURE_FLAG: "on"}))
         self.useFixture(FakeLogger())
         self.person = self.factory.makePerson(
@@ -272,7 +272,7 @@ class TestLiveFSEditView(BrowserTestCase):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestLiveFSEditView, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture({LIVEFS_FEATURE_FLAG: "on"}))
         self.useFixture(FakeLogger())
         self.person = self.factory.makePerson(
@@ -352,7 +352,7 @@ class TestLiveFSDeleteView(BrowserTestCase):
     layer = LaunchpadFunctionalLayer
 
     def setUp(self):
-        super(TestLiveFSDeleteView, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture({LIVEFS_FEATURE_FLAG: "on"}))
         self.person = self.factory.makePerson(
             name="test-person", displayname="Test Person")
@@ -402,7 +402,7 @@ class TestLiveFSView(BrowserTestCase):
     layer = LaunchpadFunctionalLayer
 
     def setUp(self):
-        super(TestLiveFSView, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture({LIVEFS_FEATURE_FLAG: "on"}))
         self.ubuntu = getUtility(ILaunchpadCelebrities).ubuntu
         self.distroseries = self.factory.makeDistroSeries(
diff --git a/lib/lp/soyuz/browser/tests/test_livefsbuild.py b/lib/lp/soyuz/browser/tests/test_livefsbuild.py
index 1998d10..6cd5350 100644
--- a/lib/lp/soyuz/browser/tests/test_livefsbuild.py
+++ b/lib/lp/soyuz/browser/tests/test_livefsbuild.py
@@ -43,7 +43,7 @@ class TestCanonicalUrlForLiveFSBuild(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestCanonicalUrlForLiveFSBuild, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture({LIVEFS_FEATURE_FLAG: "on"}))
 
     def test_canonical_url(self):
@@ -68,7 +68,7 @@ class TestLiveFSBuildView(TestCaseWithFactory):
     layer = LaunchpadFunctionalLayer
 
     def setUp(self):
-        super(TestLiveFSBuildView, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture({LIVEFS_FEATURE_FLAG: "on"}))
 
     def test_files(self):
@@ -111,7 +111,7 @@ class TestLiveFSBuildOperations(BrowserTestCase):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestLiveFSBuildOperations, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture({LIVEFS_FEATURE_FLAG: "on"}))
         self.useFixture(FakeLogger())
         self.build = self.factory.makeLiveFSBuild()
diff --git a/lib/lp/soyuz/browser/tests/test_publishing.py b/lib/lp/soyuz/browser/tests/test_publishing.py
index 54ad0fc..5d67740 100644
--- a/lib/lp/soyuz/browser/tests/test_publishing.py
+++ b/lib/lp/soyuz/browser/tests/test_publishing.py
@@ -40,7 +40,7 @@ class TestSourcePublicationListingExtra(BrowserTestCase):
     layer = LaunchpadFunctionalLayer
 
     def setUp(self):
-        super(TestSourcePublicationListingExtra, self).setUp()
+        super().setUp()
         self.admin = getUtility(IPersonSet).getByEmail(ADMIN_EMAIL)
         # Create everything we need to create builds, such as a
         # DistroArchSeries and a builder.
diff --git a/lib/lp/soyuz/browser/tests/test_queue.py b/lib/lp/soyuz/browser/tests/test_queue.py
index 1c8109f..012c1b0 100644
--- a/lib/lp/soyuz/browser/tests/test_queue.py
+++ b/lib/lp/soyuz/browser/tests/test_queue.py
@@ -65,7 +65,7 @@ class TestAcceptRejectQueueUploads(TestCaseWithFactory):
     def setUp(self):
         """Create two new uploads in the new state and a person with
         permission to upload to the partner archive."""
-        super(TestAcceptRejectQueueUploads, self).setUp()
+        super().setUp()
         login('admin@xxxxxxxxxxxxx')
         self.test_publisher = SoyuzTestPublisher()
         self.test_publisher.prepareBreezyAutotest()
diff --git a/lib/lp/soyuz/browser/tests/test_sourcepackagerelease.py b/lib/lp/soyuz/browser/tests/test_sourcepackagerelease.py
index c0f7a87..bda8b04 100644
--- a/lib/lp/soyuz/browser/tests/test_sourcepackagerelease.py
+++ b/lib/lp/soyuz/browser/tests/test_sourcepackagerelease.py
@@ -18,7 +18,7 @@ class TestSourcePackageReleaseView(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestSourcePackageReleaseView, self).setUp()
+        super().setUp()
         self.source_package_release = self.factory.makeSourcePackageRelease()
 
     def test_highlighted_copyright_is_None(self):
diff --git a/lib/lp/soyuz/interfaces/archive.py b/lib/lp/soyuz/interfaces/archive.py
index a3de895..fc7db31 100644
--- a/lib/lp/soyuz/interfaces/archive.py
+++ b/lib/lp/soyuz/interfaces/archive.py
@@ -118,7 +118,7 @@ from lp.soyuz.interfaces.buildrecords import IHasBuildRecords
 from lp.soyuz.interfaces.component import IComponent
 
 
-NAMED_AUTH_TOKEN_FEATURE_FLAG = u"soyuz.named_auth_token.allow_new"
+NAMED_AUTH_TOKEN_FEATURE_FLAG = "soyuz.named_auth_token.allow_new"
 
 
 @error_status(http.client.BAD_REQUEST)
@@ -209,7 +209,7 @@ class CannotUploadToArchive(Exception):
 
     def __init__(self, **args):
         """Construct a `CannotUploadToArchive`."""
-        super(CannotUploadToArchive, self).__init__(self._fmt % args)
+        super().__init__(self._fmt % args)
 
 
 class InvalidPocketForPartnerArchive(CannotUploadToArchive):
@@ -223,7 +223,7 @@ class CannotUploadToPocket(Exception):
     """Returned when a pocket is closed for uploads."""
 
     def __init__(self, distroseries, pocket):
-        super(CannotUploadToPocket, self).__init__(
+        super().__init__(
             "Not permitted to upload to the %s pocket in a series in the "
             "'%s' state." % (pocket.name, distroseries.status.name))
 
@@ -271,7 +271,7 @@ class NoRightsForComponent(CannotUploadToArchive):
         "Signer is not permitted to upload to the component '%(component)s'.")
 
     def __init__(self, component):
-        super(NoRightsForComponent, self).__init__(component=component.name)
+        super().__init__(component=component.name)
 
 
 class InvalidPocketForPPA(CannotUploadToArchive):
@@ -286,7 +286,7 @@ class ArchiveDisabled(CannotUploadToArchive):
     _fmt = ("%(archive_name)s is disabled.")
 
     def __init__(self, archive_name):
-        super(ArchiveDisabled, self).__init__(archive_name=archive_name)
+        super().__init__(archive_name=archive_name)
 
 
 class CannotUploadToSeries(CannotUploadToArchive):
@@ -295,8 +295,7 @@ class CannotUploadToSeries(CannotUploadToArchive):
     _fmt = ("%(distroseries)s is obsolete and will not accept new uploads.")
 
     def __init__(self, distroseries):
-        super(CannotUploadToSeries, self).__init__(
-            distroseries=distroseries.name)
+        super().__init__(distroseries=distroseries.name)
 
 
 @error_status(http.client.BAD_REQUEST)
@@ -318,8 +317,7 @@ class CannotModifyArchiveProcessor(Exception):
         'by administrators.')
 
     def __init__(self, processor):
-        super(CannotModifyArchiveProcessor, self).__init__(
-            self._fmt % {'processor': processor.name})
+        super().__init__(self._fmt % {'processor': processor.name})
 
 
 @error_status(http.client.CONFLICT)
@@ -333,7 +331,7 @@ class NamedAuthTokenFeatureDisabled(Unauthorized):
     """Only certain users can create named authorization tokens."""
 
     def __init__(self):
-        super(NamedAuthTokenFeatureDisabled, self).__init__(
+        super().__init__(
             "You do not have permission to create named authorization tokens")
 
 
diff --git a/lib/lp/soyuz/interfaces/distributionjob.py b/lib/lp/soyuz/interfaces/distributionjob.py
index 9095f32..2ff19cd 100644
--- a/lib/lp/soyuz/interfaces/distributionjob.py
+++ b/lib/lp/soyuz/interfaces/distributionjob.py
@@ -84,7 +84,7 @@ class InitializationPending(Exception):
     """
 
     def __init__(self, job):
-        super(InitializationPending, self).__init__()
+        super().__init__()
         self.job = job
 
 
@@ -95,7 +95,7 @@ class InitializationCompleted(Exception):
     """
 
     def __init__(self, job):
-        super(InitializationCompleted, self).__init__()
+        super().__init__()
         self.job = job
 
 
diff --git a/lib/lp/soyuz/interfaces/livefs.py b/lib/lp/soyuz/interfaces/livefs.py
index 5569735..db7f795 100644
--- a/lib/lp/soyuz/interfaces/livefs.py
+++ b/lib/lp/soyuz/interfaces/livefs.py
@@ -73,8 +73,8 @@ from lp.soyuz.interfaces.archive import IArchive
 from lp.soyuz.interfaces.distroarchseries import IDistroArchSeries
 
 
-LIVEFS_FEATURE_FLAG = u"soyuz.livefs.allow_new"
-LIVEFS_WEBHOOKS_FEATURE_FLAG = u"soyuz.livefs.webhooks.enabled"
+LIVEFS_FEATURE_FLAG = "soyuz.livefs.allow_new"
+LIVEFS_WEBHOOKS_FEATURE_FLAG = "soyuz.livefs.webhooks.enabled"
 
 
 @error_status(http.client.BAD_REQUEST)
@@ -82,7 +82,7 @@ class LiveFSBuildAlreadyPending(Exception):
     """A build was requested when an identical build was already pending."""
 
     def __init__(self):
-        super(LiveFSBuildAlreadyPending, self).__init__(
+        super().__init__(
             "An identical build of this live filesystem image is already "
             "pending.")
 
@@ -100,7 +100,7 @@ class LiveFSBuildArchiveOwnerMismatch(Forbidden):
     """
 
     def __init__(self):
-        super(LiveFSBuildArchiveOwnerMismatch, self).__init__(
+        super().__init__(
             "Live filesystem builds against private archives are only "
             "allowed if the live filesystem owner and the archive owner are "
             "equal.")
@@ -111,7 +111,7 @@ class LiveFSFeatureDisabled(Unauthorized):
     """Only certain users can create new LiveFS-related objects."""
 
     def __init__(self):
-        super(LiveFSFeatureDisabled, self).__init__(
+        super().__init__(
             "You do not have permission to create new live filesystems or "
             "new live filesystem builds.")
 
@@ -121,7 +121,7 @@ class DuplicateLiveFSName(Exception):
     """Raised for live filesystems with duplicate name/owner/distroseries."""
 
     def __init__(self):
-        super(DuplicateLiveFSName, self).__init__(
+        super().__init__(
             "There is already a live filesystem with the same name, owner, "
             "and distroseries.")
 
diff --git a/lib/lp/soyuz/interfaces/publishing.py b/lib/lp/soyuz/interfaces/publishing.py
index 16667a6..a1d5dc2 100644
--- a/lib/lp/soyuz/interfaces/publishing.py
+++ b/lib/lp/soyuz/interfaces/publishing.py
@@ -570,8 +570,8 @@ class ISourcePackagePublishingHistoryEdit(IPublishingEdit):
     # _schema_circular_imports.py.
     @operation_returns_entry(Interface)
     @operation_parameters(
-        new_component=TextLine(title=u"The new component name."),
-        new_section=TextLine(title=u"The new section name."))
+        new_component=TextLine(title="The new component name."),
+        new_section=TextLine(title="The new section name."))
     @export_write_operation()
     @call_with(creator=REQUEST_USER)
     @operation_for_version("devel")
@@ -870,15 +870,15 @@ class IBinaryPackagePublishingHistoryEdit(IPublishingEdit):
     # _schema_circular_imports.py.
     @operation_returns_entry(Interface)
     @operation_parameters(
-        new_component=TextLine(title=u"The new component name."),
-        new_section=TextLine(title=u"The new section name."),
+        new_component=TextLine(title="The new component name."),
+        new_section=TextLine(title="The new section name."),
         # XXX cjwatson 20120619: It would be nice to use copy_field here to
         # save manually looking up the priority name, but it doesn't work in
         # this case: the title is wrong, and tests fail when a string value
         # is passed over the webservice.
-        new_priority=TextLine(title=u"The new priority name."),
+        new_priority=TextLine(title="The new priority name."),
         new_phased_update_percentage=Int(
-            title=u"The new phased update percentage."))
+            title="The new phased update percentage."))
     @export_write_operation()
     @call_with(creator=REQUEST_USER)
     @operation_for_version("devel")
diff --git a/lib/lp/soyuz/interfaces/queue.py b/lib/lp/soyuz/interfaces/queue.py
index a95c982..3afd574 100644
--- a/lib/lp/soyuz/interfaces/queue.py
+++ b/lib/lp/soyuz/interfaces/queue.py
@@ -475,8 +475,8 @@ class IPackageUpload(Interface):
         """
 
     @operation_parameters(
-        new_component=TextLine(title=u"The new component name."),
-        new_section=TextLine(title=u"The new section name."))
+        new_component=TextLine(title="The new component name."),
+        new_section=TextLine(title="The new section name."))
     @call_with(allowed_components=None, user=REQUEST_USER)
     @export_write_operation()
     @operation_for_version('devel')
@@ -505,9 +505,9 @@ class IPackageUpload(Interface):
 
     @operation_parameters(
         changes=List(
-            title=u"A sequence of changes to apply.",
+            title="A sequence of changes to apply.",
             description=(
-                u"Each item may have a 'name' item which specifies the binary "
+                "Each item may have a 'name' item which specifies the binary "
                 "package name to override; otherwise, the change applies to "
                 "all binaries in the upload. It may also have 'component', "
                 "'section', and 'priority' items which replace the "
diff --git a/lib/lp/soyuz/mail/binarypackagebuild.py b/lib/lp/soyuz/mail/binarypackagebuild.py
index 4f3eb4f..225c16e 100644
--- a/lib/lp/soyuz/mail/binarypackagebuild.py
+++ b/lib/lp/soyuz/mail/binarypackagebuild.py
@@ -61,8 +61,7 @@ class BinaryPackageBuildRecipientReason(RecipientReason):
 
     def getReason(self):
         """See `RecipientReason`."""
-        return MailWrapper(width=72).format(
-            super(BinaryPackageBuildRecipientReason, self).getReason())
+        return MailWrapper(width=72).format(super().getReason())
 
 
 class BinaryPackageBuildMailer(BaseMailer):
@@ -143,7 +142,7 @@ class BinaryPackageBuildMailer(BaseMailer):
 
     def __init__(self, subject, template_name, recipients, from_address,
                  build, extra_info=None):
-        super(BinaryPackageBuildMailer, self).__init__(
+        super().__init__(
             subject, template_name, recipients, from_address,
             notification_type="package-build-status")
         self.build = build
@@ -151,8 +150,7 @@ class BinaryPackageBuildMailer(BaseMailer):
 
     def _getHeaders(self, email, recipient):
         """See `BaseMailer`."""
-        headers = super(BinaryPackageBuildMailer, self)._getHeaders(
-            email, recipient)
+        headers = super()._getHeaders(email, recipient)
         build = self.build
         headers.update({
             "X-Launchpad-Archive": build.archive.reference,
@@ -169,13 +167,12 @@ class BinaryPackageBuildMailer(BaseMailer):
         # The deprecated PPA reference header is included for Ubuntu PPAs to
         # avoid breaking existing consumers.
         if (build.archive.is_ppa and
-                build.archive.distribution.name == u'ubuntu'):
+                build.archive.distribution.name == 'ubuntu'):
             headers["X-Launchpad-PPA"] = get_ppa_reference(build.archive)
         return headers
 
     def _getTemplateParams(self, email, recipient):
-        params = super(BinaryPackageBuildMailer, self)._getTemplateParams(
-            email, recipient)
+        params = super()._getTemplateParams(email, recipient)
         build = self.build
         extra_info = self.extra_info
 
diff --git a/lib/lp/soyuz/mail/livefsbuild.py b/lib/lp/soyuz/mail/livefsbuild.py
index f907884..6bfa5e2 100644
--- a/lib/lp/soyuz/mail/livefsbuild.py
+++ b/lib/lp/soyuz/mail/livefsbuild.py
@@ -33,22 +33,21 @@ class LiveFSBuildMailer(BaseMailer):
 
     def __init__(self, subject, template_name, recipients, from_address,
                  build):
-        super(LiveFSBuildMailer, self).__init__(
+        super().__init__(
             subject, template_name, recipients, from_address,
             notification_type="livefs-build-status")
         self.build = build
 
     def _getHeaders(self, email, recipient):
         """See `BaseMailer`."""
-        headers = super(LiveFSBuildMailer, self)._getHeaders(email, recipient)
+        headers = super()._getHeaders(email, recipient)
         headers["X-Launchpad-Build-State"] = self.build.status.name
         return headers
 
     def _getTemplateParams(self, email, recipient):
         """See `BaseMailer`."""
         build = self.build
-        params = super(LiveFSBuildMailer, self)._getTemplateParams(
-            email, recipient)
+        params = super()._getTemplateParams(email, recipient)
         params.update({
             "archive_tag": build.archive.reference,
             "build_id": build.id,
diff --git a/lib/lp/soyuz/mail/packageupload.py b/lib/lp/soyuz/mail/packageupload.py
index 053a052..8224ebf 100644
--- a/lib/lp/soyuz/mail/packageupload.py
+++ b/lib/lp/soyuz/mail/packageupload.py
@@ -81,8 +81,7 @@ class PackageUploadRecipientReason(RecipientReason):
         return cls(recipient, recipient, "Announcement", "")
 
     def _getTemplateValues(self):
-        template_values = super(
-            PackageUploadRecipientReason, self)._getTemplateValues()
+        template_values = super()._getTemplateValues()
         template_values["lc_entity_has"] = "you have"
         if self.recipient != self.subscriber or self.subscriber.is_team:
             template_values["lc_entity_has"] = (
@@ -92,7 +91,7 @@ class PackageUploadRecipientReason(RecipientReason):
     def getReason(self):
         """See `RecipientReason`."""
         return MailWrapper(width=72).format(
-            super(PackageUploadRecipientReason, self).getReason())
+            super().getReason())
 
 
 def debug(logger, msg, *args, **kwargs):
@@ -110,7 +109,7 @@ def sanitize_string(s):
         'ascii' codec can't decode byte 0xc4 in position 21: ordinal
         not in range(128)
     """
-    if isinstance(s, six.text_type):
+    if isinstance(s, str):
         return s
     else:
         return guess_encoding(s)
@@ -447,7 +446,7 @@ class PackageUploadMailer(BaseMailer):
                  distroseries, pocket, summary_text=None, changes=None,
                  changesfile_content=None, announce_from_address=None,
                  previous_version=None, logger=None):
-        super(PackageUploadMailer, self).__init__(
+        super().__init__(
             subject, template_name, recipients, from_address,
             notification_type="package-upload")
         self.action = action
@@ -480,19 +479,17 @@ class PackageUploadMailer(BaseMailer):
                 self.announce_from_address is not None):
             return self.announce_from_address
         else:
-            return super(PackageUploadMailer, self)._getFromAddress(
-                email, recipient)
+            return super()._getFromAddress(email, recipient)
 
     def _getHeaders(self, email, recipient):
         """See `BaseMailer`."""
-        headers = super(PackageUploadMailer, self)._getHeaders(
-            email, recipient)
+        headers = super()._getHeaders(email, recipient)
         headers['X-Katie'] = 'Launchpad actually'
         headers['X-Launchpad-Archive'] = self.archive.reference
 
         # The deprecated PPA reference header is included for Ubuntu PPAs to
         # avoid breaking existing consumers.
-        if self.archive.is_ppa and self.archive.distribution.name == u'ubuntu':
+        if self.archive.is_ppa and self.archive.distribution.name == 'ubuntu':
             headers['X-Launchpad-PPA'] = get_ppa_reference(self.archive)
 
         # Include a 'X-Launchpad-Component' header with the component and
@@ -541,8 +538,7 @@ class PackageUploadMailer(BaseMailer):
 
     def _getTemplateParams(self, email, recipient):
         """See `BaseMailer`."""
-        params = super(PackageUploadMailer, self)._getTemplateParams(
-            email, recipient)
+        params = super()._getTemplateParams(email, recipient)
         params.update({
             'STATUS': ACTION_DESCRIPTIONS[self.action],
             'SUMMARY': self.summarystring,
@@ -612,7 +608,7 @@ class PackageUploadMailer(BaseMailer):
 
     def generateEmail(self, email, recipient, force_no_attachments=False):
         """See `BaseMailer`."""
-        ctrl = super(PackageUploadMailer, self).generateEmail(
+        ctrl = super().generateEmail(
             email, recipient, force_no_attachments=force_no_attachments)
         debug(self.logger, "Sent a mail:")
         debug(self.logger, "  Subject: %s" % ctrl.subject)
diff --git a/lib/lp/soyuz/mail/tests/test_packageupload.py b/lib/lp/soyuz/mail/tests/test_packageupload.py
index 2dc2a7a..ae539e2 100644
--- a/lib/lp/soyuz/mail/tests/test_packageupload.py
+++ b/lib/lp/soyuz/mail/tests/test_packageupload.py
@@ -48,14 +48,14 @@ class TestNotificationRequiringLibrarian(TestCaseWithFactory):
     def test_mail_from_unicode_names(self):
         # People with unicode in their names should appear correctly in the
         # email and not get smashed to ASCII or otherwise transliterated.
-        creator = self.factory.makePerson(displayname=u"Loïc")
+        creator = self.factory.makePerson(displayname="Loïc")
         spr = self.factory.makeSourcePackageRelease(creator=creator)
         self.factory.makeSourcePackageReleaseFile(sourcepackagerelease=spr)
         archive = self.factory.makeArchive(purpose=ArchivePurpose.PRIMARY)
         pocket = PackagePublishingPocket.RELEASE
         distroseries = self.factory.makeDistroSeries()
         distroseries.changeslist = "blah@xxxxxxxxxxx"
-        blamer = self.factory.makePerson(displayname=u"Stéphane")
+        blamer = self.factory.makePerson(displayname="Stéphane")
         mailer = PackageUploadMailer.forAction(
             "accepted", blamer, spr, [], [], archive, distroseries, pocket)
         mailer.sendAll()
@@ -63,8 +63,8 @@ class TestNotificationRequiringLibrarian(TestCaseWithFactory):
         self.assertEqual(2, len(notifications))
         msg = notifications[1].get_payload(0)
         body = six.ensure_text(msg.get_payload(decode=True))
-        self.assertIn(u"Changed-By: Loïc", body)
-        self.assertIn(u"Signed-By: Stéphane", body)
+        self.assertIn("Changed-By: Loïc", body)
+        self.assertIn("Signed-By: Stéphane", body)
 
     def test_calculate_subject_customfile(self):
         lfa = self.factory.makeLibraryFileAlias()
@@ -143,7 +143,7 @@ class TestNotificationRequiringLibrarian(TestCaseWithFactory):
         distroseries.changeslist = "blah@xxxxxxxxxxx"
         blamer = self.factory.makePerson()
         from_person = self.factory.makePerson(
-            email="loic@xxxxxxxxxxx", displayname=u"Loïc Motörhead")
+            email="loic@xxxxxxxxxxx", displayname="Loïc Motörhead")
         mailer = PackageUploadMailer.forAction(
             "accepted", blamer, spr, [], [], archive, distroseries, pocket,
             announce_from_person=from_person)
@@ -215,7 +215,7 @@ class TestNotificationRequiringLibrarian(TestCaseWithFactory):
         pocket = self.factory.getAnyPocket()
         distroseries = self.factory.makeDistroSeries()
         person = self.factory.makePerson(
-            displayname=u'Blamer', email='blamer@xxxxxxxxxxx')
+            displayname='Blamer', email='blamer@xxxxxxxxxxx')
         mailer = PackageUploadMailer.forAction(
             "rejected", person, None, [bpr], [], archive, distroseries, pocket,
             summary_text="Rejected by archive administrator.")
@@ -262,7 +262,7 @@ class TestNotification(TestCaseWithFactory):
             info['maintainer'],
             ]
         for field in fields:
-            self.assertEqual((u'Foo Bar', u'foo.bar@xxxxxxxxxxx'), field)
+            self.assertEqual(('Foo Bar', 'foo.bar@xxxxxxxxxxx'), field)
         self.assertFalse(info['notify_changed_by'])
 
     def test_fetch_information_changes_notify_changed_by(self):
@@ -281,21 +281,21 @@ class TestNotification(TestCaseWithFactory):
             info['maintainer'],
             ]
         for field in fields:
-            self.assertEqual((u'Foo Bar', u'foo.bar@xxxxxxxxxxx'), field)
+            self.assertEqual(('Foo Bar', 'foo.bar@xxxxxxxxxxx'), field)
         self.assertTrue(info['notify_changed_by'])
 
     def test_fetch_information_spr(self):
-        creator = self.factory.makePerson(displayname=u"foø")
-        maintainer = self.factory.makePerson(displayname=u"bær")
+        creator = self.factory.makePerson(displayname="foø")
+        maintainer = self.factory.makePerson(displayname="bær")
         spr = self.factory.makeSourcePackageRelease(
             creator=creator, maintainer=maintainer)
         info = fetch_information(spr, None, None)
         self.assertEqual(info['date'], spr.dateuploaded)
         self.assertEqual(info['changelog'], spr.changelog_entry)
         self.assertEqual(
-            (u"foø", spr.creator.preferredemail.email), info['changedby'])
+            ("foø", spr.creator.preferredemail.email), info['changedby'])
         self.assertEqual(
-            (u"bær", spr.maintainer.preferredemail.email), info['maintainer'])
+            ("bær", spr.maintainer.preferredemail.email), info['maintainer'])
         self.assertFalse(info['notify_changed_by'])
 
     def test_fetch_information_bprs(self):
diff --git a/lib/lp/soyuz/model/archive.py b/lib/lp/soyuz/model/archive.py
index 50ed7aa..b3c7798 100644
--- a/lib/lp/soyuz/model/archive.py
+++ b/lib/lp/soyuz/model/archive.py
@@ -230,10 +230,10 @@ from lp.soyuz.model.sourcepackagerelease import SourcePackageRelease
 
 
 ARCHIVE_REFERENCE_TEMPLATES = {
-    ArchivePurpose.PRIMARY: u'%(distribution)s',
-    ArchivePurpose.PPA: u'~%(owner)s/%(distribution)s/%(archive)s',
-    ArchivePurpose.PARTNER: u'%(distribution)s/%(archive)s',
-    ArchivePurpose.COPY: u'%(distribution)s/%(archive)s',
+    ArchivePurpose.PRIMARY: '%(distribution)s',
+    ArchivePurpose.PPA: '~%(owner)s/%(distribution)s/%(archive)s',
+    ArchivePurpose.PARTNER: '%(distribution)s/%(archive)s',
+    ArchivePurpose.COPY: '%(distribution)s/%(archive)s',
     }
 
 
@@ -617,7 +617,7 @@ class Archive(SQLBase):
                     SourcePackageName.id)
 
         if name is not None:
-            if isinstance(name, six.string_types):
+            if isinstance(name, str):
                 if exact_match:
                     clauses.append(SourcePackageName.name == name)
                 else:
@@ -1162,7 +1162,7 @@ class Archive(SQLBase):
 
     def _addArchiveDependency(self, dependency, pocket, component=None):
         """See `IArchive`."""
-        if isinstance(component, six.string_types):
+        if isinstance(component, str):
             try:
                 component = getUtility(IComponentSet)[component]
             except NotFoundError as e:
@@ -1417,9 +1417,9 @@ class Archive(SQLBase):
     def _checkUpload(self, person, distroseries, sourcepackagename, component,
                     pocket, strict_component=True):
         """See `IArchive`."""
-        if isinstance(component, six.string_types):
+        if isinstance(component, str):
             component = getUtility(IComponentSet)[component]
-        if isinstance(sourcepackagename, six.string_types):
+        if isinstance(sourcepackagename, str):
             sourcepackagename = getUtility(
                 ISourcePackageNameSet)[sourcepackagename]
         reason = self.checkUpload(person, distroseries, sourcepackagename,
@@ -1534,7 +1534,7 @@ class Archive(SQLBase):
         if self.is_ppa:
             if IComponent.providedBy(component_name):
                 name = component_name.name
-            elif isinstance(component_name, six.string_types):
+            elif isinstance(component_name, str):
                 name = component_name
             else:
                 name = None
@@ -1970,7 +1970,7 @@ class Archive(SQLBase):
         reason = self.checkUploadToPocket(series, pocket, person=person)
         if reason:
             # Wrap any forbidden-pocket error in CannotCopy.
-            raise CannotCopy(six.text_type(reason))
+            raise CannotCopy(str(reason))
 
         # Perform the copy, may raise CannotCopy. Don't do any further
         # permission checking: this method is protected by
@@ -2536,14 +2536,14 @@ class ArchiveSet:
         """See `IArchiveSet`."""
         from lp.registry.interfaces.distribution import IDistributionSet
 
-        bits = reference.split(u'/')
+        bits = reference.split('/')
         if len(bits) < 1:
             return None
-        if bits[0].startswith(u'~') or bits[0].startswith(u'ppa:'):
+        if bits[0].startswith('~') or bits[0].startswith('ppa:'):
             # PPA reference (~OWNER/DISTRO/ARCHIVE or ppa:OWNER/DISTRO/ARCHIVE)
             if len(bits) != 3:
                 return None
-            if bits[0].startswith(u'~'):
+            if bits[0].startswith('~'):
                 first_bit = bits[0][1:]
             else:
                 # ppa:OWNER
diff --git a/lib/lp/soyuz/model/archivedependency.py b/lib/lp/soyuz/model/archivedependency.py
index f880077..5f7b63c 100644
--- a/lib/lp/soyuz/model/archivedependency.py
+++ b/lib/lp/soyuz/model/archivedependency.py
@@ -53,7 +53,7 @@ class ArchiveDependency(StormBase):
     component = Reference(component_id, 'Component.id')
 
     def __init__(self, parent, dependency, pocket, component=None):
-        super(ArchiveDependency, self).__init__()
+        super().__init__()
         self.parent = parent
         self.dependency = dependency
         self.pocket = pocket
diff --git a/lib/lp/soyuz/model/archivefile.py b/lib/lp/soyuz/model/archivefile.py
index e6b126d..8f4075a 100644
--- a/lib/lp/soyuz/model/archivefile.py
+++ b/lib/lp/soyuz/model/archivefile.py
@@ -66,7 +66,7 @@ class ArchiveFile(Storm):
 
     def __init__(self, archive, container, path, library_file):
         """Construct an `ArchiveFile`."""
-        super(ArchiveFile, self).__init__()
+        super().__init__()
         self.archive = archive
         self.container = container
         self.path = path
diff --git a/lib/lp/soyuz/model/archivejob.py b/lib/lp/soyuz/model/archivejob.py
index 3dcaff2..e6785c6 100644
--- a/lib/lp/soyuz/model/archivejob.py
+++ b/lib/lp/soyuz/model/archivejob.py
@@ -66,7 +66,7 @@ class ArchiveJob(StormBase):
         :param metadata: the type-specific variables, as a json-compatible
             dict.
         """
-        super(ArchiveJob, self).__init__()
+        super().__init__()
         self.job = Job()
         self.archive = archive
         self.job_type = job_type
@@ -103,7 +103,7 @@ class ArchiveJobDerived(BaseRunnableJob, metaclass=EnumeratedSubclass):
 
     def getOopsVars(self):
         """See `IRunnableJob`."""
-        vars = super(ArchiveJobDerived, self).getOopsVars()
+        vars = super().getOopsVars()
         vars.extend([
             ('archive_id', self.context.archive.id),
             ('archive_job_id', self.context.id),
@@ -128,12 +128,11 @@ class PackageUploadNotificationJob(ArchiveJobDerived):
             'packageupload_status': packageupload.status.title,
             'summary_text': summary_text,
             }
-        return super(PackageUploadNotificationJob, cls).create(
-            packageupload.archive, metadata)
+        return super().create(packageupload.archive, metadata)
 
     def getOopsVars(self):
         """See `ArchiveJobDerived`."""
-        vars = super(PackageUploadNotificationJob, self).getOopsVars()
+        vars = super().getOopsVars()
         vars.extend([
             ('packageupload_id', self.metadata['packageupload_id']),
             ('packageupload_status', self.metadata['packageupload_status']),
diff --git a/lib/lp/soyuz/model/archivepermission.py b/lib/lp/soyuz/model/archivepermission.py
index 7c816ec..8c06b7c 100644
--- a/lib/lp/soyuz/model/archivepermission.py
+++ b/lib/lp/soyuz/model/archivepermission.py
@@ -12,7 +12,6 @@ from operator import attrgetter
 
 from lazr.enum import DBItem
 import pytz
-import six
 from storm.expr import Exists
 from storm.locals import (
     And,
@@ -106,7 +105,7 @@ class ArchivePermission(StormBase):
     def __init__(self, archive, permission, person, component=None,
                  sourcepackagename=None, packageset=None, explicit=False,
                  distroseries=None, pocket=None):
-        super(ArchivePermission, self).__init__()
+        super().__init__()
         self.archive = archive
         self.permission = permission
         self.person = person
@@ -202,7 +201,7 @@ class ArchivePermissionSet:
     def _nameToComponent(self, component):
         """Helper to convert a possible string component to IComponent"""
         try:
-            if isinstance(component, six.string_types):
+            if isinstance(component, str):
                 component = getUtility(IComponentSet)[component]
             return component
         except NotFoundError:
@@ -210,7 +209,7 @@ class ArchivePermissionSet:
 
     def _nameToSourcePackageName(self, sourcepackagename):
         """Helper to convert a possible string name to ISourcePackageName."""
-        if isinstance(sourcepackagename, six.string_types):
+        if isinstance(sourcepackagename, str):
             sourcepackagename = getUtility(
                 ISourcePackageNameSet)[sourcepackagename]
         return sourcepackagename
diff --git a/lib/lp/soyuz/model/binaryandsourcepackagename.py b/lib/lp/soyuz/model/binaryandsourcepackagename.py
index 566beb7..aa09d28 100644
--- a/lib/lp/soyuz/model/binaryandsourcepackagename.py
+++ b/lib/lp/soyuz/model/binaryandsourcepackagename.py
@@ -58,5 +58,4 @@ class BinaryAndSourcePackageNameVocabulary(NamedStormHugeVocabulary):
     def getTermByToken(self, token):
         """See `IVocabularyTokenized`."""
         # package names are always lowercase.
-        super_class = super(BinaryAndSourcePackageNameVocabulary, self)
-        return super_class.getTermByToken(token.lower())
+        return super().getTermByToken(token.lower())
diff --git a/lib/lp/soyuz/model/binarypackagebuildbehaviour.py b/lib/lp/soyuz/model/binarypackagebuildbehaviour.py
index fc94d9a..fd6bd96 100644
--- a/lib/lp/soyuz/model/binarypackagebuildbehaviour.py
+++ b/lib/lp/soyuz/model/binarypackagebuildbehaviour.py
@@ -152,8 +152,7 @@ class BinaryPackageBuildBehaviour(BuildFarmJobBehaviourBase):
         das = build.distro_arch_series
 
         # Build extra arguments.
-        args = yield super(BinaryPackageBuildBehaviour, self).extraBuildArgs(
-            logger=logger)
+        args = yield super().extraBuildArgs(logger=logger)
         args['arch_indep'] = build.arch_indep
         args['distribution'] = das.distroseries.distribution.name
         args['suite'] = das.distroseries.getSuite(build.pocket)
diff --git a/lib/lp/soyuz/model/binarypackagename.py b/lib/lp/soyuz/model/binarypackagename.py
index 90a7cae..fc2af72 100644
--- a/lib/lp/soyuz/model/binarypackagename.py
+++ b/lib/lp/soyuz/model/binarypackagename.py
@@ -25,7 +25,6 @@ from lp.soyuz.interfaces.binarypackagename import (
 from lp.soyuz.interfaces.publishing import active_publishing_status
 
 
-@six.python_2_unicode_compatible
 @implementer(IBinaryPackageName)
 class BinaryPackageName(SQLBase):
     _table = 'BinaryPackageName'
diff --git a/lib/lp/soyuz/model/binarypackagerelease.py b/lib/lp/soyuz/model/binarypackagerelease.py
index 0421e81..7baebb0 100644
--- a/lib/lp/soyuz/model/binarypackagerelease.py
+++ b/lib/lp/soyuz/model/binarypackagerelease.py
@@ -92,7 +92,7 @@ class BinaryPackageRelease(SQLBase):
             kwargs['_user_defined_fields'] = simplejson.dumps(
                 kwargs['user_defined_fields'])
             del kwargs['user_defined_fields']
-        super(BinaryPackageRelease, self).__init__(*args, **kwargs)
+        super().__init__(*args, **kwargs)
 
     @cachedproperty
     def built_using_references(self):
@@ -183,7 +183,7 @@ class BinaryPackageReleaseDownloadCount(Storm):
     count = Int(allow_none=False)
 
     def __init__(self, archive, binary_package_release, day, country, count):
-        super(BinaryPackageReleaseDownloadCount, self).__init__()
+        super().__init__()
         self.archive = archive
         self.binary_package_release = binary_package_release
         self.day = day
diff --git a/lib/lp/soyuz/model/binarysourcereference.py b/lib/lp/soyuz/model/binarysourcereference.py
index f5f4cde..653419a 100644
--- a/lib/lp/soyuz/model/binarysourcereference.py
+++ b/lib/lp/soyuz/model/binarysourcereference.py
@@ -53,7 +53,7 @@ class BinarySourceReference(StormBase):
     def __init__(self, binary_package_release, source_package_release,
                  reference_type):
         """Construct a `BinarySourceReference`."""
-        super(BinarySourceReference, self).__init__()
+        super().__init__()
         self.binary_package_release = binary_package_release
         self.source_package_release = source_package_release
         self.reference_type = reference_type
diff --git a/lib/lp/soyuz/model/distributionjob.py b/lib/lp/soyuz/model/distributionjob.py
index 2fb9da3..1c302bf 100644
--- a/lib/lp/soyuz/model/distributionjob.py
+++ b/lib/lp/soyuz/model/distributionjob.py
@@ -54,7 +54,7 @@ class DistributionJob(StormBase):
     metadata = JSON('json_data')
 
     def __init__(self, distribution, distroseries, job_type, metadata):
-        super(DistributionJob, self).__init__()
+        super().__init__()
         self.job = Job()
         self.distribution = distribution
         self.distroseries = distroseries
@@ -100,7 +100,7 @@ class DistributionJobDerived(BaseRunnableJob, metaclass=EnumeratedSubclass):
 
     def getOopsVars(self):
         """See `IRunnableJob`."""
-        vars = super(DistributionJobDerived, self).getOopsVars()
+        vars = super().getOopsVars()
         vars.extend([
             ('distribution_id', self.context.distribution.id),
             ('distroseries_id', self.context.distroseries.id),
diff --git a/lib/lp/soyuz/model/distroarchseriesfilter.py b/lib/lp/soyuz/model/distroarchseriesfilter.py
index 13e6007..948aed5 100644
--- a/lib/lp/soyuz/model/distroarchseriesfilter.py
+++ b/lib/lp/soyuz/model/distroarchseriesfilter.py
@@ -69,7 +69,7 @@ class DistroArchSeriesFilter(Storm):
     def __init__(self, distroarchseries, packageset, sense, creator,
             date_created=DEFAULT):
         """Construct a `DistroArchSeriesFilter`."""
-        super(DistroArchSeriesFilter, self).__init__()
+        super().__init__()
         self.distroarchseries = distroarchseries
         self.packageset = packageset
         self.sense = sense
diff --git a/lib/lp/soyuz/model/initializedistroseriesjob.py b/lib/lp/soyuz/model/initializedistroseriesjob.py
index 0af6d13..dd10c81 100644
--- a/lib/lp/soyuz/model/initializedistroseriesjob.py
+++ b/lib/lp/soyuz/model/initializedistroseriesjob.py
@@ -5,7 +5,6 @@ __all__ = [
     "InitializeDistroSeriesJob",
 ]
 
-import six
 from zope.interface import (
     implementer,
     provider,
@@ -216,12 +215,12 @@ class InitializeDistroSeriesJob(DistributionJobDerived):
         """
         # This method is called when error is an instance of
         # self.user_error_types.
-        super(InitializeDistroSeriesJob, self).notifyUserError(error)
+        super().notifyUserError(error)
         self.metadata = dict(
-            self.metadata, error_description=six.text_type(error))
+            self.metadata, error_description=str(error))
 
     def getOopsVars(self):
         """See `IRunnableJob`."""
-        vars = super(InitializeDistroSeriesJob, self).getOopsVars()
+        vars = super().getOopsVars()
         vars.append(('parent_distroseries_ids', self.metadata.get("parents")))
         return vars
diff --git a/lib/lp/soyuz/model/livefs.py b/lib/lp/soyuz/model/livefs.py
index 84e765f..ae3a92f 100644
--- a/lib/lp/soyuz/model/livefs.py
+++ b/lib/lp/soyuz/model/livefs.py
@@ -133,7 +133,7 @@ class LiveFS(Storm, WebhookTargetMixin):
         """Construct a `LiveFS`."""
         if not getFeatureFlag(LIVEFS_FEATURE_FLAG):
             raise LiveFSFeatureDisabled
-        super(LiveFS, self).__init__()
+        super().__init__()
         self.registrant = registrant
         self.owner = owner
         self.distro_series = distro_series
diff --git a/lib/lp/soyuz/model/livefsbuild.py b/lib/lp/soyuz/model/livefsbuild.py
index 7ec3e87..79865ec 100644
--- a/lib/lp/soyuz/model/livefsbuild.py
+++ b/lib/lp/soyuz/model/livefsbuild.py
@@ -92,7 +92,7 @@ class LiveFSFile(Storm):
 
     def __init__(self, livefsbuild, libraryfile):
         """Construct a `LiveFSFile`."""
-        super(LiveFSFile, self).__init__()
+        super().__init__()
         self.livefsbuild = livefsbuild
         self.libraryfile = libraryfile
 
@@ -163,7 +163,7 @@ class LiveFSBuild(PackageBuildMixin, Storm):
         """Construct a `LiveFSBuild`."""
         if not getFeatureFlag(LIVEFS_FEATURE_FLAG):
             raise LiveFSFeatureDisabled
-        super(LiveFSBuild, self).__init__()
+        super().__init__()
         self.build_farm_job = build_farm_job
         self.requester = requester
         self.livefs = livefs
@@ -303,7 +303,7 @@ class LiveFSBuild(PackageBuildMixin, Storm):
 
         edited_fields = set()
         with notify_modified(self, edited_fields) as previous_obj:
-            super(LiveFSBuild, self).updateStatus(
+            super().updateStatus(
                 status, builder=builder, slave_status=slave_status,
                 date_started=date_started, date_finished=date_finished,
                 force_invalid_transition=force_invalid_transition)
diff --git a/lib/lp/soyuz/model/livefsbuildbehaviour.py b/lib/lp/soyuz/model/livefsbuildbehaviour.py
index 700e5c0..510d17c 100644
--- a/lib/lp/soyuz/model/livefsbuildbehaviour.py
+++ b/lib/lp/soyuz/model/livefsbuildbehaviour.py
@@ -92,8 +92,7 @@ class LiveFSBuildBehaviour(BuildFarmJobBehaviourBase):
         Return the extra arguments required by the slave for the given build.
         """
         build = self.build
-        base_args = yield super(LiveFSBuildBehaviour, self).extraBuildArgs(
-            logger=logger)
+        base_args = yield super().extraBuildArgs(logger=logger)
         # Non-trivial metadata values may have been security-wrapped, which
         # is pointless here and just gets in the way of xmlrpc.client
         # serialisation.
diff --git a/lib/lp/soyuz/model/packagecopyjob.py b/lib/lp/soyuz/model/packagecopyjob.py
index f3a91a8..a3ede41 100644
--- a/lib/lp/soyuz/model/packagecopyjob.py
+++ b/lib/lp/soyuz/model/packagecopyjob.py
@@ -145,7 +145,7 @@ class PackageCopyJob(StormBase):
     def __init__(self, source_archive, target_archive, target_distroseries,
                  job_type, metadata, requester, package_name=None,
                  copy_policy=None):
-        super(PackageCopyJob, self).__init__()
+        super().__init__()
         self.job = Job()
         self.job.requester = requester
         self.job_type = job_type
@@ -228,7 +228,7 @@ class PackageCopyJobDerived(BaseRunnableJob, metaclass=EnumeratedSubclass):
 
     def getOopsVars(self):
         """See `IRunnableJob`."""
-        vars = super(PackageCopyJobDerived, self).getOopsVars()
+        vars = super().getOopsVars()
         vars.extend([
             ('source_archive_id', self.context.source_archive_id),
             ('target_archive_id', self.context.target_archive_id),
@@ -581,7 +581,7 @@ class PlainPackageCopyJob(PackageCopyJobDerived):
                 " package.  It was logged with id %s.  Sorry for the"
                 " inconvenience." % oops["id"])
             transaction.commit()
-        super(PlainPackageCopyJob, self).notifyOops(oops)
+        super().notifyOops(oops)
 
     @property
     def _advisory_lock_id(self):
@@ -624,7 +624,7 @@ class PlainPackageCopyJob(PackageCopyJobDerived):
             target_archive_purpose = self.target_archive.purpose
             self.logger.info("Job:\n%s\nraised CannotCopy:\n%s" % (self, e))
             self.abort()  # Abort the txn.
-            self.reportFailure(six.text_type(e))
+            self.reportFailure(str(e))
 
             # If there is an associated PackageUpload we need to reject it,
             # else it will sit in ACCEPTED forever.
@@ -663,7 +663,7 @@ class PlainPackageCopyJob(PackageCopyJobDerived):
             person=self.requester)
         if reason:
             # Wrap any forbidden-pocket error in CannotCopy.
-            raise CannotCopy(six.text_type(reason))
+            raise CannotCopy(str(reason))
 
         if self.silent and not self.requester_can_admin_target:
             raise CannotCopy(
diff --git a/lib/lp/soyuz/model/packagediff.py b/lib/lp/soyuz/model/packagediff.py
index c9ad7a3..90d2170 100644
--- a/lib/lp/soyuz/model/packagediff.py
+++ b/lib/lp/soyuz/model/packagediff.py
@@ -15,7 +15,6 @@ import shutil
 import subprocess
 import tempfile
 
-import six
 from storm.expr import Desc
 from storm.store import EmptyResultSet
 from zope.component import getUtility
@@ -215,7 +214,7 @@ class PackageDiff(SQLBase):
                 zip(directions, (self.from_source, self.to_source)))
 
             # Iterate over the packages to be diff'ed.
-            for direction, package in six.iteritems(packages):
+            for direction, package in packages.items():
                 # Create distinct directory locations for
                 # 'from' and 'to' files.
                 absolute_path = os.path.join(tmp_dir, direction)
diff --git a/lib/lp/soyuz/model/packageset.py b/lib/lp/soyuz/model/packageset.py
index 1aea015..d135b97 100644
--- a/lib/lp/soyuz/model/packageset.py
+++ b/lib/lp/soyuz/model/packageset.py
@@ -299,7 +299,7 @@ class Packageset(Storm):
 
     def addSources(self, names):
         """See `IPackageset`."""
-        if isinstance(names, six.string_types):
+        if isinstance(names, str):
             names = [six.ensure_text(names, 'ASCII')]
         clauses = (SourcePackageName, SourcePackageName.name.is_in(names))
         self._api_add_or_remove(clauses, self._addSourcePackageNames)
@@ -417,7 +417,7 @@ class PackagesetSet:
 
     def _nameToSourcePackageName(self, source_name):
         """Helper to convert a possible string name to ISourcePackageName."""
-        if isinstance(source_name, six.string_types):
+        if isinstance(source_name, str):
             source_name = getUtility(ISourcePackageNameSet)[source_name]
         return source_name
 
diff --git a/lib/lp/soyuz/model/processacceptedbugsjob.py b/lib/lp/soyuz/model/processacceptedbugsjob.py
index cfcb7f1..95c69a8 100644
--- a/lib/lp/soyuz/model/processacceptedbugsjob.py
+++ b/lib/lp/soyuz/model/processacceptedbugsjob.py
@@ -238,7 +238,7 @@ class ProcessAcceptedBugsJob(StormBase, BaseRunnableJob):
         self.distroseries = distroseries
         self.sourcepackagerelease = sourcepackagerelease
         self.metadata = {"bug_ids": list(bug_ids)}
-        super(ProcessAcceptedBugsJob, self).__init__()
+        super().__init__()
 
     @property
     def bug_ids(self):
diff --git a/lib/lp/soyuz/model/publishing.py b/lib/lp/soyuz/model/publishing.py
index 6141c93..421e649 100644
--- a/lib/lp/soyuz/model/publishing.py
+++ b/lib/lp/soyuz/model/publishing.py
@@ -20,7 +20,6 @@ import os
 import sys
 
 import pytz
-import six
 from storm.expr import (
     And,
     Cast,
@@ -485,11 +484,11 @@ class SourcePackagePublishingHistory(SQLBase, ArchivePublisherBase):
         # Check there is a change to make
         if new_component is None:
             new_component = self.component
-        elif isinstance(new_component, six.string_types):
+        elif isinstance(new_component, str):
             new_component = getUtility(IComponentSet)[new_component]
         if new_section is None:
             new_section = self.section
-        elif isinstance(new_section, six.string_types):
+        elif isinstance(new_section, str):
             new_section = getUtility(ISectionSet)[new_section]
 
         if new_component == self.component and new_section == self.section:
@@ -754,7 +753,7 @@ class BinaryPackagePublishingHistory(SQLBase, ArchivePublisherBase):
         if self.is_debug and not self.archive.publish_debug_symbols:
             self.setPublished()
         else:
-            super(BinaryPackagePublishingHistory, self).publish(diskpool, log)
+            super().publish(diskpool, log)
 
     def getOtherPublications(self):
         """See `IBinaryPackagePublishingHistory`."""
@@ -843,15 +842,15 @@ class BinaryPackagePublishingHistory(SQLBase, ArchivePublisherBase):
         # Check there is a change to make
         if new_component is None:
             new_component = self.component
-        elif isinstance(new_component, six.string_types):
+        elif isinstance(new_component, str):
             new_component = getUtility(IComponentSet)[new_component]
         if new_section is None:
             new_section = self.section
-        elif isinstance(new_section, six.string_types):
+        elif isinstance(new_section, str):
             new_section = getUtility(ISectionSet)[new_section]
         if new_priority is None:
             new_priority = self.priority
-        elif isinstance(new_priority, six.string_types):
+        elif isinstance(new_priority, str):
             new_priority = name_priority_map[new_priority]
         if new_phased_update_percentage is None:
             new_phased_update_percentage = self.phased_update_percentage
@@ -1031,7 +1030,7 @@ def expand_binary_requests(distroseries, binaries):
     arch_map = {arch.architecturetag: arch for arch in archs}
 
     expanded = []
-    for bpr, overrides in six.iteritems(binaries):
+    for bpr, overrides in binaries.items():
         if bpr.architecturespecific:
             # Find the DAS in this series corresponding to the original
             # build arch tag. If it does not exist or is disabled, we should
diff --git a/lib/lp/soyuz/model/queue.py b/lib/lp/soyuz/model/queue.py
index babe57a..712dd7a 100644
--- a/lib/lp/soyuz/model/queue.py
+++ b/lib/lp/soyuz/model/queue.py
@@ -16,7 +16,6 @@ from itertools import chain
 from operator import attrgetter
 
 import pytz
-import six
 from storm.expr import Cast
 from storm.locals import (
     And,
@@ -206,7 +205,7 @@ class PackageUpload(SQLBase):
                               joinColumn='packageupload')
 
     def __init__(self, *args, **kwargs):
-        super(PackageUpload, self).__init__(*args, **kwargs)
+        super().__init__(*args, **kwargs)
         # searchable_{name,version}s are set for the other cases when
         # add{Source,Build,Custom} are called.
         if self.package_copy_job:
@@ -973,7 +972,7 @@ class PackageUpload(SQLBase):
     def _nameToComponent(self, component):
         """Helper to convert a possible string component to IComponent."""
         try:
-            if isinstance(component, six.string_types):
+            if isinstance(component, str):
                 component = getUtility(IComponentSet)[component]
             return component
         except NotFoundError:
@@ -982,7 +981,7 @@ class PackageUpload(SQLBase):
     def _nameToSection(self, section):
         """Helper to convert a possible string section to ISection."""
         try:
-            if isinstance(section, six.string_types):
+            if isinstance(section, str):
                 section = getUtility(ISectionSet)[section]
             return section
         except NotFoundError:
@@ -991,7 +990,7 @@ class PackageUpload(SQLBase):
     def _nameToPriority(self, priority):
         """Helper to convert a possible string priority to its enum."""
         try:
-            if isinstance(priority, six.string_types):
+            if isinstance(priority, str):
                 priority = name_priority_map[priority]
             return priority
         except KeyError:
diff --git a/lib/lp/soyuz/model/sourcepackagerelease.py b/lib/lp/soyuz/model/sourcepackagerelease.py
index 8b07ecc..64086c3 100644
--- a/lib/lp/soyuz/model/sourcepackagerelease.py
+++ b/lib/lp/soyuz/model/sourcepackagerelease.py
@@ -145,7 +145,7 @@ class SourcePackageRelease(SQLBase):
         # loaded every time. Set it separately.
         if 'copyright' in kwargs:
             copyright = kwargs.pop('copyright')
-        super(SourcePackageRelease, self).__init__(*args, **kwargs)
+        super().__init__(*args, **kwargs)
         # PostgresSQL text columns can't contain null
         # characters, so remove them as this is only
         # used for display
diff --git a/lib/lp/soyuz/scripts/custom_uploads_copier.py b/lib/lp/soyuz/scripts/custom_uploads_copier.py
index 55cd1c7..43a0128 100644
--- a/lib/lp/soyuz/scripts/custom_uploads_copier.py
+++ b/lib/lp/soyuz/scripts/custom_uploads_copier.py
@@ -13,8 +13,6 @@ __all__ = [
 
 from operator import attrgetter
 
-import six
-
 from lp.archivepublisher.ddtp_tarball import DdtpTarballUpload
 from lp.archivepublisher.debian_installer import DebianInstallerUpload
 from lp.archivepublisher.dist_upgrader import DistUpgraderUpload
@@ -164,7 +162,7 @@ class CustomUploadsCopier:
             self.target_series, source_pocket=self.target_pocket)
         source_uploads = self.getLatestUploads(
             source_series, source_pocket=source_pocket)
-        for upload in six.itervalues(source_uploads):
+        for upload in source_uploads.values():
             if (not self.isObsolete(upload, target_uploads) and
                 self.isForValidDAS(upload)):
                 self.copyUpload(upload)
diff --git a/lib/lp/soyuz/scripts/ftpmasterbase.py b/lib/lp/soyuz/scripts/ftpmasterbase.py
index 0b3aa2e..7a1fe88 100644
--- a/lib/lp/soyuz/scripts/ftpmasterbase.py
+++ b/lib/lp/soyuz/scripts/ftpmasterbase.py
@@ -11,8 +11,6 @@ __all__ = [
     'SoyuzScript',
     ]
 
-from six.moves import input
-
 from lp.services.scripts.base import (
     LaunchpadScript,
     LaunchpadScriptFailure,
diff --git a/lib/lp/soyuz/scripts/gina/handlers.py b/lib/lp/soyuz/scripts/gina/handlers.py
index b527ab7..483af39 100644
--- a/lib/lp/soyuz/scripts/gina/handlers.py
+++ b/lib/lp/soyuz/scripts/gina/handlers.py
@@ -22,7 +22,6 @@ import io
 import os
 import re
 
-import six
 from storm.exceptions import NotOneError
 from storm.expr import (
     Cast,
@@ -504,8 +503,7 @@ class SourcePackageHandler:
             sp_version, sp_component))
         dsc_contents = parse_tagfile(dsc_path)
         dsc_contents = {
-            name.lower(): value for
-            (name, value) in six.iteritems(dsc_contents)}
+            name.lower(): value for (name, value) in dsc_contents.items()}
 
         # Since the dsc doesn't know, we add in the directory, package
         # component and section
diff --git a/lib/lp/soyuz/scripts/gina/runner.py b/lib/lp/soyuz/scripts/gina/runner.py
index df60215..fbdecf5 100644
--- a/lib/lp/soyuz/scripts/gina/runner.py
+++ b/lib/lp/soyuz/scripts/gina/runner.py
@@ -165,7 +165,7 @@ def import_sourcepackages(distro, packages_map, package_root,
 
 def do_one_sourcepackage(distro, source, package_root, importer_handler):
     source_data = SourcePackageData(**source)
-    skip_key = u'%s/%s/%s' % (distro, source_data.package, source_data.version)
+    skip_key = '%s/%s/%s' % (distro, source_data.package, source_data.version)
     skip_list = getFeatureFlag('soyuz.gina.skip_source_versions')
     if skip_list is not None and skip_key in skip_list.split():
         log.info(
diff --git a/lib/lp/soyuz/scripts/packagecopier.py b/lib/lp/soyuz/scripts/packagecopier.py
index c1fb6cb..d5388d3 100644
--- a/lib/lp/soyuz/scripts/packagecopier.py
+++ b/lib/lp/soyuz/scripts/packagecopier.py
@@ -259,8 +259,7 @@ class CopyChecker:
     def getCheckedCopies(self):
         """Return a list of copies allowed to be performed."""
         for copies in self._inventory.values():
-            for copy in copies:
-                yield copy
+            yield from copies
 
     def getConflicts(self, candidate):
         """Conflicting `CheckedCopy` objects in the inventory.
diff --git a/lib/lp/soyuz/scripts/populate_archive.py b/lib/lp/soyuz/scripts/populate_archive.py
index 0eb4f68..1b9b12b 100644
--- a/lib/lp/soyuz/scripts/populate_archive.py
+++ b/lib/lp/soyuz/scripts/populate_archive.py
@@ -36,7 +36,7 @@ def specified(option):
     """
     if option is None:
         return False
-    if isinstance(option, six.string_types) and option.strip() == '':
+    if isinstance(option, str) and option.strip() == '':
         return False
     return True
 
diff --git a/lib/lp/soyuz/scripts/ppareport.py b/lib/lp/soyuz/scripts/ppareport.py
index 94914fe..c9e106c 100644
--- a/lib/lp/soyuz/scripts/ppareport.py
+++ b/lib/lp/soyuz/scripts/ppareport.py
@@ -186,7 +186,7 @@ class PPAReportScript(LaunchpadScript):
         sorted_people_to_email = sorted(
             people_to_email, key=operator.attrgetter('name'))
         for user in sorted_people_to_email:
-            line = u"%s | %s | %s\n" % (
+            line = "%s | %s | %s\n" % (
                 user.name, user.displayname, user.preferredemail.email)
             self.output.write(six.ensure_str(line))
         self.output.write('\n')
diff --git a/lib/lp/soyuz/scripts/retrydepwait.py b/lib/lp/soyuz/scripts/retrydepwait.py
index a6a41af..9f86c24 100644
--- a/lib/lp/soyuz/scripts/retrydepwait.py
+++ b/lib/lp/soyuz/scripts/retrydepwait.py
@@ -33,7 +33,7 @@ class RetryDepwaitTunableLoop(TunableLoop):
     maximum_chunk_size = 5000
 
     def __init__(self, log, dry_run, abort_time=None):
-        super(RetryDepwaitTunableLoop, self).__init__(log, abort_time)
+        super().__init__(log, abort_time)
         self.dry_run = dry_run
         self.start_at = 1
         self.store = IStore(BinaryPackageBuild)
diff --git a/lib/lp/soyuz/scripts/tests/test_copypackage.py b/lib/lp/soyuz/scripts/tests/test_copypackage.py
index 62ced33..223f697 100644
--- a/lib/lp/soyuz/scripts/tests/test_copypackage.py
+++ b/lib/lp/soyuz/scripts/tests/test_copypackage.py
@@ -440,7 +440,7 @@ class CopyCheckerQueries(TestCaseWithFactory,
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(CopyCheckerQueries, self).setUp()
+        super().setUp()
         self.test_publisher = SoyuzTestPublisher()
         self.test_publisher.prepareBreezyAutotest()
         self.source = self.test_publisher.getPubSource()
@@ -458,8 +458,8 @@ class CopyCheckerQueries(TestCaseWithFactory,
         sources = []
         for i in range(nb_of_sources):
             source = self.test_publisher.getPubSource(
-                version=u'%d' % self.factory.getUniqueInteger(),
-                sourcename=u'name-%d' % self.factory.getUniqueInteger())
+                version='%d' % self.factory.getUniqueInteger(),
+                sourcename='name-%d' % self.factory.getUniqueInteger())
             sources.append(source)
         return sources
 
@@ -486,7 +486,7 @@ class CopyCheckerQueries(TestCaseWithFactory,
         recorder0 = self._recordCopyCheck(0, self.person, True)
         self.addDetail(
             "statement-count-0-sources",
-            text_content(u"%d" % recorder0.count))
+            text_content("%d" % recorder0.count))
         self.assertThat(recorder0, HasQueryCount(Equals(0)))
 
         # Compare the number of queries issued by calling checkCopy with
@@ -495,12 +495,12 @@ class CopyCheckerQueries(TestCaseWithFactory,
         recorder1 = self._recordCopyCheck(nb_of_sources, self.person, True)
         self.addDetail(
             "statement-count-%d-sources" % nb_of_sources,
-            text_content(u"%d" % recorder1.count))
+            text_content("%d" % recorder1.count))
         recorder2 = self._recordCopyCheck(
             nb_of_sources + 1, self.person, True)
         self.addDetail(
             "statement-count-%d-sources" % (nb_of_sources + 1),
-            text_content(u"%d" % recorder2.count))
+            text_content("%d" % recorder2.count))
 
         statement_count_per_source = 13
         self.assertThat(
@@ -518,7 +518,7 @@ class CopyCheckerQueries(TestCaseWithFactory,
             (recorder2.count - recorder1.count) / float(nb_of_sources))
         self.addDetail(
             "added-statement-count-perm-check",
-            text_content(u"%.3f" % added_statement_count_per_source))
+            text_content("%.3f" % added_statement_count_per_source))
 
         perm_check_statement_count = 3
         self.assertThat(
@@ -531,7 +531,7 @@ class CopyCheckerSameArchiveHarness(TestCaseWithFactory,
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(CopyCheckerSameArchiveHarness, self).setUp()
+        super().setUp()
         self.test_publisher = SoyuzTestPublisher()
         self.test_publisher.prepareBreezyAutotest()
         self.source = self.test_publisher.getPubSource()
@@ -609,7 +609,7 @@ class CopyCheckerDifferentArchiveHarness(TestCaseWithFactory,
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(CopyCheckerDifferentArchiveHarness, self).setUp()
+        super().setUp()
         self.test_publisher = SoyuzTestPublisher()
         self.test_publisher.prepareBreezyAutotest()
         self.source = self.test_publisher.getPubSource()
@@ -825,7 +825,7 @@ class CopyCheckerTestCase(TestCaseWithFactory):
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(CopyCheckerTestCase, self).setUp()
+        super().setUp()
         self.test_publisher = SoyuzTestPublisher()
         self.test_publisher.prepareBreezyAutotest()
 
@@ -1051,7 +1051,7 @@ class BaseDoCopyTests:
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(BaseDoCopyTests, self).setUp()
+        super().setUp()
         for arch in ('i386', 'hppa'):
             self.factory.makeProcessor(name='my_%s' % arch)
 
@@ -1130,14 +1130,14 @@ class BaseDoCopyTests:
 class TestDoDirectCopy(BaseDoCopyTests, TestCaseWithFactory):
 
     def setUp(self):
-        super(TestDoDirectCopy, self).setUp()
+        super().setUp()
         self.test_publisher = SoyuzTestPublisher()
         self.test_publisher.prepareBreezyAutotest()
 
     def assertCopied(self, copies, series, arch_tags):
         self.assertEqual(
-            [u'foo 666 in %s' % series.name] +
-            [u'foo-bin 666 in %s %s' % (series.name, arch_tag)
+            ['foo 666 in %s' % series.name] +
+            ['foo-bin 666 in %s %s' % (series.name, arch_tag)
              for arch_tag in arch_tags],
             [copy.displayname for copy in copies])
 
@@ -1782,7 +1782,7 @@ class TestCopyBuildRecords(TestCaseWithFactory):
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestCopyBuildRecords, self).setUp()
+        super().setUp()
         self.test_publisher = SoyuzTestPublisher()
         self.test_publisher.prepareBreezyAutotest()
         self.primary = self.test_publisher.ubuntutest.main_archive
@@ -2047,7 +2047,7 @@ class TestCopyClosesBugs(TestCaseWithFactory):
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestCopyClosesBugs, self).setUp()
+        super().setUp()
         self.test_publisher = SoyuzTestPublisher()
         self.test_publisher.prepareBreezyAutotest()
         self.ubuntutest = self.test_publisher.ubuntutest
diff --git a/lib/lp/soyuz/scripts/tests/test_expire_archive_files.py b/lib/lp/soyuz/scripts/tests/test_expire_archive_files.py
index fefef02..a5d381d 100644
--- a/lib/lp/soyuz/scripts/tests/test_expire_archive_files.py
+++ b/lib/lp/soyuz/scripts/tests/test_expire_archive_files.py
@@ -28,7 +28,7 @@ class ArchiveExpiryTestBase(TestCaseWithFactory):
 
     def setUp(self):
         """Set up some test publications."""
-        super(ArchiveExpiryTestBase, self).setUp()
+        super().setUp()
         # Configure the test publisher.
         switch_dbuser("launchpad")
         self.stp = SoyuzTestPublisher()
@@ -100,7 +100,7 @@ class ArchiveExpiryTestBase(TestCaseWithFactory):
             "lfa.expires should be None, but it's not.")
 
 
-class ArchiveExpiryCommonTests(object):
+class ArchiveExpiryCommonTests:
     """Common source/binary expiration test cases.
 
     These will be shared irrespective of archive type (ppa/partner).
@@ -233,7 +233,7 @@ class TestPPAExpiry(ArchiveExpiryTestBase, ArchiveExpiryCommonTests):
 
     def setUp(self):
         """Set up some test publications."""
-        super(TestPPAExpiry, self).setUp()
+        super().setUp()
         # Prepare two PPAs for the tests to use.
         self.archive = self.factory.makeArchive(
             distribution=getUtility(IDistributionSet)['ubuntutest'])
@@ -287,7 +287,7 @@ class TestPartnerExpiry(ArchiveExpiryTestBase, ArchiveExpiryCommonTests):
 
     def setUp(self):
         """Set up the partner archives under test."""
-        super(TestPartnerExpiry, self).setUp()
+        super().setUp()
         # Prepare two partner archives for the tests to use.
         self.archive = getUtility(IDistributionSet)[
             'ubuntutest'].getArchiveByComponent('partner')
diff --git a/lib/lp/soyuz/scripts/tests/test_gina.py b/lib/lp/soyuz/scripts/tests/test_gina.py
index 69720b1..f8174f3 100644
--- a/lib/lp/soyuz/scripts/tests/test_gina.py
+++ b/lib/lp/soyuz/scripts/tests/test_gina.py
@@ -248,7 +248,7 @@ class TestSourcePackageData(TestCaseWithFactory):
             # called in such a way as to cope with non-UTF-8 file names on
             # Python 2.  See
             # https://bugs.launchpad.net/launchpad/+bug/1917449.
-            orig_tar.add_file(u"íslenska.alias", b"Non-UTF-8 file name")
+            orig_tar.add_file("íslenska.alias", b"Non-UTF-8 file name")
             orig_tar.close()
             buffer.seek(0)
             orig_tar_contents = buffer.read()
@@ -309,7 +309,7 @@ class TestSourcePackageData(TestCaseWithFactory):
             # called in such a way as to cope with non-UTF-8 file names on
             # Python 2.  See
             # https://bugs.launchpad.net/launchpad/+bug/1917449.
-            orig_tar.add_file(u"íslenska.alias", b"Non-UTF-8 file name")
+            orig_tar.add_file("íslenska.alias", b"Non-UTF-8 file name")
             orig_tar.close()
             buffer.seek(0)
             orig_tar_contents = buffer.read()
diff --git a/lib/lp/soyuz/scripts/tests/test_initialize_distroseries.py b/lib/lp/soyuz/scripts/tests/test_initialize_distroseries.py
index b3edb46..f3fa2cc 100644
--- a/lib/lp/soyuz/scripts/tests/test_initialize_distroseries.py
+++ b/lib/lp/soyuz/scripts/tests/test_initialize_distroseries.py
@@ -194,10 +194,10 @@ class InitializationHelperTestCase(TestCaseWithFactory):
         # Setup the environment for testing the packaging links
         self.parent, self.parent_das = self.setupParent()
         test1 = getUtility(IPackagesetSet).new(
-            u'test1', u'test 1 packageset', self.parent.owner,
+            'test1', 'test 1 packageset', self.parent.owner,
             distroseries=self.parent)
         test2 = getUtility(IPackagesetSet).new(
-            u'test2', u'test 2 packageset', self.parent.owner,
+            'test2', 'test 2 packageset', self.parent.owner,
             distroseries=self.parent)
         packages_test1 = ['udev', 'chromium', 'libc6']
         packages_test2 = ['postgresql', 'vim']
@@ -351,9 +351,9 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
         # packagesets selected for the copy will make the queue check fail.
         parent, parent_das = self.setupParent()
         p1, packageset1, unsed = self.createPackageInPackageset(
-            parent, u'p1', u'packageset1', True)
+            parent, 'p1', 'packageset1', True)
         p2, packageset2, unsed = self.createPackageInPackageset(
-            parent, u'p2', u'packageset2', False)
+            parent, 'p2', 'packageset2', False)
 
         child = self.factory.makeDistroSeries(
             distribution=parent.distribution, previous_series=parent)
@@ -371,9 +371,9 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
         # packagesets selected for the copy won't make the queue check fail.
         parent, parent_das = self.setupParent()
         p1, packageset1, unused = self.createPackageInPackageset(
-            parent, u'p1', u'packageset1', True)
+            parent, 'p1', 'packageset1', True)
         p2, packageset2, unused = self.createPackageInPackageset(
-            parent, u'p2', u'packageset2', False)
+            parent, 'p2', 'packageset2', False)
 
         child = self.factory.makeDistroSeries(
             distribution=parent.distribution, previous_series=parent)
@@ -596,9 +596,9 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
         # initialize.
         parent, parent_das = self.setupParent()
         p1, packageset1, spr1 = self.createPackageInPackageset(
-            parent, u'p1', u'packageset1', False)
+            parent, 'p1', 'packageset1', False)
         p2, packageset2, spr2 = self.createPackageInPackageset(
-            parent, u'p2', u'packageset2', False)
+            parent, 'p2', 'packageset2', False)
 
         # Create a binary package upload for the package 'p2' inside
         # packageset 'packageset2'.
@@ -622,7 +622,7 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
         # initialize.
         parent, parent_das = self.setupParent()
         p1, packageset1, spr1 = self.createPackageInPackageset(
-            parent, u'p1', u'packageset1', False)
+            parent, 'p1', 'packageset1', False)
 
         # Create a binary package upload for the package 'p2' inside
         # packageset 'packageset2'.
@@ -648,31 +648,31 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
             child_pocket=PackagePublishingPocket.RELEASE):
         # Check that 'udev' has been copied correctly.
         parent_udev_pubs = parent.main_archive.getPublishedSources(
-            u'udev', distroseries=parent)
+            'udev', distroseries=parent)
         child_udev_pubs = child.main_archive.getPublishedSources(
-            u'udev', distroseries=child)
+            'udev', distroseries=child)
         self.assertEqual(
             parent_udev_pubs.count(), child_udev_pubs.count())
         self.assertEqual(
             {child_pocket}, {pub.pocket for pub in child_udev_pubs})
         parent_arch_udev_pubs = parent.main_archive.getAllPublishedBinaries(
-            distroarchseries=parent[parent_das.architecturetag], name=u'udev')
+            distroarchseries=parent[parent_das.architecturetag], name='udev')
         child_arch_udev_pubs = child.main_archive.getAllPublishedBinaries(
-            distroarchseries=child[parent_das.architecturetag], name=u'udev')
+            distroarchseries=child[parent_das.architecturetag], name='udev')
         self.assertEqual(
             parent_arch_udev_pubs.count(), child_arch_udev_pubs.count())
         self.assertEqual(
             {child_pocket}, {pub.pocket for pub in child_arch_udev_pubs})
         # And the binary package, and linked source package look fine too.
         udev_bin = child_arch_udev_pubs[0].binarypackagerelease
-        self.assertEqual(udev_bin.title, u'udev-0.1-1')
+        self.assertEqual(udev_bin.title, 'udev-0.1-1')
         self.assertEqual(
             udev_bin.build.title,
-            u'%s build of udev 0.1-1 in %s %s RELEASE' % (
+            '%s build of udev 0.1-1 in %s %s RELEASE' % (
                 parent_das.architecturetag, parent.parent.name,
                 parent.name))
         udev_src = udev_bin.build.source_package_release
-        self.assertEqual(udev_src.title, u'udev - 0.1-1')
+        self.assertEqual(udev_src.title, 'udev - 0.1-1')
         # The build of udev 0.1-1 has been copied across.
         bpbs = getUtility(IBinaryPackageBuildSet)
         child_udev = bpbs.findBuiltOrPublishedBySourceAndArchive(
@@ -721,22 +721,22 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
         self.parent, self.parent_das = self.setupParent()
         uploader = self.factory.makePerson()
         test1 = getUtility(IPackagesetSet).new(
-            u'test1', u'test 1 packageset', self.parent.owner,
+            'test1', 'test 1 packageset', self.parent.owner,
             distroseries=self.parent)
         test2 = getUtility(IPackagesetSet).new(
-            u'test2', u'test 2 packageset', self.parent.owner,
+            'test2', 'test 2 packageset', self.parent.owner,
             distroseries=self.parent)
         test3 = getUtility(IPackagesetSet).new(
-            u'test3', u'test 3 packageset', self.parent.owner,
+            'test3', 'test 3 packageset', self.parent.owner,
             distroseries=self.parent, related_set=test2)
         test1.addSources('udev')
         getUtility(IArchivePermissionSet).newPackagesetUploader(
             self.parent.main_archive, uploader, test1)
         child = self._fullInitialize([self.parent])
         # We can fetch the copied sets from the child.
-        child_test1 = getUtility(IPackagesetSet).getByName(child, u'test1')
-        child_test2 = getUtility(IPackagesetSet).getByName(child, u'test2')
-        child_test3 = getUtility(IPackagesetSet).getByName(child, u'test3')
+        child_test1 = getUtility(IPackagesetSet).getByName(child, 'test1')
+        child_test2 = getUtility(IPackagesetSet).getByName(child, 'test2')
+        child_test3 = getUtility(IPackagesetSet).getByName(child, 'test3')
         # And we can see they are exact copies, with the related_set for the
         # copies pointing to the packageset in the parent.
         self.assertEqual(test1.description, child_test1.description)
@@ -765,7 +765,7 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
             packages={'firefox': '3.1'})
         uploader = self.factory.makePerson()
         test1 = getUtility(IPackagesetSet).new(
-            u'test1', u'test 1 packageset', self.parent1.owner,
+            'test1', 'test 1 packageset', self.parent1.owner,
             distroseries=self.parent1)
         test1.addSources('udev')
         test1.addSources('firefox')
@@ -782,7 +782,7 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
               s.sourcepackagerelease.version)
                 for s in published_sources)
         self.assertContentEqual(
-            [(u'udev', u'0.1-1'), (u'firefox', u'2.1')],
+            [('udev', '0.1-1'), ('firefox', '2.1')],
             pub_sources)
 
     def test_copying_packagesets_no_duplication(self):
@@ -792,7 +792,7 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
         parent = self._fullInitialize([previous_parent])
         self.factory.makeSourcePackagePublishingHistory(distroseries=parent)
         p1, parent_packageset, _ = self.createPackageInPackageset(
-            parent, u"p1", u"packageset")
+            parent, "p1", "packageset")
         uploader1 = self.factory.makePerson()
         getUtility(IArchivePermissionSet).newPackagesetUploader(
             parent.main_archive, uploader1, parent_packageset)
@@ -802,8 +802,8 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
         # Make sure the child's packageset has disjoint packages and
         # permissions.
         p2, child_packageset, _ = self.createPackageInPackageset(
-            child, u"p2", u"packageset")
-        child_packageset.removeSources([u"p1"])
+            child, "p2", "packageset")
+        child_packageset.removeSources(["p1"])
         uploader2 = self.factory.makePerson()
         getUtility(IArchivePermissionSet).newPackagesetUploader(
             child.main_archive, uploader2, child_packageset)
@@ -834,7 +834,7 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
         uploader = self.factory.makePerson()
         releaser = self.factory.makePerson()
         test1 = self.factory.makePackageset(
-            u'test1', u'test 1 packageset', parent.owner,
+            'test1', 'test 1 packageset', parent.owner,
             distroseries=parent)
         #test1 = getUtility(IPackagesetSet).new(
         #    u'test1', u'test 1 packageset', self.parent.owner,
@@ -876,7 +876,7 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
         uploader = self.factory.makePerson()
         releaser = self.factory.makePerson()
         test1 = getUtility(IPackagesetSet).new(
-            u'test1', u'test 1 packageset', self.parent.owner,
+            'test1', 'test 1 packageset', self.parent.owner,
             distroseries=self.parent)
         test1.addSources('udev')
         archive_permset = getUtility(IArchivePermissionSet)
@@ -1030,10 +1030,10 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
         self.parent, self.parent_das = self.setupParent(packages={})
         ps_owner = self.factory.makePerson()
         getUtility(IPackagesetSet).new(
-            u'ps', u'packageset', ps_owner, distroseries=self.parent)
+            'ps', 'packageset', ps_owner, distroseries=self.parent)
         child = self._fullInitialize(
             [self.parent], distribution=self.parent.distribution)
-        child_ps = getUtility(IPackagesetSet).getByName(child, u'ps')
+        child_ps = getUtility(IPackagesetSet).getByName(child, 'ps')
         self.assertEqual(ps_owner, child_ps.owner)
 
     def test_packageset_owner_not_preserved_cross_distro(self):
@@ -1041,10 +1041,10 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
         # packagesets are owned by the new distro owner.
         self.parent, self.parent_das = self.setupParent()
         getUtility(IPackagesetSet).new(
-            u'ps', u'packageset', self.factory.makePerson(),
+            'ps', 'packageset', self.factory.makePerson(),
             distroseries=self.parent)
         child = self._fullInitialize([self.parent])
-        child_ps = getUtility(IPackagesetSet).getByName(child, u'ps')
+        child_ps = getUtility(IPackagesetSet).getByName(child, 'ps')
         self.assertEqual(child.owner, child_ps.owner)
 
     def test_copy_limit_packagesets(self):
@@ -1052,23 +1052,23 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
         # want to copy.
         self.parent, self.parent_das = self.setupParent()
         test1 = getUtility(IPackagesetSet).new(
-            u'test1', u'test 1 packageset', self.parent.owner,
+            'test1', 'test 1 packageset', self.parent.owner,
             distroseries=self.parent)
         getUtility(IPackagesetSet).new(
-            u'test2', u'test 2 packageset', self.parent.owner,
+            'test2', 'test 2 packageset', self.parent.owner,
             distroseries=self.parent)
         packages = ('udev', 'chromium', 'libc6')
         for pkg in packages:
             test1.addSources(pkg)
         packageset1 = getUtility(IPackagesetSet).getByName(
-            self.parent, u'test1')
+            self.parent, 'test1')
         child = self._fullInitialize(
             [self.parent], packagesets=(str(packageset1.id),))
-        child_test1 = getUtility(IPackagesetSet).getByName(child, u'test1')
+        child_test1 = getUtility(IPackagesetSet).getByName(child, 'test1')
         self.assertEqual(test1.description, child_test1.description)
         self.assertRaises(
             NoSuchPackageSet, getUtility(IPackagesetSet).getByName,
-            child, u'test2')
+            child, 'test2')
         parent_srcs = test1.getSourcesIncluded(direct_inclusion=True)
         child_srcs = child_test1.getSourcesIncluded(
             direct_inclusion=True)
@@ -1081,10 +1081,10 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
         # If a parent series has packagesets, we don't want to copy any of them
         self.parent, self.parent_das = self.setupParent()
         test1 = getUtility(IPackagesetSet).new(
-            u'test1', u'test 1 packageset', self.parent.owner,
+            'test1', 'test 1 packageset', self.parent.owner,
             distroseries=self.parent)
         getUtility(IPackagesetSet).new(
-            u'test2', u'test 2 packageset', self.parent.owner,
+            'test2', 'test 2 packageset', self.parent.owner,
             distroseries=self.parent)
         packages = ('udev', 'chromium', 'libc6')
         for pkg in packages:
@@ -1093,10 +1093,10 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
             [self.parent], packagesets=[])
         self.assertRaises(
             NoSuchPackageSet, getUtility(IPackagesetSet).getByName,
-            child, u'test1')
+            child, 'test1')
         self.assertRaises(
             NoSuchPackageSet, getUtility(IPackagesetSet).getByName,
-            child, u'test2')
+            child, 'test2')
         self.assertEqual(child.sourcecount, 0)
         self.assertEqual(child.binarycount, 0)
 
@@ -1104,10 +1104,10 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
         # If a parent series has packagesets, we want to copy all of them
         self.parent, self.parent_das = self.setupParent()
         test1 = getUtility(IPackagesetSet).new(
-            u'test1', u'test 1 packageset', self.parent.owner,
+            'test1', 'test 1 packageset', self.parent.owner,
             distroseries=self.parent)
         test2 = getUtility(IPackagesetSet).new(
-            u'test2', u'test 2 packageset', self.parent.owner,
+            'test2', 'test 2 packageset', self.parent.owner,
             distroseries=self.parent)
         packages_test1 = ('udev', 'chromium', 'libc6')
         packages_test2 = ('postgresql', 'vim')
@@ -1117,8 +1117,8 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
             test2.addSources(pkg)
         child = self._fullInitialize(
             [self.parent], packagesets=None)
-        child_test1 = getUtility(IPackagesetSet).getByName(child, u'test1')
-        child_test2 = getUtility(IPackagesetSet).getByName(child, u'test2')
+        child_test1 = getUtility(IPackagesetSet).getByName(child, 'test1')
+        child_test2 = getUtility(IPackagesetSet).getByName(child, 'test2')
         self.assertEqual(test1.description, child_test1.description)
         self.assertEqual(test2.description, child_test2.description)
         parent_srcs_test1 = test1.getSourcesIncluded(direct_inclusion=True)
@@ -1139,7 +1139,7 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
         # the packaging links for the copied packages are copied.
         packages_test1, packages_test2 = self.setupPackagingTesting()
         packageset1 = getUtility(IPackagesetSet).getByName(
-            self.parent, u'test1')
+            self.parent, 'test1')
         child = self._fullInitialize(
             [self.parent], packagesets=(str(packageset1.id),))
         packagings = child.getMostRecentlyLinkedPackagings()
@@ -1197,10 +1197,10 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
         # for the copied source will be created.
         self.parent, self.parent_das = self.setupParent()
         test1 = getUtility(IPackagesetSet).new(
-            u'test1', u'test 1 packageset', self.parent.owner,
+            'test1', 'test 1 packageset', self.parent.owner,
             distroseries=self.parent)
         getUtility(IPackagesetSet).new(
-            u'test2', u'test 2 packageset', self.parent.owner,
+            'test2', 'test 2 packageset', self.parent.owner,
             distroseries=self.parent)
         packages = ('udev', 'chromium')
         for pkg in packages:
@@ -1331,10 +1331,10 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
         uploader1 = self.factory.makePerson()
         uploader2 = self.factory.makePerson()
         test1_parent1 = getUtility(IPackagesetSet).new(
-            u'test1', u'test 1 packageset', self.parent1.owner,
+            'test1', 'test 1 packageset', self.parent1.owner,
             distroseries=self.parent1)
         test1_parent2 = getUtility(IPackagesetSet).new(
-            u'test1', u'test 1 packageset', self.parent2.owner,
+            'test1', 'test 1 packageset', self.parent2.owner,
             distroseries=self.parent2)
         test1_parent1.addSources('chromium')
         test1_parent1.addSources('udev')
@@ -1347,7 +1347,7 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
         child = self._fullInitialize([self.parent1, self.parent2])
 
         # In the child, the identical packagesets are merged into one.
-        child_test1 = getUtility(IPackagesetSet).getByName(child, u'test1')
+        child_test1 = getUtility(IPackagesetSet).getByName(child, 'test1')
         child_srcs = child_test1.getSourcesIncluded(
             direct_inclusion=True)
         parent1_srcs = test1_parent1.getSourcesIncluded(direct_inclusion=True)
@@ -1449,8 +1449,8 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
         # If the series to be initialized is in a distribution with
         # initialized series, the series is *derived* from
         # the previous_series' parents.
-        previous_parent1, unused = self.setupParent(packages={u'p1': u'1.2'})
-        previous_parent2, unused = self.setupParent(packages={u'p2': u'1.5'})
+        previous_parent1, unused = self.setupParent(packages={'p1': '1.2'})
+        previous_parent2, unused = self.setupParent(packages={'p2': '1.5'})
         child = self.setUpSeriesWithPreviousSeries(
             previous_parents=[previous_parent1, previous_parent2])
         parent, unused = self.setupParent()
@@ -1471,14 +1471,14 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
               s.sourcepackagerelease.version)
                 for s in published_sources)
         self.assertEqual(
-            [(u'p1', u'1.2'), (u'p2', u'1.5')],
+            [('p1', '1.2'), ('p2', '1.5')],
             pub_sources)
 
     def test_derive_from_previous_parents_empty_parents(self):
         # If an empty list is passed to InitializeDistroSeries, the
         # parents of the previous series are used as parents.
-        previous_parent1, unused = self.setupParent(packages={u'p1': u'1.2'})
-        previous_parent2, unused = self.setupParent(packages={u'p2': u'1.5'})
+        previous_parent1, unused = self.setupParent(packages={'p1': '1.2'})
+        previous_parent2, unused = self.setupParent(packages={'p2': '1.5'})
         child = self.setUpSeriesWithPreviousSeries(
             previous_parents=[previous_parent1, previous_parent2])
         # Initialize from an empty list of parents.
@@ -1491,7 +1491,7 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
     def test_derive_empty_parents_distribution_not_initialized(self):
         # Initializing a series with an empty parent list if the series'
         # distribution has no initialized series triggers an error.
-        previous_parent1, unused = self.setupParent(packages={u'p1': u'1.2'})
+        previous_parent1, unused = self.setupParent(packages={'p1': '1.2'})
         child = self.setUpSeriesWithPreviousSeries(
             previous_parents=[previous_parent1],
             publish_in_distribution=False,
@@ -1601,7 +1601,7 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
         # The new publishings, copied over from the parents, have their
         # 'creator' field set to None.  This tests that behaviour when
         # the cloner is used to perform the initialization.
-        parent, unused = self.setupParent(packages={u'p1': u'1.2'})
+        parent, unused = self.setupParent(packages={'p1': '1.2'})
         child = self.setUpSeriesWithPreviousSeries(previous_parents=[parent])
         self.factory.makeSourcePackagePublishingHistory(distroseries=child)
         self._fullInitialize([parent], child=child)
@@ -1614,7 +1614,7 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
         # The new publishings, copied over from the parents, have their
         # 'creator' field set to None.  This tests that behaviour when
         # the copier is used to perform the initialization.
-        parent, unused = self.setupParent(packages={u'p1': u'1.2'})
+        parent, unused = self.setupParent(packages={'p1': '1.2'})
         child = self.setUpSeriesWithPreviousSeries(previous_parents=[parent])
         self._fullInitialize([parent], child=child)
 
@@ -1626,8 +1626,8 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
         # IDS._has_same_parents_as_previous_series returns True if the
         # parents for the series to be initialized are the same as
         # previous_series' parents.
-        prev_parent1, unused = self.setupParent(packages={u'p1': u'1.2'})
-        prev_parent2, unused = self.setupParent(packages={u'p2': u'1.5'})
+        prev_parent1, unused = self.setupParent(packages={'p1': '1.2'})
+        prev_parent2, unused = self.setupParent(packages={'p2': '1.5'})
         child = self.setUpSeriesWithPreviousSeries(
             previous_parents=[prev_parent1, prev_parent2])
         # The same parents can be explicitely set.
@@ -1640,8 +1640,8 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
         # IDS._has_same_parents_as_previous_series returns True if the
         # parents for the series to be initialized are the same as
         # previous_series' parents.
-        prev_parent1, unused = self.setupParent(packages={u'p1': u'1.2'})
-        prev_parent2, unused = self.setupParent(packages={u'p2': u'1.5'})
+        prev_parent1, unused = self.setupParent(packages={'p1': '1.2'})
+        prev_parent2, unused = self.setupParent(packages={'p2': '1.5'})
         child = self.setUpSeriesWithPreviousSeries(
             previous_parents=[prev_parent1, prev_parent2])
         # If no parents are provided, the parents from previous_series
@@ -1654,8 +1654,8 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
         # IDS._has_same_parents_as_previous_series returns False if the
         # parents for the series to be initialized are *not* the same as
         # previous_series' parents.
-        prev_parent1, unused = self.setupParent(packages={u'p1': u'1.2'})
-        prev_parent2, unused = self.setupParent(packages={u'p2': u'1.5'})
+        prev_parent1, unused = self.setupParent(packages={'p1': '1.2'})
+        prev_parent2, unused = self.setupParent(packages={'p2': '1.5'})
         child = self.setUpSeriesWithPreviousSeries(
             previous_parents=[prev_parent1, prev_parent2])
         parent3 = self.factory.makeDistroSeries()
@@ -1668,24 +1668,24 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
         # Post-first initialization of a series with the same parents
         # than those of the previous_series causes a copy of
         # previous_series' DSDs.
-        prev_parent1, unused = self.setupParent(packages={u'p1': u'1.2'})
-        prev_parent2, unused = self.setupParent(packages={u'p2': u'1.5'})
+        prev_parent1, unused = self.setupParent(packages={'p1': '1.2'})
+        prev_parent2, unused = self.setupParent(packages={'p2': '1.5'})
         child = self.setUpSeriesWithPreviousSeries(
             previous_parents=[prev_parent1, prev_parent2])
         self.factory.makeDistroSeriesDifference()
         self.factory.makeDistroSeriesDifference(
             derived_series=child.previous_series,
-            source_package_name_str=u'p1')
+            source_package_name_str='p1')
         self.factory.makeDistroSeriesDifference(
             derived_series=child.previous_series,
-            source_package_name_str=u'p2')
+            source_package_name_str='p2')
         dsd_source = getUtility(IDistroSeriesDifferenceSource)
         # No DSDs for the child yet.
         self.assertEqual(0, dsd_source.getForDistroSeries(child).count())
         self._fullInitialize([], child=child)
 
         self.assertContentEqual(
-            [u'p1', u'p2'],
+            ['p1', 'p2'],
             [
                 diff.source_package_name.name
                 for diff in dsd_source.getForDistroSeries(child)])
@@ -1704,8 +1704,8 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
     def test_initialization_first_deriv_create_dsdjs(self):
         # A first initialization of a series creates the creation
         # of the DSDJs with all the parents.
-        parent1, unused = self.setupParent(packages={u'p1': u'1.2'})
-        parent2, unused = self.setupParent(packages={u'p2': u'1.5'})
+        parent1, unused = self.setupParent(packages={'p1': '1.2'})
+        parent2, unused = self.setupParent(packages={'p2': '1.5'})
         child = self._fullInitialize([parent1, parent2])
 
         self.assertNotEqual([], self.getWaitingJobs(child, 'p1', parent1))
@@ -1715,12 +1715,12 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
         # Post-first initialization of a series with different parents
         # than those of the previous_series creates the DSDJs to
         # compute the DSDs with the parents.
-        prev_parent1, unused = self.setupParent(packages={u'p1': u'1.2'})
-        prev_parent2, unused = self.setupParent(packages={u'p2': u'1.5'})
+        prev_parent1, unused = self.setupParent(packages={'p1': '1.2'})
+        prev_parent2, unused = self.setupParent(packages={'p2': '1.5'})
         child = self.setUpSeriesWithPreviousSeries(
             previous_parents=[prev_parent1, prev_parent2])
         parent3, unused = self.setupParent(
-            packages={u'p2': u'2.5', u'p3': u'1.1'})
+            packages={'p2': '2.5', 'p3': '1.1'})
         self._fullInitialize(
             [prev_parent1, prev_parent2, parent3], child=child)
 
@@ -1736,16 +1736,16 @@ class TestInitializeDistroSeries(InitializationHelperTestCase):
         # packagesets creates the DSDJs for the packages inside these
         # packagesets.
         prev_parent1, unused = self.setupParent(
-            packages={u'p1': u'1.2', u'p11': u'3.1'})
-        prev_parent2, unused = self.setupParent(packages={u'p2': u'1.5'})
+            packages={'p1': '1.2', 'p11': '3.1'})
+        prev_parent2, unused = self.setupParent(packages={'p2': '1.5'})
         child = self.setUpSeriesWithPreviousSeries(
             previous_parents=[prev_parent1, prev_parent2])
         test1 = getUtility(IPackagesetSet).new(
-            u'test1', u'test 1 packageset', child.previous_series.owner,
+            'test1', 'test 1 packageset', child.previous_series.owner,
             distroseries=child.previous_series)
         test1.addSources('p1')
         parent3, unused = self.setupParent(
-            packages={u'p1': u'2.5', u'p3': u'4.4'})
+            packages={'p1': '2.5', 'p3': '4.4'})
         self._fullInitialize(
             [prev_parent1, prev_parent2, parent3], child=child,
             packagesets=(str(test1.id),))
diff --git a/lib/lp/soyuz/scripts/tests/test_obsoletedistroseries.py b/lib/lp/soyuz/scripts/tests/test_obsoletedistroseries.py
index 166f5db..f296c35 100644
--- a/lib/lp/soyuz/scripts/tests/test_obsoletedistroseries.py
+++ b/lib/lp/soyuz/scripts/tests/test_obsoletedistroseries.py
@@ -71,7 +71,7 @@ class TestObsoleteDistroseries(TestCaseWithFactory):
 
     def setUp(self):
         """Set up test data common to all test cases."""
-        super(TestObsoleteDistroseries, self).setUp()
+        super().setUp()
         self.warty = getUtility(IDistributionSet)['ubuntu']['warty']
 
         # Re-process the returned list otherwise it ends up being a list
diff --git a/lib/lp/soyuz/scripts/tests/test_populatearchive.py b/lib/lp/soyuz/scripts/tests/test_populatearchive.py
index c3b810f..d2826a3 100644
--- a/lib/lp/soyuz/scripts/tests/test_populatearchive.py
+++ b/lib/lp/soyuz/scripts/tests/test_populatearchive.py
@@ -46,14 +46,14 @@ class TestPopulateArchiveScript(TestCaseWithFactory):
 
     layer = LaunchpadZopelessLayer
     expected_build_spns = [
-        u'alsa-utils', u'cnews', u'evolution', u'libstdc++',
-        u'linux-source-2.6.15', u'netapplet']
+        'alsa-utils', 'cnews', 'evolution', 'libstdc++',
+        'linux-source-2.6.15', 'netapplet']
     expected_src_names = [
-        u'alsa-utils 1.0.9a-4ubuntu1 in hoary',
-        u'cnews cr.g7-37 in hoary', u'evolution 1.0 in hoary',
-        u'libstdc++ b8p in hoary',
-        u'linux-source-2.6.15 2.6.15.3 in hoary',
-        u'netapplet 1.0-1 in hoary', u'pmount 0.1-2 in hoary']
+        'alsa-utils 1.0.9a-4ubuntu1 in hoary',
+        'cnews cr.g7-37 in hoary', 'evolution 1.0 in hoary',
+        'libstdc++ b8p in hoary',
+        'linux-source-2.6.15 2.6.15.3 in hoary',
+        'netapplet 1.0-1 in hoary', 'pmount 0.1-2 in hoary']
     pending_statuses = (
         PackagePublishingStatus.PENDING,
         PackagePublishingStatus.PUBLISHED)
@@ -675,7 +675,7 @@ class TestPopulateArchiveScript(TestCaseWithFactory):
             archive=ubuntu.main_archive)
         sources = ubuntu.main_archive.getPublishedSources(
             distroseries=hoary, status=self.pending_statuses,
-            name=u'alsa-utils')
+            name='alsa-utils')
         for src in sources:
             if src.source_package_version != '2.0':
                 src.supersede()
diff --git a/lib/lp/soyuz/scripts/tests/test_ppa_apache_log_parser.py b/lib/lp/soyuz/scripts/tests/test_ppa_apache_log_parser.py
index 50db145..c56a4ab 100644
--- a/lib/lp/soyuz/scripts/tests/test_ppa_apache_log_parser.py
+++ b/lib/lp/soyuz/scripts/tests/test_ppa_apache_log_parser.py
@@ -71,7 +71,7 @@ class TestScriptRunning(TestCaseWithFactory):
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestScriptRunning, self).setUp()
+        super().setUp()
         self.publisher = SoyuzTestPublisher()
         self.publisher.prepareBreezyAutotest()
 
diff --git a/lib/lp/soyuz/scripts/tests/test_retrydepwait.py b/lib/lp/soyuz/scripts/tests/test_retrydepwait.py
index 26b518e..24b2462 100644
--- a/lib/lp/soyuz/scripts/tests/test_retrydepwait.py
+++ b/lib/lp/soyuz/scripts/tests/test_retrydepwait.py
@@ -23,7 +23,7 @@ class TestRetryDepwait(TestCaseWithFactory):
     layer = ZopelessDatabaseLayer
 
     def setUp(self):
-        super(TestRetryDepwait, self).setUp()
+        super().setUp()
         self.chroot = getUtility(ILibraryFileAliasSet)[1]
         self.build = removeSecurityProxy(
             self.factory.makeBinaryPackageBuild(
@@ -48,7 +48,7 @@ class TestRetryDepwait(TestCaseWithFactory):
         # Builds with unsatisfied dependencies are not retried.
         self.build.updateStatus(
             BuildStatus.MANUALDEPWAIT,
-            slave_status={'dependencies': u'something'})
+            slave_status={'dependencies': 'something'})
         self.assertStatusAfterLoop(BuildStatus.MANUALDEPWAIT)
         self.assertEqual(1, self.build.updateDependencies.call_count)
 
diff --git a/lib/lp/soyuz/tests/test_archive.py b/lib/lp/soyuz/tests/test_archive.py
index ac1fb04..9e7be9a 100644
--- a/lib/lp/soyuz/tests/test_archive.py
+++ b/lib/lp/soyuz/tests/test_archive.py
@@ -15,7 +15,6 @@ import os.path
 from aptsources.sourceslist import SourceEntry
 from pytz import UTC
 import responses
-import six
 from six.moves.urllib.parse import urlsplit
 from storm.store import Store
 from testtools.matchers import (
@@ -1048,7 +1047,7 @@ class TestUpdatePackageDownloadCount(TestCaseWithFactory):
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestUpdatePackageDownloadCount, self).setUp()
+        super().setUp()
         self.publisher = SoyuzTestPublisher()
         self.publisher.prepareBreezyAutotest()
 
@@ -1155,7 +1154,7 @@ class TestProcessors(TestCaseWithFactory):
 
     def setUp(self):
         """Setup an archive with relevant publications."""
-        super(TestProcessors, self).setUp(user='foo.bar@xxxxxxxxxxxxx')
+        super().setUp(user='foo.bar@xxxxxxxxxxxxx')
         self.publisher = SoyuzTestPublisher()
         self.publisher.prepareBreezyAutotest()
         self.archive = self.factory.makeArchive()
@@ -1287,7 +1286,7 @@ class TestArchiveTokens(TestCaseWithFactory):
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestArchiveTokens, self).setUp()
+        super().setUp()
         owner = self.factory.makePerson()
         self.private_ppa = self.factory.makeArchive(owner=owner, private=True)
         self.joe = self.factory.makePerson(name='joe')
@@ -1454,7 +1453,7 @@ class TestGetBinaryPackageRelease(TestCaseWithFactory):
 
     def setUp(self):
         """Setup an archive with relevant publications."""
-        super(TestGetBinaryPackageRelease, self).setUp()
+        super().setUp()
         self.publisher = SoyuzTestPublisher()
         self.publisher.prepareBreezyAutotest()
 
@@ -1549,7 +1548,7 @@ class TestGetBinaryPackageReleaseByFileName(TestCaseWithFactory):
 
     def setUp(self):
         """Setup an archive with relevant publications."""
-        super(TestGetBinaryPackageReleaseByFileName, self).setUp()
+        super().setUp()
         self.publisher = SoyuzTestPublisher()
         self.publisher.prepareBreezyAutotest()
 
@@ -1730,7 +1729,7 @@ class TestBuildDebugSymbols(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestBuildDebugSymbols, self).setUp()
+        super().setUp()
         self.archive = self.factory.makeArchive()
 
     def test_build_debug_symbols_is_public(self):
@@ -1887,7 +1886,7 @@ class TestFindDepCandidates(TestCaseWithFactory):
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestFindDepCandidates, self).setUp()
+        super().setUp()
         self.archive = self.factory.makeArchive()
         self.publisher = SoyuzTestPublisher()
         login('admin@xxxxxxxxxxxxx')
@@ -2052,12 +2051,12 @@ class TestOverlays(TestCaseWithFactory):
                    overlay=True, arch_tag='i386',
                    publish_base_url='http://archive.launchpad.test/'):
         # Helper to create a parent/child relationship.
-        if isinstance(parent_distro, six.string_types):
+        if isinstance(parent_distro, str):
             depdistro = self.factory.makeDistribution(parent_distro,
                 publish_base_url=publish_base_url)
         else:
             depdistro = parent_distro
-        if isinstance(parent_series, six.string_types):
+        if isinstance(parent_series, str):
             depseries = self.factory.makeDistroSeries(
                 name=parent_series, distribution=depdistro)
             self.factory.makeDistroArchSeries(
@@ -2195,7 +2194,7 @@ class TestValidatePPA(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestValidatePPA, self).setUp()
+        super().setUp()
         self.ubuntu = getUtility(IDistributionSet)['ubuntu']
         self.ubuntutest = getUtility(IDistributionSet)['ubuntutest']
         with admin_logged_in():
@@ -2324,7 +2323,7 @@ class TestGetComponentsForSeries(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestGetComponentsForSeries, self).setUp()
+        super().setUp()
         self.series = self.factory.makeDistroSeries()
         self.comp1 = self.factory.makeComponent()
         self.comp2 = self.factory.makeComponent()
@@ -2401,7 +2400,7 @@ class TestGetFileByName(TestCaseWithFactory):
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestGetFileByName, self).setUp()
+        super().setUp()
         self.archive = self.factory.makeArchive()
 
     def test_unknown_file_is_not_found(self):
@@ -2510,7 +2509,7 @@ class TestGetSourceFileByName(TestCaseWithFactory):
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestGetSourceFileByName, self).setUp()
+        super().setUp()
         self.archive = self.factory.makeArchive()
 
     def test_source_file_is_found(self):
@@ -3701,7 +3700,7 @@ class TestGetPPAOwnedByPerson(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestGetPPAOwnedByPerson, self).setUp()
+        super().setUp()
         self.set = getUtility(IArchiveSet)
 
     def test_person(self):
@@ -3758,7 +3757,7 @@ class TestPPALookup(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestPPALookup, self).setUp()
+        super().setUp()
         self.ubuntu = getUtility(ILaunchpadCelebrities).ubuntu
         self.notbuntu = self.factory.makeDistribution()
         self.person = self.factory.makePerson()
@@ -3847,7 +3846,7 @@ class TestArchiveSetGetByReference(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestArchiveSetGetByReference, self).setUp()
+        super().setUp()
         self.set = getUtility(IArchiveSet)
 
     def test_ppa(self):
@@ -4206,7 +4205,7 @@ class TestArchiveGetOverridePolicy(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestArchiveGetOverridePolicy, self).setUp()
+        super().setUp()
         self.series = self.factory.makeDistroSeries()
         with admin_logged_in():
             self.series.nominatedarchindep = self.amd64 = (
diff --git a/lib/lp/soyuz/tests/test_archive_subscriptions.py b/lib/lp/soyuz/tests/test_archive_subscriptions.py
index 04fa7bb..516fcd7 100644
--- a/lib/lp/soyuz/tests/test_archive_subscriptions.py
+++ b/lib/lp/soyuz/tests/test_archive_subscriptions.py
@@ -44,7 +44,7 @@ class TestArchiveSubscriptions(TestCaseWithFactory):
 
     def setUp(self):
         """Create a test archive."""
-        super(TestArchiveSubscriptions, self).setUp()
+        super().setUp()
         self.owner = self.factory.makePerson()
         self.private_team = self.factory.makeTeam(
             visibility=PersonVisibility.PRIVATE,
@@ -136,7 +136,7 @@ class PrivateArtifactsViewTestCase(BrowserTestCase):
 
     def setUp(self):
         """Create a test archive."""
-        super(PrivateArtifactsViewTestCase, self).setUp()
+        super().setUp()
         self.owner = self.factory.makePerson()
         self.private_team = self.factory.makeTeam(
             visibility=PersonVisibility.PRIVATE,
diff --git a/lib/lp/soyuz/tests/test_binaryandsourcepackagename.py b/lib/lp/soyuz/tests/test_binaryandsourcepackagename.py
index ccec886..7fbccb3 100644
--- a/lib/lp/soyuz/tests/test_binaryandsourcepackagename.py
+++ b/lib/lp/soyuz/tests/test_binaryandsourcepackagename.py
@@ -18,7 +18,7 @@ class TestBinaryAndSourcePackageNameVocabulary(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestBinaryAndSourcePackageNameVocabulary, self).setUp()
+        super().setUp()
         self.vocabulary = BinaryAndSourcePackageNameVocabulary()
         spn = self.factory.makeSourcePackageName(name='bedbugs')
         self.bspn = Store.of(spn).find(
diff --git a/lib/lp/soyuz/tests/test_binarypackagebuild.py b/lib/lp/soyuz/tests/test_binarypackagebuild.py
index 3a3f21a..9bfbb41 100644
--- a/lib/lp/soyuz/tests/test_binarypackagebuild.py
+++ b/lib/lp/soyuz/tests/test_binarypackagebuild.py
@@ -77,7 +77,7 @@ class TestBinaryPackageBuild(TestCaseWithFactory):
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestBinaryPackageBuild, self).setUp()
+        super().setUp()
         self.build = self.factory.makeBinaryPackageBuild(
             archive=self.factory.makeArchive(purpose=ArchivePurpose.PRIMARY))
 
@@ -404,7 +404,7 @@ class BaseTestCaseWithThreeBuilds(TestCaseWithFactory):
 
     def setUp(self):
         """Publish some builds for the test archive."""
-        super(BaseTestCaseWithThreeBuilds, self).setUp()
+        super().setUp()
         self.ds = self.factory.makeDistroSeries()
         i386_das = self.factory.makeDistroArchSeries(
             distroseries=self.ds, architecturetag='i386')
@@ -457,7 +457,7 @@ class TestBuildSetGetBuildsForArchive(BaseTestCaseWithThreeBuilds):
 
     def setUp(self):
         """Publish some builds for the test archive."""
-        super(TestBuildSetGetBuildsForArchive, self).setUp()
+        super().setUp()
 
         # Short-cuts for our tests.
         self.archive = self.ds.main_archive
@@ -479,7 +479,7 @@ class TestBuildSetGetBuildsForArchive(BaseTestCaseWithThreeBuilds):
 class TestBuildSetGetBuildsForBuilder(BaseTestCaseWithThreeBuilds):
 
     def setUp(self):
-        super(TestBuildSetGetBuildsForBuilder, self).setUp()
+        super().setUp()
 
         # Short-cuts for our tests.
         self.build_set = getUtility(IBinaryPackageBuildSet)
@@ -524,7 +524,7 @@ class TestBinaryPackageBuildWebservice(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestBinaryPackageBuildWebservice, self).setUp()
+        super().setUp()
         self.ppa = self.factory.makeArchive(purpose=ArchivePurpose.PPA)
         self.build = self.factory.makeBinaryPackageBuild(archive=self.ppa)
         self.webservice = webservice_for_person(
@@ -929,7 +929,7 @@ class TestBinaryPackageBuildMacaroonIssuer(
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestBinaryPackageBuildMacaroonIssuer, self).setUp()
+        super().setUp()
         self.pushConfig(
             "launchpad", internal_macaroon_secret_key="some-secret")
 
diff --git a/lib/lp/soyuz/tests/test_binarypackagebuildbehaviour.py b/lib/lp/soyuz/tests/test_binarypackagebuildbehaviour.py
index 5239946..4f06427 100644
--- a/lib/lp/soyuz/tests/test_binarypackagebuildbehaviour.py
+++ b/lib/lp/soyuz/tests/test_binarypackagebuildbehaviour.py
@@ -94,7 +94,7 @@ class TestBinaryBuildPackageBehaviour(StatsMixin, TestCaseWithFactory):
         timeout=30)
 
     def setUp(self):
-        super(TestBinaryBuildPackageBehaviour, self).setUp()
+        super().setUp()
         switch_dbuser('testadmin')
         self.setUpStats()
 
@@ -534,7 +534,7 @@ class TestBinaryBuildPackageBehaviourBuildCollection(TestCaseWithFactory):
             shutil.rmtree(config.builddmaster.root)
 
     def setUp(self):
-        super(TestBinaryBuildPackageBehaviourBuildCollection, self).setUp()
+        super().setUp()
         switch_dbuser('testadmin')
 
         self.builder = self.factory.makeBuilder()
diff --git a/lib/lp/soyuz/tests/test_binarypackagename.py b/lib/lp/soyuz/tests/test_binarypackagename.py
index 9137864..e9564ee 100644
--- a/lib/lp/soyuz/tests/test_binarypackagename.py
+++ b/lib/lp/soyuz/tests/test_binarypackagename.py
@@ -17,7 +17,7 @@ class TestBinaryPackageNameSet(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestBinaryPackageNameSet, self).setUp()
+        super().setUp()
         self.name_set = getUtility(IBinaryPackageNameSet)
 
     def test___getitem__found(self):
diff --git a/lib/lp/soyuz/tests/test_binarysourcereference.py b/lib/lp/soyuz/tests/test_binarysourcereference.py
index ddb05f8..944c35b 100644
--- a/lib/lp/soyuz/tests/test_binarysourcereference.py
+++ b/lib/lp/soyuz/tests/test_binarysourcereference.py
@@ -30,7 +30,7 @@ class TestBinarySourceReference(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestBinarySourceReference, self).setUp()
+        super().setUp()
         self.reference_set = getUtility(IBinarySourceReferenceSet)
 
     def test_createFromRelationship_empty(self):
diff --git a/lib/lp/soyuz/tests/test_build.py b/lib/lp/soyuz/tests/test_build.py
index 8181a2d..36bb5a3 100644
--- a/lib/lp/soyuz/tests/test_build.py
+++ b/lib/lp/soyuz/tests/test_build.py
@@ -38,7 +38,7 @@ class TestBuild(TestCaseWithFactory):
     layer = LaunchpadFunctionalLayer
 
     def setUp(self):
-        super(TestBuild, self).setUp()
+        super().setUp()
         self.admin = getUtility(IPersonSet).getByEmail(ADMIN_EMAIL)
         self.processor = self.factory.makeProcessor(supports_virtualized=True)
         self.distroseries = self.factory.makeDistroSeries()
diff --git a/lib/lp/soyuz/tests/test_build_depwait.py b/lib/lp/soyuz/tests/test_build_depwait.py
index dd57b39..f4d9567 100644
--- a/lib/lp/soyuz/tests/test_build_depwait.py
+++ b/lib/lp/soyuz/tests/test_build_depwait.py
@@ -25,7 +25,7 @@ class TestBuildDepWait(TestCaseWithFactory):
     layer = LaunchpadFunctionalLayer
 
     def setUp(self):
-        super(TestBuildDepWait, self).setUp()
+        super().setUp()
         self.admin = getUtility(IPersonSet).getByEmail(ADMIN_EMAIL)
         # Create everything we need to create builds, such as a
         # DistroArchSeries and a builder.
diff --git a/lib/lp/soyuz/tests/test_build_notify.py b/lib/lp/soyuz/tests/test_build_notify.py
index 3621091..fa90f02 100644
--- a/lib/lp/soyuz/tests/test_build_notify.py
+++ b/lib/lp/soyuz/tests/test_build_notify.py
@@ -46,7 +46,7 @@ class TestBuildNotify(TestCaseWithFactory):
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestBuildNotify, self).setUp()
+        super().setUp()
         self.admin = getUtility(IPersonSet).getByEmail(ADMIN_EMAIL)
         # Create all of the items we need to create builds
         self.processor = self.factory.makeProcessor(supports_virtualized=True)
diff --git a/lib/lp/soyuz/tests/test_build_privacy.py b/lib/lp/soyuz/tests/test_build_privacy.py
index 3004a0d..85ebaaf 100644
--- a/lib/lp/soyuz/tests/test_build_privacy.py
+++ b/lib/lp/soyuz/tests/test_build_privacy.py
@@ -20,7 +20,7 @@ class TestBuildPrivacy(TestCaseWithFactory):
     layer = LaunchpadFunctionalLayer
 
     def setUp(self):
-        super(TestBuildPrivacy, self).setUp()
+        super().setUp()
         # Add everything we need to create builds.
         self.admin = getUtility(IPersonSet).getByEmail(ADMIN_EMAIL)
         processor = self.factory.makeProcessor(supports_virtualized=True)
diff --git a/lib/lp/soyuz/tests/test_build_set.py b/lib/lp/soyuz/tests/test_build_set.py
index 84f57eb..6dcf9fd 100644
--- a/lib/lp/soyuz/tests/test_build_set.py
+++ b/lib/lp/soyuz/tests/test_build_set.py
@@ -42,7 +42,7 @@ class TestBuildSet(TestCaseWithFactory):
     layer = LaunchpadFunctionalLayer
 
     def setUp(self):
-        super(TestBuildSet, self).setUp()
+        super().setUp()
         self.admin = getUtility(IPersonSet).getByEmail(ADMIN_EMAIL)
         self.processor_one = self.factory.makeProcessor(
             supports_virtualized=True)
@@ -269,7 +269,7 @@ class TestGetAllowedArchitectures(TestCaseWithFactory):
     layer = ZopelessDatabaseLayer
 
     def setUp(self):
-        super(TestGetAllowedArchitectures, self).setUp()
+        super().setUp()
         self.avr = self.factory.makeProcessor(
             name="avr2001", supports_virtualized=True)
         self.sparc = self.factory.makeProcessor(
@@ -347,7 +347,7 @@ class BuildRecordCreationTests(TestNativePublishingBase):
     """Test the creation of build records."""
 
     def setUp(self):
-        super(BuildRecordCreationTests, self).setUp()
+        super().setUp()
         self.distro = self.factory.makeDistribution()
         self.avr = self.factory.makeProcessor(
             name="avr2001", supports_virtualized=True)
@@ -386,7 +386,7 @@ class BuildRecordCreationTests(TestNativePublishingBase):
         :param architecturehintlist: Architecture hint list
             (e.g. "i386 amd64")
         """
-        return super(BuildRecordCreationTests, self).getPubSource(
+        return super().getPubSource(
             archive=self.factory.makeArchive(), distroseries=self.distroseries,
             architecturehintlist=architecturehintlist)
 
@@ -588,7 +588,7 @@ class TestFindBuiltOrPublishedBySourceAndArchive(TestCaseWithFactory):
     layer = ZopelessDatabaseLayer
 
     def setUp(self):
-        super(TestFindBuiltOrPublishedBySourceAndArchive, self).setUp()
+        super().setUp()
         self.bpbs = getUtility(IBinaryPackageBuildSet)
 
     def test_trivial(self):
diff --git a/lib/lp/soyuz/tests/test_build_start_estimation.py b/lib/lp/soyuz/tests/test_build_start_estimation.py
index b26dae1..07f625e 100644
--- a/lib/lp/soyuz/tests/test_build_start_estimation.py
+++ b/lib/lp/soyuz/tests/test_build_start_estimation.py
@@ -29,7 +29,7 @@ class TestBuildStartEstimation(TestCaseWithFactory):
     layer = LaunchpadFunctionalLayer
 
     def setUp(self):
-        super(TestBuildStartEstimation, self).setUp()
+        super().setUp()
         self.admin = getUtility(IPersonSet).getByEmail(ADMIN_EMAIL)
         with person_logged_in(self.admin):
             self.publisher = SoyuzTestPublisher()
diff --git a/lib/lp/soyuz/tests/test_distributionsourcepackagerelease.py b/lib/lp/soyuz/tests/test_distributionsourcepackagerelease.py
index 5abdd67..38dcc3e 100644
--- a/lib/lp/soyuz/tests/test_distributionsourcepackagerelease.py
+++ b/lib/lp/soyuz/tests/test_distributionsourcepackagerelease.py
@@ -29,7 +29,7 @@ class TestDistributionSourcePackageRelease(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestDistributionSourcePackageRelease, self).setUp()
+        super().setUp()
         self.sourcepackagerelease = self.factory.makeSourcePackageRelease()
         self.distroarchseries = self.factory.makeDistroArchSeries(
             distroseries=self.sourcepackagerelease.upload_distroseries)
@@ -159,7 +159,7 @@ class TestGetBinariesForSeries(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestGetBinariesForSeries, self).setUp()
+        super().setUp()
         self.sourcepackagerelease = self.factory.makeSourcePackageRelease()
         self.distroarchseries = self.factory.makeDistroArchSeries(
             distroseries=self.sourcepackagerelease.upload_distroseries)
diff --git a/lib/lp/soyuz/tests/test_distroseriesbinarypackage.py b/lib/lp/soyuz/tests/test_distroseriesbinarypackage.py
index 2b61058..682d7db 100644
--- a/lib/lp/soyuz/tests/test_distroseriesbinarypackage.py
+++ b/lib/lp/soyuz/tests/test_distroseriesbinarypackage.py
@@ -32,7 +32,7 @@ class TestDistroSeriesBinaryPackage(TestCaseWithFactory):
 
     def setUp(self):
         """Create a distroseriesbinarypackage to play with."""
-        super(TestDistroSeriesBinaryPackage, self).setUp()
+        super().setUp()
         self.publisher = SoyuzTestPublisher()
         self.publisher.prepareBreezyAutotest()
         self.distroseries = self.publisher.distroseries
diff --git a/lib/lp/soyuz/tests/test_distroseriesdifferencejob.py b/lib/lp/soyuz/tests/test_distroseriesdifferencejob.py
index e9f007d..220fc9f 100644
--- a/lib/lp/soyuz/tests/test_distroseriesdifferencejob.py
+++ b/lib/lp/soyuz/tests/test_distroseriesdifferencejob.py
@@ -607,7 +607,7 @@ class TestDistroSeriesDifferenceJobEndToEnd(TestCaseWithFactory):
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestDistroSeriesDifferenceJobEndToEnd, self).setUp()
+        super().setUp()
         self.store = IMasterStore(DistroSeriesDifference)
 
     def getJobSource(self):
diff --git a/lib/lp/soyuz/tests/test_distroseriesqueue_ddtp_tarball.py b/lib/lp/soyuz/tests/test_distroseriesqueue_ddtp_tarball.py
index 5c41eac..3f1c664 100644
--- a/lib/lp/soyuz/tests/test_distroseriesqueue_ddtp_tarball.py
+++ b/lib/lp/soyuz/tests/test_distroseriesqueue_ddtp_tarball.py
@@ -34,7 +34,7 @@ from lp.testing.gpgkeys import import_public_test_keys
 class TestDistroSeriesQueueDdtpTarball(TestNativePublishingBase):
 
     def setUp(self):
-        super(TestDistroSeriesQueueDdtpTarball, self).setUp()
+        super().setUp()
         import_public_test_keys()
         # CustomUpload.installFiles requires a umask of 0o022.
         old_umask = os.umask(0o022)
diff --git a/lib/lp/soyuz/tests/test_distroseriesqueue_debian_installer.py b/lib/lp/soyuz/tests/test_distroseriesqueue_debian_installer.py
index 326be48..3338d1a 100644
--- a/lib/lp/soyuz/tests/test_distroseriesqueue_debian_installer.py
+++ b/lib/lp/soyuz/tests/test_distroseriesqueue_debian_installer.py
@@ -27,7 +27,7 @@ from lp.testing.gpgkeys import import_public_test_keys
 class TestDistroSeriesQueueDebianInstaller(TestNativePublishingBase):
 
     def setUp(self):
-        super(TestDistroSeriesQueueDebianInstaller, self).setUp()
+        super().setUp()
         import_public_test_keys()
         # CustomUpload.installFiles requires a umask of 0o022.
         old_umask = os.umask(0o022)
diff --git a/lib/lp/soyuz/tests/test_distroseriesqueue_dist_upgrader.py b/lib/lp/soyuz/tests/test_distroseriesqueue_dist_upgrader.py
index 6dac873..8620c42 100644
--- a/lib/lp/soyuz/tests/test_distroseriesqueue_dist_upgrader.py
+++ b/lib/lp/soyuz/tests/test_distroseriesqueue_dist_upgrader.py
@@ -30,7 +30,7 @@ from lp.testing.gpgkeys import import_public_test_keys
 class TestDistroSeriesQueueDistUpgrader(TestNativePublishingBase):
 
     def setUp(self):
-        super(TestDistroSeriesQueueDistUpgrader, self).setUp()
+        super().setUp()
         import_public_test_keys()
         # CustomUpload.installFiles requires a umask of 0o022.
         old_umask = os.umask(0o022)
@@ -42,7 +42,7 @@ class TestDistroSeriesQueueDistUpgrader(TestNativePublishingBase):
         self.logger = DevNullLogger()
 
     def tearDown(self):
-        super(TestDistroSeriesQueueDistUpgrader, self).tearDown()
+        super().tearDown()
         if os.path.exists(config.personalpackagearchive.root):
             shutil.rmtree(config.personalpackagearchive.root)
 
diff --git a/lib/lp/soyuz/tests/test_distroseriesqueue_rosetta_translations.py b/lib/lp/soyuz/tests/test_distroseriesqueue_rosetta_translations.py
index 7cfcf54..b13658b 100644
--- a/lib/lp/soyuz/tests/test_distroseriesqueue_rosetta_translations.py
+++ b/lib/lp/soyuz/tests/test_distroseriesqueue_rosetta_translations.py
@@ -51,7 +51,7 @@ class TestDistroSeriesQueueRosettaTranslationsTarball(
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestDistroSeriesQueueRosettaTranslationsTarball, self).setUp()
+        super().setUp()
         import_public_test_keys()
         self.logger = DevNullLogger()
         self.absolutely_anything_policy = getPolicy(
diff --git a/lib/lp/soyuz/tests/test_hasbuildrecords.py b/lib/lp/soyuz/tests/test_hasbuildrecords.py
index 94c146b..bcb15f1 100644
--- a/lib/lp/soyuz/tests/test_hasbuildrecords.py
+++ b/lib/lp/soyuz/tests/test_hasbuildrecords.py
@@ -45,7 +45,7 @@ class TestHasBuildRecordsInterface(BaseTestCaseWithThreeBuilds):
 
     def setUp(self):
         """Use `SoyuzTestPublisher` to publish some sources in archives."""
-        super(TestHasBuildRecordsInterface, self).setUp()
+        super().setUp()
         self.context = self.ds.distribution
 
     def testProvidesHasBuildRecords(self):
@@ -73,7 +73,7 @@ class TestDistributionHasBuildRecords(TestCaseWithFactory):
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestDistributionHasBuildRecords, self).setUp()
+        super().setUp()
         self.admin = getUtility(IPersonSet).getByEmail(ADMIN_EMAIL)
         # Create the machinery we need to create builds, such as
         # DistroArchSeries and builders.
@@ -127,7 +127,7 @@ class TestDistroSeriesHasBuildRecords(TestHasBuildRecordsInterface):
     """Test the DistroSeries implementation of IHasBuildRecords."""
 
     def setUp(self):
-        super(TestDistroSeriesHasBuildRecords, self).setUp()
+        super().setUp()
         self.context = self.ds
 
 
@@ -137,7 +137,7 @@ class TestDistroArchSeriesHasBuildRecords(TestDistributionHasBuildRecords):
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestDistroArchSeriesHasBuildRecords, self).setUp()
+        super().setUp()
 
     def test_distroarchseries(self):
         # We can fetch builds records from a DistroArchSeries.
@@ -161,7 +161,7 @@ class TestArchiveHasBuildRecords(TestHasBuildRecordsInterface):
     """Test the Archive implementation of IHasBuildRecords."""
 
     def setUp(self):
-        super(TestArchiveHasBuildRecords, self).setUp()
+        super().setUp()
 
         self.context = self.ds.main_archive
 
@@ -191,7 +191,7 @@ class TestBuilderHasBuildRecords(TestHasBuildRecordsInterface):
     """Test the Builder implementation of IHasBuildRecords."""
 
     def setUp(self):
-        super(TestBuilderHasBuildRecords, self).setUp()
+        super().setUp()
 
         # Create a 386 builder
         self.context = self.factory.makeBuilder()
@@ -237,7 +237,7 @@ class TestSourcePackageHasBuildRecords(TestHasBuildRecordsInterface):
     """Test the SourcePackage implementation of IHasBuildRecords."""
 
     def setUp(self):
-        super(TestSourcePackageHasBuildRecords, self).setUp()
+        super().setUp()
         gedit_name = self.builds[0].source_package_release.sourcepackagename
         self.context = SourcePackage(
             gedit_name, self.builds[0].distro_arch_series.distroseries)
diff --git a/lib/lp/soyuz/tests/test_livefs.py b/lib/lp/soyuz/tests/test_livefs.py
index 427ff7d..9ccd18a 100644
--- a/lib/lp/soyuz/tests/test_livefs.py
+++ b/lib/lp/soyuz/tests/test_livefs.py
@@ -89,7 +89,7 @@ class TestLiveFS(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestLiveFS, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture({LIVEFS_FEATURE_FLAG: "on"}))
 
     def test_implements_interfaces(self):
@@ -455,7 +455,7 @@ class TestLiveFSSet(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestLiveFSSet, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture({LIVEFS_FEATURE_FLAG: "on"}))
 
     def test_class_implements_interfaces(self):
@@ -550,7 +550,7 @@ class TestLiveFSWebservice(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestLiveFSWebservice, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture({LIVEFS_FEATURE_FLAG: "on"}))
         self.person = self.factory.makePerson(displayname="Test Person")
         self.webservice = webservice_for_person(
diff --git a/lib/lp/soyuz/tests/test_livefsbuild.py b/lib/lp/soyuz/tests/test_livefsbuild.py
index 2a64479..d448344 100644
--- a/lib/lp/soyuz/tests/test_livefsbuild.py
+++ b/lib/lp/soyuz/tests/test_livefsbuild.py
@@ -110,7 +110,7 @@ class TestLiveFSBuild(TestCaseWithFactory):
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestLiveFSBuild, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture({LIVEFS_FEATURE_FLAG: "on"}))
         self.build = self.factory.makeLiveFSBuild()
 
@@ -375,7 +375,7 @@ class TestLiveFSBuildSet(TestCaseWithFactory):
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestLiveFSBuildSet, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture({LIVEFS_FEATURE_FLAG: "on"}))
 
     def test_getByBuildFarmJob_works(self):
@@ -407,7 +407,7 @@ class TestLiveFSBuildWebservice(TestCaseWithFactory):
     layer = LaunchpadFunctionalLayer
 
     def setUp(self):
-        super(TestLiveFSBuildWebservice, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture({LIVEFS_FEATURE_FLAG: "on"}))
         self.person = self.factory.makePerson()
         self.webservice = webservice_for_person(
@@ -599,7 +599,7 @@ class TestLiveFSBuildMacaroonIssuer(MacaroonTestMixin, TestCaseWithFactory):
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestLiveFSBuildMacaroonIssuer, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture({LIVEFS_FEATURE_FLAG: "on"}))
         self.pushConfig(
             "launchpad", internal_macaroon_secret_key="some-secret")
diff --git a/lib/lp/soyuz/tests/test_livefsbuildbehaviour.py b/lib/lp/soyuz/tests/test_livefsbuildbehaviour.py
index 5a9bcc2..0c39013 100644
--- a/lib/lp/soyuz/tests/test_livefsbuildbehaviour.py
+++ b/lib/lp/soyuz/tests/test_livefsbuildbehaviour.py
@@ -65,7 +65,7 @@ class TestLiveFSBuildBehaviourBase(TestCaseWithFactory):
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestLiveFSBuildBehaviourBase, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture({LIVEFS_FEATURE_FLAG: "on"}))
 
     def makeJob(self, archive=None, pocket=PackagePublishingPocket.RELEASE,
diff --git a/lib/lp/soyuz/tests/test_packagecopyjob.py b/lib/lp/soyuz/tests/test_packagecopyjob.py
index 50a65c8..97781f1 100644
--- a/lib/lp/soyuz/tests/test_packagecopyjob.py
+++ b/lib/lp/soyuz/tests/test_packagecopyjob.py
@@ -185,7 +185,7 @@ class PlainPackageCopyJobTests(TestCaseWithFactory, LocalTestHelper):
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(PlainPackageCopyJobTests, self).setUp()
+        super().setUp()
         self.publisher = SoyuzTestPublisher()
         self.publisher.prepareBreezyAutotest()
         self.distroseries = self.publisher.breezy_autotest
@@ -1803,7 +1803,7 @@ class TestViaCelery(TestCaseWithFactory):
     layer = CeleryJobLayer
 
     def setUp(self):
-        super(TestViaCelery, self).setUp()
+        super().setUp()
         # Turn on Celery handling of PCJs and the resulting notification jobs.
         self.useFixture(FeatureFixture({
             'jobs.celery.enabled_classes':
@@ -1811,7 +1811,7 @@ class TestViaCelery(TestCaseWithFactory):
         }))
 
     def tearDown(self):
-        super(TestViaCelery, self).tearDown()
+        super().tearDown()
         pop_remote_notifications()
 
     def test_run(self):
diff --git a/lib/lp/soyuz/tests/test_packageset.py b/lib/lp/soyuz/tests/test_packageset.py
index c84b2be..da91a35 100644
--- a/lib/lp/soyuz/tests/test_packageset.py
+++ b/lib/lp/soyuz/tests/test_packageset.py
@@ -35,7 +35,7 @@ class TestPackagesetSet(TestCaseWithFactory):
     layer = ZopelessDatabaseLayer
 
     def setUp(self):
-        super(TestPackagesetSet, self).setUp()
+        super().setUp()
         self.ps_set = getUtility(IPackagesetSet)
 
     def getUbuntu(self):
@@ -223,7 +223,7 @@ class TestPackagesetSetPermissions(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestPackagesetSetPermissions, self).setUp()
+        super().setUp()
         self.ps_set = getUtility(IPackagesetSet)
 
     def test_create_packageset_as_user(self):
@@ -256,7 +256,7 @@ class TestPackageset(TestCaseWithFactory):
 
     def setUp(self):
         """Setup a distribution with multiple distroseries."""
-        super(TestPackageset, self).setUp()
+        super().setUp()
         self.distribution = getUtility(IDistributionSet).getByName(
             'ubuntu')
         self.distroseries_current = self.distribution.currentseries
@@ -664,7 +664,7 @@ class TestPackagesetPermissions(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestPackagesetPermissions, self).setUp()
+        super().setUp()
         self.person = self.factory.makePerson()
         self.person2 = self.factory.makePerson()
         self.packageset = self.factory.makePackageset(owner=self.person)
@@ -723,7 +723,7 @@ class TestArchivePermissionSet(TestCaseWithFactory):
     layer = ZopelessDatabaseLayer
 
     def setUp(self):
-        super(TestArchivePermissionSet, self).setUp()
+        super().setUp()
         self.ap_set = getUtility(IArchivePermissionSet)
         self.archive = self.factory.makeArchive()
         self.packageset = self.factory.makePackageset()
diff --git a/lib/lp/soyuz/tests/test_packageupload.py b/lib/lp/soyuz/tests/test_packageupload.py
index 24fb049..24d21ca 100644
--- a/lib/lp/soyuz/tests/test_packageupload.py
+++ b/lib/lp/soyuz/tests/test_packageupload.py
@@ -85,11 +85,11 @@ class PackageUploadTestCase(TestCaseWithFactory):
     dbuser = config.uploadqueue.dbuser
 
     def setUp(self):
-        super(PackageUploadTestCase, self).setUp()
+        super().setUp()
         self.test_publisher = SoyuzTestPublisher()
 
     def tearDown(self):
-        super(PackageUploadTestCase, self).tearDown()
+        super().tearDown()
         if os.path.exists(config.personalpackagearchive.root):
             shutil.rmtree(config.personalpackagearchive.root)
 
@@ -692,7 +692,7 @@ class TestPackageUploadSet(TestCaseWithFactory):
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestPackageUploadSet, self).setUp()
+        super().setUp()
         self.upload_set = getUtility(IPackageUploadSet)
 
     def test_PackageUploadSet_implements_IPackageUploadSet(self):
@@ -1013,7 +1013,7 @@ class TestPackageUploadWebservice(TestCaseWithFactory):
     layer = LaunchpadFunctionalLayer
 
     def setUp(self):
-        super(TestPackageUploadWebservice, self).setUp()
+        super().setUp()
         self.webservice = None
         self.distroseries = self.factory.makeDistroSeries()
         self.main = self.factory.makeComponent("main")
diff --git a/lib/lp/soyuz/tests/test_processacceptedbugsjob.py b/lib/lp/soyuz/tests/test_processacceptedbugsjob.py
index 1b7ab86..8d7255d 100644
--- a/lib/lp/soyuz/tests/test_processacceptedbugsjob.py
+++ b/lib/lp/soyuz/tests/test_processacceptedbugsjob.py
@@ -56,7 +56,7 @@ class TestBugIDsFromChangesFile(TestCaseWithFactory):
     dbuser = config.uploadqueue.dbuser
 
     def setUp(self):
-        super(TestBugIDsFromChangesFile, self).setUp()
+        super().setUp()
         self.changes = Changes({
             'Format': '1.8',
             'Source': 'swat',
@@ -260,7 +260,7 @@ class TestCloseBugIDsForSourcePackageRelease(TestCaseWithFactory):
     dbuser = config.IProcessAcceptedBugsJobSource.dbuser
 
     def setUp(self):
-        super(TestCloseBugIDsForSourcePackageRelease, self).setUp()
+        super().setUp()
         # Create a distribution with two series, two source package names,
         # and an SPR and a bug task for all combinations of those.
         self.distro = self.factory.makeDistribution()
@@ -324,7 +324,7 @@ class TestProcessAcceptedBugsJob(TestCaseWithFactory):
     dbuser = config.IProcessAcceptedBugsJobSource.dbuser
 
     def setUp(self):
-        super(TestProcessAcceptedBugsJob, self).setUp()
+        super().setUp()
         self.publisher = SoyuzTestPublisher()
         self.publisher.prepareBreezyAutotest()
         self.distroseries = self.publisher.breezy_autotest
diff --git a/lib/lp/soyuz/tests/test_publishing.py b/lib/lp/soyuz/tests/test_publishing.py
index ec6f426..fbb19f0 100644
--- a/lib/lp/soyuz/tests/test_publishing.py
+++ b/lib/lp/soyuz/tests/test_publishing.py
@@ -592,12 +592,12 @@ class TestNativePublishingBase(TestCaseWithFactory, SoyuzTestPublisher):
     dbuser = config.archivepublisher.dbuser
 
     def __init__(self, methodName='runTest'):
-        super(TestNativePublishingBase, self).__init__(methodName=methodName)
+        super().__init__(methodName=methodName)
         SoyuzTestPublisher.__init__(self)
 
     def setUp(self):
         """Setup a pool dir, the librarian, and instantiate the DiskPool."""
-        super(TestNativePublishingBase, self).setUp()
+        super().setUp()
         switch_dbuser(config.archivepublisher.dbuser)
         self.prepareBreezyAutotest()
         self.config = getPubConfig(self.ubuntutest.main_archive)
@@ -609,7 +609,7 @@ class TestNativePublishingBase(TestCaseWithFactory, SoyuzTestPublisher):
 
     def tearDown(self):
         """Tear down blows the pool dirs away."""
-        super(TestNativePublishingBase, self).tearDown()
+        super().tearDown()
         for root in (
                 self.config.distroroot,
                 config.personalpackagearchive.root,
@@ -862,7 +862,7 @@ class PublishingSetTests(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(PublishingSetTests, self).setUp()
+        super().setUp()
         self.distroseries = self.factory.makeDistroSeries()
         self.archive = self.factory.makeArchive(
             distribution=self.distroseries.distribution)
@@ -919,7 +919,7 @@ class TestPublishingSetLite(TestCaseWithFactory):
     layer = ZopelessDatabaseLayer
 
     def setUp(self):
-        super(TestPublishingSetLite, self).setUp()
+        super().setUp()
         self.person = self.factory.makePerson()
 
     def test_requestDeletion_marks_SPPHs_deleted(self):
diff --git a/lib/lp/soyuz/tests/test_publishing_models.py b/lib/lp/soyuz/tests/test_publishing_models.py
index f91efa4..8fd922b 100644
--- a/lib/lp/soyuz/tests/test_publishing_models.py
+++ b/lib/lp/soyuz/tests/test_publishing_models.py
@@ -41,7 +41,7 @@ class TestPublishingSet(BaseTestCaseWithThreeBuilds):
 
     def setUp(self):
         """Use `SoyuzTestPublisher` to publish some sources in archives."""
-        super(TestPublishingSet, self).setUp()
+        super().setUp()
 
         # Ensure all the builds have been built.
         for build in self.builds:
diff --git a/lib/lp/soyuz/wsgi/tests/test_archiveauth.py b/lib/lp/soyuz/wsgi/tests/test_archiveauth.py
index e1149da..fe2088f 100644
--- a/lib/lp/soyuz/wsgi/tests/test_archiveauth.py
+++ b/lib/lp/soyuz/wsgi/tests/test_archiveauth.py
@@ -26,7 +26,7 @@ class TestWSGIArchiveAuth(TestCaseWithFactory):
     layer = ZopelessAppServerLayer
 
     def setUp(self):
-        super(TestWSGIArchiveAuth, self).setUp()
+        super().setUp()
         self.now = time.time()
         self.useFixture(MonkeyPatch("time.time", lambda: self.now))
         self.memcache_fixture = self.useFixture(MemcacheFixture())
diff --git a/lib/lp/soyuz/xmlrpc/tests/test_archive.py b/lib/lp/soyuz/xmlrpc/tests/test_archive.py
index d34a879..e487a22 100644
--- a/lib/lp/soyuz/xmlrpc/tests/test_archive.py
+++ b/lib/lp/soyuz/xmlrpc/tests/test_archive.py
@@ -22,7 +22,7 @@ class TestArchiveAPI(TestCaseWithFactory):
     layer = LaunchpadFunctionalLayer
 
     def setUp(self):
-        super(TestArchiveAPI, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture({NAMED_AUTH_TOKEN_FEATURE_FLAG: "on"}))
         self.archive_api = ArchiveAPI(None, None)
         self.pushConfig(