← Back to team overview

launchpad-reviewers team mailing list archive

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

 

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

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

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/413834
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:pyupgrade-py3-snappy into launchpad:master.
diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs
index 0177d98..c6458be 100644
--- a/.git-blame-ignore-revs
+++ b/.git-blame-ignore-revs
@@ -40,3 +40,5 @@ fbed83f22424df8fa5647349493f78937a520db5
 46f47b6eb925ce6d784c7a0ed47653da7a974110
 # apply pyupgrade --py3-plus to lp.services.[n-z]*
 f3f15787ebabe305fbf3e3ae6c0fd8ca7dfb4465
+# apply pyupgrade --py3-plus to lp.snappy
+2cda038936743a2f9271953c23b9fcc98968db63
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index d633860..d70d934 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -55,6 +55,7 @@ repos:
             |registry
             |scripts
             |services
+            |snappy
           )/
 -   repo: https://github.com/PyCQA/isort
     rev: 5.9.2
diff --git a/lib/lp/snappy/adapters/buildarch.py b/lib/lp/snappy/adapters/buildarch.py
index e9b01cf..fe8680b 100644
--- a/lib/lp/snappy/adapters/buildarch.py
+++ b/lib/lp/snappy/adapters/buildarch.py
@@ -7,8 +7,6 @@ __all__ = [
 
 from collections import Counter
 
-import six
-
 from lp.services.helpers import english_list
 
 
@@ -20,7 +18,7 @@ class MissingPropertyError(SnapArchitecturesParserError):
     """Error for when an expected property is not present in the YAML."""
 
     def __init__(self, prop):
-        super(MissingPropertyError, self).__init__(
+        super().__init__(
             "Architecture specification is missing the {!r} property".format(
                 prop))
         self.property = prop
@@ -30,7 +28,7 @@ class IncompatibleArchitecturesStyleError(SnapArchitecturesParserError):
     """Error for when architectures mix incompatible styles."""
 
     def __init__(self):
-        super(IncompatibleArchitecturesStyleError, self).__init__(
+        super().__init__(
             "'architectures' must either be a list of strings or dicts, not "
             "both")
 
@@ -39,7 +37,7 @@ class DuplicateBuildOnError(SnapArchitecturesParserError):
     """Error for when multiple `build-on`s include the same architecture."""
 
     def __init__(self, duplicates):
-        super(DuplicateBuildOnError, self).__init__(
+        super().__init__(
             "{} {} present in the 'build-on' of multiple items".format(
                 english_list(duplicates),
                 "is" if len(duplicates) == 1 else "are"))
@@ -49,7 +47,7 @@ class UnsupportedBuildOnError(SnapArchitecturesParserError):
     """Error for when a requested architecture is not supported."""
 
     def __init__(self, build_on):
-        super(UnsupportedBuildOnError, self).__init__(
+        super().__init__(
             "build-on specifies no supported architectures: {!r}".format(
                 build_on))
         self.build_on = build_on
@@ -69,10 +67,10 @@ class SnapArchitecture:
             snapcraft.yaml.
         """
         self.build_on = (
-            [build_on] if isinstance(build_on, six.string_types) else build_on)
+            [build_on] if isinstance(build_on, str) else build_on)
         if run_on:
             self.run_on = (
-                [run_on] if isinstance(run_on, six.string_types) else run_on)
+                [run_on] if isinstance(run_on, str) else run_on)
         else:
             self.run_on = self.build_on
         self.build_error = build_error
@@ -131,7 +129,7 @@ def determine_architectures_to_build(snapcraft_data, supported_arches):
     if architectures_list:
         # First, determine what style we're parsing.  Is it a list of
         # strings or a list of dicts?
-        if all(isinstance(a, six.string_types) for a in architectures_list):
+        if all(isinstance(a, str) for a in architectures_list):
             # If a list of strings (old style), then that's only a single
             # item.
             architectures = [SnapArchitecture(build_on=architectures_list)]
diff --git a/lib/lp/snappy/browser/snap.py b/lib/lp/snappy/browser/snap.py
index 6055137..0fc63ca 100644
--- a/lib/lp/snappy/browser/snap.py
+++ b/lib/lp/snappy/browser/snap.py
@@ -20,7 +20,6 @@ from lazr.restful.interface import (
     copy_field,
     use_template,
     )
-import six
 from six.moves.urllib.parse import urlencode
 from zope.component import getUtility
 from zope.error.interfaces import IErrorReportingUtility
@@ -184,9 +183,9 @@ class SnapFormMixin:
         widget = self.widgets.get('vcs')
         if widget is not None:
             current_value = widget._getFormValue()
-            self.vcs_bzr_radio, self.vcs_git_radio = [
+            self.vcs_bzr_radio, self.vcs_git_radio = (
                 render_radio_widget_part(widget, value, current_value)
-                for value in (VCSType.BZR, VCSType.GIT)]
+                for value in (VCSType.BZR, VCSType.GIT))
 
 
 class SnapInformationTypeMixin:
@@ -565,7 +564,7 @@ class SnapAddView(SnapAuthorizeMixin, EnableProcessorsMixin,
 
     def initialize(self):
         """See `LaunchpadView`."""
-        super(SnapAddView, self).initialize()
+        super().initialize()
 
         # Once initialized, if the private_snap flag is disabled, it
         # prevents snap creation for private contexts.
@@ -580,7 +579,7 @@ class SnapAddView(SnapAuthorizeMixin, EnableProcessorsMixin,
 
     def setUpFields(self):
         """See `LaunchpadFormView`."""
-        super(SnapAddView, self).setUpFields()
+        super().setUpFields()
         self.form_fields += self.createEnabledProcessors(
             getUtility(IProcessorSet).getAll(),
             "The architectures that this snap package builds for. Some "
@@ -589,7 +588,7 @@ class SnapAddView(SnapAuthorizeMixin, EnableProcessorsMixin,
 
     def setUpWidgets(self):
         """See `LaunchpadFormView`."""
-        super(SnapAddView, self).setUpWidgets()
+        super().setUpWidgets()
         self.widgets['processors'].widget_class = 'processors'
         if self.is_project_context:
             # If we are on Project:+new-snap page, we know which information
@@ -654,23 +653,23 @@ class SnapAddView(SnapAuthorizeMixin, EnableProcessorsMixin,
     def validate_widgets(self, data, names=None):
         """See `LaunchpadFormView`."""
         if self.widgets.get('vcs') is not None:
-            super(SnapAddView, self).validate_widgets(data, ['vcs'])
+            super().validate_widgets(data, ['vcs'])
             self.validateVCSWidgets(SnapAddView, data)
         if self.widgets.get('auto_build') is not None:
             # Set widgets as required or optional depending on the
             # auto_build field.
-            super(SnapAddView, self).validate_widgets(data, ['auto_build'])
+            super().validate_widgets(data, ['auto_build'])
             auto_build = data.get('auto_build', False)
             self.widgets['auto_build_archive'].context.required = auto_build
             self.widgets['auto_build_pocket'].context.required = auto_build
         if self.widgets.get('store_upload') is not None:
             # Set widgets as required or optional depending on the
             # store_upload field.
-            super(SnapAddView, self).validate_widgets(data, ['store_upload'])
+            super().validate_widgets(data, ['store_upload'])
             store_upload = data.get('store_upload', False)
             self.widgets['store_name'].context.required = store_upload
             self.widgets['store_channels'].context.required = store_upload
-        super(SnapAddView, self).validate_widgets(data, names=names)
+        super().validate_widgets(data, names=names)
 
     @action('Create snap package', name='create')
     def create_action(self, action, data):
@@ -709,7 +708,7 @@ class SnapAddView(SnapAuthorizeMixin, EnableProcessorsMixin,
             self.next_url = canonical_url(snap)
 
     def validate(self, data):
-        super(SnapAddView, self).validate(data)
+        super().validate(data)
         owner = data.get('owner', None)
         name = data.get('name', None)
         if owner and name:
@@ -732,7 +731,7 @@ class BaseSnapEditView(SnapAuthorizeMixin, SnapInformationTypeMixin,
 
     def setUpWidgets(self, context=None):
         """See `LaunchpadFormView`."""
-        super(BaseSnapEditView, self).setUpWidgets()
+        super().setUpWidgets()
         self.setUpVCSWidgets()
 
     @property
@@ -742,28 +741,26 @@ class BaseSnapEditView(SnapAuthorizeMixin, SnapInformationTypeMixin,
     def validate_widgets(self, data, names=None):
         """See `LaunchpadFormView`."""
         if self.widgets.get('vcs') is not None:
-            super(BaseSnapEditView, self).validate_widgets(data, ['vcs'])
+            super().validate_widgets(data, ['vcs'])
             self.validateVCSWidgets(BaseSnapEditView, data)
         if self.widgets.get('auto_build') is not None:
             # Set widgets as required or optional depending on the
             # auto_build field.
-            super(BaseSnapEditView, self).validate_widgets(
-                data, ['auto_build'])
+            super().validate_widgets(data, ['auto_build'])
             auto_build = data.get('auto_build', False)
             self.widgets['auto_build_archive'].context.required = auto_build
             self.widgets['auto_build_pocket'].context.required = auto_build
         if self.widgets.get('store_upload') is not None:
             # Set widgets as required or optional depending on the
             # store_upload field.
-            super(BaseSnapEditView, self).validate_widgets(
-                data, ['store_upload'])
+            super().validate_widgets(data, ['store_upload'])
             store_upload = data.get('store_upload', False)
             self.widgets['store_name'].context.required = store_upload
             self.widgets['store_channels'].context.required = store_upload
-        super(BaseSnapEditView, self).validate_widgets(data, names=names)
+        super().validate_widgets(data, names=names)
 
     def validate(self, data):
-        super(BaseSnapEditView, self).validate(data)
+        super().validate(data)
         info_type = data.get('information_type', self.context.information_type)
         editing_info_type = 'information_type' in data
         private = info_type in PRIVATE_INFORMATION_TYPES
@@ -876,8 +873,7 @@ class SnapAdminView(BaseSnapEditView):
         if 'project' in data:
             project = data.pop('project')
             self.context.setProject(project)
-        super(SnapAdminView, self).updateContextFromData(
-            data, context, notify_modified)
+        super().updateContextFromData(data, context, notify_modified)
 
 
 class SnapEditView(BaseSnapEditView, EnableProcessorsMixin):
@@ -926,7 +922,7 @@ class SnapEditView(BaseSnapEditView, EnableProcessorsMixin):
 
     def setUpFields(self):
         """See `LaunchpadFormView`."""
-        super(SnapEditView, self).setUpFields()
+        super().setUpFields()
         self.form_fields += self.createEnabledProcessors(
             self.context.available_processors,
             "The architectures that this snap package builds for. Some "
@@ -934,7 +930,7 @@ class SnapEditView(BaseSnapEditView, EnableProcessorsMixin):
             "disabled by administrators.")
 
     def setUpWidgets(self, context=None):
-        super(SnapEditView, self).setUpWidgets(context)
+        super().setUpWidgets(context)
         info_type_widget = self.widgets['information_type']
         info_type_widget.vocabulary = InformationTypeVocabulary(
             types=self.getPossibleInformationTypes(self.context, self.user))
@@ -957,7 +953,7 @@ class SnapEditView(BaseSnapEditView, EnableProcessorsMixin):
         return initial_values
 
     def validate(self, data):
-        super(SnapEditView, self).validate(data)
+        super().validate(data)
         owner = data.get('owner', None)
         name = data.get('name', None)
         if owner and name:
@@ -988,8 +984,7 @@ class SnapEditView(BaseSnapEditView, EnableProcessorsMixin):
         if 'project' in data:
             project = data.pop('project')
             self.context.setProject(project)
-        super(SnapEditView, self).updateContextFromData(
-            data, context, notify_modified)
+        super().updateContextFromData(data, context, notify_modified)
 
 
 class SnapAuthorizeView(LaunchpadEditFormView):
@@ -1029,7 +1024,7 @@ class SnapAuthorizeView(LaunchpadEditFormView):
                 ])
             return login_url
         except CannotAuthorizeStoreUploads as e:
-            request.response.addInfoNotification(six.text_type(e))
+            request.response.addInfoNotification(str(e))
             request.response.redirect(canonical_url(snap))
             return
 
diff --git a/lib/lp/snappy/browser/snapbuild.py b/lib/lp/snappy/browser/snapbuild.py
index ff5e231..ad54692 100644
--- a/lib/lp/snappy/browser/snapbuild.py
+++ b/lib/lp/snappy/browser/snapbuild.py
@@ -163,7 +163,7 @@ class SnapBuildRescoreView(LaunchpadFormView):
 
     def __call__(self):
         if self.context.can_be_rescored:
-            return super(SnapBuildRescoreView, 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/snappy/browser/snaplisting.py b/lib/lp/snappy/browser/snaplisting.py
index 7c2e9d5..37098b5 100644
--- a/lib/lp/snappy/browser/snaplisting.py
+++ b/lib/lp/snappy/browser/snaplisting.py
@@ -39,7 +39,7 @@ class SnapListingView(LaunchpadView, FeedsMixin):
             'displayname': self.context.displayname}
 
     def initialize(self):
-        super(SnapListingView, self).initialize()
+        super().initialize()
         snaps = getUtility(ISnapSet).findByContext(
             self.context, visible_by_user=self.user)
         loader = partial(
@@ -56,7 +56,7 @@ class BranchSnapListingView(SnapListingView):
     source_enabled = False
 
     def initialize(self):
-        super(BranchSnapListingView, self).initialize()
+        super().initialize()
         # Replace our context with a decorated branch, if it is not already
         # decorated.
         if not isinstance(self.context, DecoratedBranch):
diff --git a/lib/lp/snappy/browser/snapsubscription.py b/lib/lp/snappy/browser/snapsubscription.py
index 0b4afb3..dcb6a2c 100644
--- a/lib/lp/snappy/browser/snapsubscription.py
+++ b/lib/lp/snappy/browser/snapsubscription.py
@@ -93,7 +93,7 @@ class SnapSubscriptionEditView(RedirectToSnapMixin, LaunchpadEditFormView):
     def initialize(self):
         self.snap = self.context.snap
         self.person = self.context.person
-        super(SnapSubscriptionEditView, self).initialize()
+        super().initialize()
 
     @action("Unsubscribe", name="unsubscribe")
     def unsubscribe_action(self, action, data):
@@ -112,7 +112,7 @@ class _SnapSubscriptionCreationView(RedirectToSnapMixin, LaunchpadFormView):
 
     def initialize(self):
         self.snap = self.context
-        super(_SnapSubscriptionCreationView, self).initialize()
+        super().initialize()
 
 
 class SnapSubscriptionAddView(_SnapSubscriptionCreationView):
diff --git a/lib/lp/snappy/browser/tests/test_hassnaps.py b/lib/lp/snappy/browser/tests/test_hassnaps.py
index b70994a..88608a6 100644
--- a/lib/lp/snappy/browser/tests/test_hassnaps.py
+++ b/lib/lp/snappy/browser/tests/test_hassnaps.py
@@ -104,7 +104,7 @@ class TestHasSnapsMenu(WithScenarios, TestCaseWithFactory):
         ]
 
     def setUp(self):
-        super(TestHasSnapsMenu, self).setUp()
+        super().setUp()
         if self.needs_git_hosting_fixture:
             self.useFixture(GitHostingFixture())
 
diff --git a/lib/lp/snappy/browser/tests/test_snap.py b/lib/lp/snappy/browser/tests/test_snap.py
index 3e54942..c513111 100644
--- a/lib/lp/snappy/browser/tests/test_snap.py
+++ b/lib/lp/snappy/browser/tests/test_snap.py
@@ -118,7 +118,7 @@ class TestSnapNavigation(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestSnapNavigation, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture(SNAP_TESTING_FLAGS))
 
     def test_canonical_url(self):
@@ -162,7 +162,7 @@ class BaseTestSnapView(BrowserTestCase):
     layer = LaunchpadFunctionalLayer
 
     def setUp(self):
-        super(BaseTestSnapView, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture(SNAP_TESTING_FLAGS))
         self.useFixture(FakeLogger())
         self.snap_store_client = FakeMethod()
@@ -181,7 +181,7 @@ class BaseTestSnapView(BrowserTestCase):
 class TestSnapAddView(BaseTestSnapView):
 
     def setUp(self):
-        super(TestSnapAddView, self).setUp()
+        super().setUp()
         self.distroseries = self.factory.makeUbuntuDistroSeries(
             version="13.10")
         with admin_logged_in():
@@ -846,7 +846,7 @@ class TestSnapAdminView(BaseTestSnapView):
 class TestSnapEditView(BaseTestSnapView):
 
     def setUp(self):
-        super(TestSnapEditView, self).setUp()
+        super().setUp()
         self.distroseries = self.factory.makeUbuntuDistroSeries(
             version="13.10")
         with admin_logged_in():
@@ -1472,7 +1472,7 @@ class TestSnapEditView(BaseTestSnapView):
 class TestSnapAuthorizeView(BaseTestSnapView):
 
     def setUp(self):
-        super(TestSnapAuthorizeView, self).setUp()
+        super().setUp()
         self.distroseries = self.factory.makeUbuntuDistroSeries()
         with admin_logged_in():
             self.snappyseries = self.factory.makeSnappySeries(
@@ -1620,7 +1620,7 @@ class TestSnapDeleteView(BaseTestSnapView):
 class TestSnapView(BaseTestSnapView):
 
     def setUp(self):
-        super(TestSnapView, self).setUp()
+        super().setUp()
         self.ubuntu = getUtility(ILaunchpadCelebrities).ubuntu
         self.distroseries = self.factory.makeDistroSeries(
             distribution=self.ubuntu, name="shiny", displayname="Shiny")
@@ -2080,7 +2080,7 @@ class TestSnapView(BaseTestSnapView):
 class TestSnapRequestBuildsView(BaseTestSnapView):
 
     def setUp(self):
-        super(TestSnapRequestBuildsView, self).setUp()
+        super().setUp()
         self.ubuntu = getUtility(ILaunchpadCelebrities).ubuntu
         self.distroseries = self.factory.makeDistroSeries(
             distribution=self.ubuntu, name="shiny", displayname="Shiny")
diff --git a/lib/lp/snappy/browser/tests/test_snapbuild.py b/lib/lp/snappy/browser/tests/test_snapbuild.py
index ef78906..5b802d5 100644
--- a/lib/lp/snappy/browser/tests/test_snapbuild.py
+++ b/lib/lp/snappy/browser/tests/test_snapbuild.py
@@ -236,7 +236,7 @@ class TestSnapBuildOperations(BrowserTestCase):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestSnapBuildOperations, self).setUp()
+        super().setUp()
         self.useFixture(FakeLogger())
         self.build = self.factory.makeSnapBuild()
         self.build_url = canonical_url(self.build)
diff --git a/lib/lp/snappy/browser/tests/test_snapsubscription.py b/lib/lp/snappy/browser/tests/test_snapsubscription.py
index d73e0cc..575c0d6 100644
--- a/lib/lp/snappy/browser/tests/test_snapsubscription.py
+++ b/lib/lp/snappy/browser/tests/test_snapsubscription.py
@@ -30,7 +30,7 @@ class BaseTestSnapView(BrowserTestCase):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(BaseTestSnapView, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture(SNAP_TESTING_FLAGS))
         self.useFixture(FakeLogger())
         self.person = self.factory.makePerson(name='snap-owner')
diff --git a/lib/lp/snappy/browser/widgets/snaparchive.py b/lib/lp/snappy/browser/widgets/snaparchive.py
index 74102aa..538123e 100644
--- a/lib/lp/snappy/browser/widgets/snaparchive.py
+++ b/lib/lp/snappy/browser/widgets/snaparchive.py
@@ -137,7 +137,7 @@ class SnapArchiveWidget(BrowserWidget, InputWidget):
                 self.getInputValue()
         except InputErrors as error:
             self._error = error
-        return super(SnapArchiveWidget, self).error()
+        return super().error()
 
     def __call__(self):
         """See `IBrowserWidget`."""
diff --git a/lib/lp/snappy/browser/widgets/snapbuildchannels.py b/lib/lp/snappy/browser/widgets/snapbuildchannels.py
index 1be81fc..8d0264d 100644
--- a/lib/lp/snappy/browser/widgets/snapbuildchannels.py
+++ b/lib/lp/snappy/browser/widgets/snapbuildchannels.py
@@ -37,7 +37,7 @@ class SnapBuildChannelsWidget(BrowserWidget, InputWidget):
     _widgets_set_up = False
 
     def __init__(self, context, request):
-        super(SnapBuildChannelsWidget, self).__init__(context, request)
+        super().__init__(context, request)
         self.hint = (
             'The channels to use for build tools when building the snap '
             'package.\n')
@@ -112,7 +112,7 @@ class SnapBuildChannelsWidget(BrowserWidget, InputWidget):
                 self.getInputValue()
         except InputErrors as error:
             self._error = error
-        return super(SnapBuildChannelsWidget, self).error()
+        return super().error()
 
     def __call__(self):
         """See `IBrowserWidget`."""
diff --git a/lib/lp/snappy/browser/widgets/storechannels.py b/lib/lp/snappy/browser/widgets/storechannels.py
index 996393b..7b0badf 100644
--- a/lib/lp/snappy/browser/widgets/storechannels.py
+++ b/lib/lp/snappy/browser/widgets/storechannels.py
@@ -48,7 +48,7 @@ class StoreChannelsWidget(BrowserWidget, InputWidget):
 
     def __init__(self, field, value_type, request):
         # We don't use value_type.
-        super(StoreChannelsWidget, self).__init__(field, request)
+        super().__init__(field, request)
         # disable help_text for the global widget
         self.hint = None
 
@@ -168,7 +168,7 @@ class StoreChannelsWidget(BrowserWidget, InputWidget):
                 self.getInputValue()
         except InputErrors as error:
             self._error = error
-        return super(StoreChannelsWidget, self).error()
+        return super().error()
 
     def __call__(self):
         """See `IBrowserWidget`."""
diff --git a/lib/lp/snappy/browser/widgets/tests/test_snaparchivewidget.py b/lib/lp/snappy/browser/widgets/tests/test_snaparchivewidget.py
index e6b1ec1..5116684 100644
--- a/lib/lp/snappy/browser/widgets/tests/test_snaparchivewidget.py
+++ b/lib/lp/snappy/browser/widgets/tests/test_snaparchivewidget.py
@@ -60,7 +60,7 @@ class TestSnapArchiveWidget(WithScenarios, TestCaseWithFactory):
         ]
 
     def setUp(self):
-        super(TestSnapArchiveWidget, self).setUp()
+        super().setUp()
         self.distroseries = self.factory.makeDistroSeries()
         field = Reference(__name__="archive", schema=IArchive, title="Archive")
         self.context = self.context_factory(self)
diff --git a/lib/lp/snappy/browser/widgets/tests/test_snapbuildchannelswidget.py b/lib/lp/snappy/browser/widgets/tests/test_snapbuildchannelswidget.py
index 2d4dc25..543d4ed 100644
--- a/lib/lp/snappy/browser/widgets/tests/test_snapbuildchannelswidget.py
+++ b/lib/lp/snappy/browser/widgets/tests/test_snapbuildchannelswidget.py
@@ -28,7 +28,7 @@ class TestSnapBuildChannelsWidget(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestSnapBuildChannelsWidget, self).setUp()
+        super().setUp()
         field = Dict(
             __name__="auto_build_channels",
             title="Source snap channels for automatic builds")
diff --git a/lib/lp/snappy/browser/widgets/tests/test_storechannelswidget.py b/lib/lp/snappy/browser/widgets/tests/test_storechannelswidget.py
index bc452aa..6deb9de 100644
--- a/lib/lp/snappy/browser/widgets/tests/test_storechannelswidget.py
+++ b/lib/lp/snappy/browser/widgets/tests/test_storechannelswidget.py
@@ -31,7 +31,7 @@ class TestStoreChannelsWidget(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestStoreChannelsWidget, self).setUp()
+        super().setUp()
         field = List(__name__="channels", title="Store channels")
         self.context = self.factory.makeSnap()
         field = field.bind(self.context)
diff --git a/lib/lp/snappy/interfaces/snap.py b/lib/lp/snappy/interfaces/snap.py
index 957a378..af3cfd8 100644
--- a/lib/lp/snappy/interfaces/snap.py
+++ b/lib/lp/snappy/interfaces/snap.py
@@ -133,7 +133,7 @@ class SnapBuildAlreadyPending(Exception):
     """A build was requested when an identical build was already pending."""
 
     def __init__(self):
-        super(SnapBuildAlreadyPending, self).__init__(
+        super().__init__(
             "An identical build of this snap package is already pending.")
 
 
@@ -150,7 +150,7 @@ class SnapBuildArchiveOwnerMismatch(Forbidden):
     """
 
     def __init__(self):
-        super(SnapBuildArchiveOwnerMismatch, self).__init__(
+        super().__init__(
             "Snap package builds against private archives are only allowed "
             "if the snap package owner and the archive owner are equal.")
 
@@ -160,7 +160,7 @@ class SnapBuildDisallowedArchitecture(Exception):
     """A build was requested for a disallowed architecture."""
 
     def __init__(self, das, pocket):
-        super(SnapBuildDisallowedArchitecture, self).__init__(
+        super().__init__(
             "This snap package is not allowed to build for %s/%s." %
             (das.distroseries.getSuite(pocket), das.architecturetag))
 
@@ -170,8 +170,7 @@ class SnapPrivateFeatureDisabled(Unauthorized):
     """Only certain users can create private snap objects."""
 
     def __init__(self):
-        super(SnapPrivateFeatureDisabled, self).__init__(
-            "You do not have permission to create private snaps")
+        super().__init__("You do not have permission to create private snaps")
 
 
 @error_status(http.client.BAD_REQUEST)
@@ -179,7 +178,7 @@ class DuplicateSnapName(Exception):
     """Raised for snap packages with duplicate name/owner."""
 
     def __init__(self):
-        super(DuplicateSnapName, self).__init__(
+        super().__init__(
             "There is already a snap package with the same name and owner.")
 
 
@@ -198,7 +197,7 @@ class NoSourceForSnap(Exception):
     """Snap packages must have a source (Bazaar or Git branch)."""
 
     def __init__(self):
-        super(NoSourceForSnap, self).__init__(
+        super().__init__(
             "New snap packages must have either a Bazaar branch or a Git "
             "branch.")
 
@@ -213,7 +212,7 @@ class SnapPrivacyMismatch(Exception):
     """Snap package privacy does not match its content."""
 
     def __init__(self, message=None):
-        super(SnapPrivacyMismatch, self).__init__(
+        super().__init__(
             message or
             "Snap recipe contains private information and cannot be public.")
 
@@ -223,7 +222,7 @@ class SnapPrivacyPillarError(Exception):
     """Private Snaps should be based in a pillar."""
 
     def __init__(self, message=None):
-        super(SnapPrivacyPillarError, self).__init__(
+        super().__init__(
             message or "Private Snap recipes should have a pillar.")
 
 
@@ -240,8 +239,7 @@ class CannotModifySnapProcessor(Exception):
         'by administrators.')
 
     def __init__(self, processor):
-        super(CannotModifySnapProcessor, self).__init__(
-            self._fmt % {'processor': processor.name})
+        super().__init__(self._fmt % {'processor': processor.name})
 
 
 @error_status(http.client.BAD_REQUEST)
@@ -264,7 +262,7 @@ class CannotRequestAutoBuilds(Exception):
     """Snap package is not configured for automatic builds."""
 
     def __init__(self, field):
-        super(CannotRequestAutoBuilds, self).__init__(
+        super().__init__(
             "This snap package cannot have automatic builds created for it "
             "because %s is not set." % field)
 
@@ -273,15 +271,14 @@ class MissingSnapcraftYaml(Exception):
     """The repository for this snap package does not have a snapcraft.yaml."""
 
     def __init__(self, branch_name):
-        super(MissingSnapcraftYaml, self).__init__(
-            "Cannot find snapcraft.yaml in %s" % branch_name)
+        super().__init__("Cannot find snapcraft.yaml in %s" % branch_name)
 
 
 class CannotFetchSnapcraftYaml(Exception):
     """Launchpad cannot fetch this snap package's snapcraft.yaml."""
 
     def __init__(self, message, unsupported_remote=False):
-        super(CannotFetchSnapcraftYaml, self).__init__(message)
+        super().__init__(message)
         self.unsupported_remote = unsupported_remote
 
 
diff --git a/lib/lp/snappy/interfaces/snapbase.py b/lib/lp/snappy/interfaces/snapbase.py
index ace5443..d635bfb 100644
--- a/lib/lp/snappy/interfaces/snapbase.py
+++ b/lib/lp/snappy/interfaces/snapbase.py
@@ -34,7 +34,6 @@ from lazr.restful.fields import (
     Reference,
     )
 from lazr.restful.interface import copy_field
-import six
 from zope.component import getUtility
 from zope.interface import Interface
 from zope.schema import (
@@ -179,7 +178,7 @@ class ISnapBaseEdit(Interface):
 
     @operation_parameters(
         component=copy_field(IArchiveDependency["component_name"]))
-    @export_operation_as(six.ensure_str("addArchiveDependency"))
+    @export_operation_as("addArchiveDependency")
     @export_factory_operation(IArchiveDependency, ["dependency", "pocket"])
     @operation_for_version("devel")
     def _addArchiveDependency(dependency, pocket, component=None):
diff --git a/lib/lp/snappy/interfaces/snapstoreclient.py b/lib/lp/snappy/interfaces/snapstoreclient.py
index 30740d2..1e00979 100644
--- a/lib/lp/snappy/interfaces/snapstoreclient.py
+++ b/lib/lp/snappy/interfaces/snapstoreclient.py
@@ -27,7 +27,7 @@ class SnapStoreError(Exception):
 
     def __init__(
             self, message="", detail=None, messages=None, can_retry=False):
-        super(SnapStoreError, self).__init__(message)
+        super().__init__(message)
         self.message = message
         self.detail = detail
         self.messages = messages
diff --git a/lib/lp/snappy/mail/snapbuild.py b/lib/lp/snappy/mail/snapbuild.py
index 310c782..aee1685 100644
--- a/lib/lp/snappy/mail/snapbuild.py
+++ b/lib/lp/snappy/mail/snapbuild.py
@@ -89,14 +89,14 @@ class SnapBuildMailer(BaseMailer):
 
     def __init__(self, subject, template_name, recipients, from_address,
                  notification_type, build):
-        super(SnapBuildMailer, self).__init__(
+        super().__init__(
             subject, template_name, recipients, from_address,
             notification_type=notification_type)
         self.build = build
 
     def _getHeaders(self, email, recipient):
         """See `BaseMailer`."""
-        headers = super(SnapBuildMailer, self)._getHeaders(email, recipient)
+        headers = super()._getHeaders(email, recipient)
         headers["X-Launchpad-Build-State"] = self.build.status.name
         return headers
 
@@ -110,8 +110,7 @@ class SnapBuildMailer(BaseMailer):
         else:
             error_message = upload_job.error_message or ""
             store_url = upload_job.store_url or ""
-        params = super(SnapBuildMailer, 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/snappy/model/snap.py b/lib/lp/snappy/model/snap.py
index 6798eb2..f6251d9 100644
--- a/lib/lp/snappy/model/snap.py
+++ b/lib/lp/snappy/model/snap.py
@@ -426,7 +426,7 @@ class Snap(Storm, WebhookTargetMixin):
                  store_upload=False, store_series=None, store_name=None,
                  store_secrets=None, store_channels=None, project=None):
         """Construct a `Snap`."""
-        super(Snap, self).__init__()
+        super().__init__()
 
         # Set the information type first so that other validators can perform
         # suitable privacy checks, but pillar should also be set, since it's
diff --git a/lib/lp/snappy/model/snapbase.py b/lib/lp/snappy/model/snapbase.py
index 1ad5c25..7577c81 100644
--- a/lib/lp/snappy/model/snapbase.py
+++ b/lib/lp/snappy/model/snapbase.py
@@ -8,7 +8,6 @@ __all__ = [
     ]
 
 import pytz
-import six
 from storm.locals import (
     Bool,
     DateTime,
@@ -74,7 +73,7 @@ class SnapBase(Storm):
 
     def __init__(self, registrant, name, display_name, distro_series,
                  build_channels, date_created=DEFAULT):
-        super(SnapBase, self).__init__()
+        super().__init__()
         self.registrant = registrant
         self.name = name
         self.display_name = display_name
@@ -145,7 +144,7 @@ class SnapBase(Storm):
 
     def _addArchiveDependency(self, dependency, pocket, component=None):
         """See `ISnapBase`."""
-        if isinstance(component, six.text_type):
+        if isinstance(component, str):
             try:
                 component = getUtility(IComponentSet)[component]
             except NotFoundError as e:
diff --git a/lib/lp/snappy/model/snapbuild.py b/lib/lp/snappy/model/snapbuild.py
index 31955e9..a4405de 100644
--- a/lib/lp/snappy/model/snapbuild.py
+++ b/lib/lp/snappy/model/snapbuild.py
@@ -123,7 +123,7 @@ class SnapFile(Storm):
 
     def __init__(self, snapbuild, libraryfile):
         """Construct a `SnapFile`."""
-        super(SnapFile, self).__init__()
+        super().__init__()
         self.snapbuild = snapbuild
         self.libraryfile = libraryfile
 
@@ -199,7 +199,7 @@ class SnapBuild(PackageBuildMixin, Storm):
                  processor, virtualized, date_created,
                  store_upload_metadata=None, build_request=None):
         """Construct a `SnapBuild`."""
-        super(SnapBuild, self).__init__()
+        super().__init__()
         self.build_farm_job = build_farm_job
         self.requester = requester
         self.snap = snap
@@ -416,7 +416,7 @@ class SnapBuild(PackageBuildMixin, Storm):
                      force_invalid_transition=False):
         """See `IBuildFarmJob`."""
         old_status = self.status
-        super(SnapBuild, 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/snappy/model/snapbuildbehaviour.py b/lib/lp/snappy/model/snapbuildbehaviour.py
index cfbf645..a136e58 100644
--- a/lib/lp/snappy/model/snapbuildbehaviour.py
+++ b/lib/lp/snappy/model/snapbuildbehaviour.py
@@ -106,8 +106,7 @@ class SnapBuildBehaviour(BuilderProxyMixin, BuildFarmJobBehaviourBase):
         Return the extra arguments required by the slave for the given build.
         """
         build = self.build
-        args = yield super(SnapBuildBehaviour, self).extraBuildArgs(
-            logger=logger)
+        args = yield super().extraBuildArgs(logger=logger)
         yield self.addProxyArgs(args, build.snap.allow_internet)
         args["name"] = build.snap.store_name or build.snap.name
         channels = build.channels or {}
diff --git a/lib/lp/snappy/model/snapbuildjob.py b/lib/lp/snappy/model/snapbuildjob.py
index 55d219b..7888c90 100644
--- a/lib/lp/snappy/model/snapbuildjob.py
+++ b/lib/lp/snappy/model/snapbuildjob.py
@@ -101,7 +101,7 @@ class SnapBuildJob(StormBase):
         :param metadata: The type-specific variables, as a JSON-compatible
             dict.
         """
-        super(SnapBuildJob, self).__init__()
+        super().__init__()
         self.job = Job(**job_args)
         self.snapbuild = snapbuild
         self.job_type = job_type
@@ -152,7 +152,7 @@ class SnapBuildJobDerived(BaseRunnableJob, metaclass=EnumeratedSubclass):
 
     def getOopsVars(self):
         """See `IRunnableJob`."""
-        oops_vars = super(SnapBuildJobDerived, self).getOopsVars()
+        oops_vars = super().getOopsVars()
         oops_vars.extend([
             ('job_id', self.context.job.id),
             ('job_type', self.context.job_type.title),
@@ -291,7 +291,7 @@ class SnapStoreUploadJob(SnapBuildJobDerived):
     def _do_lifecycle(self, method_name, manage_transaction=False,
                       *args, **kwargs):
         old_store_upload_status = self.snapbuild.store_upload_status
-        getattr(super(SnapStoreUploadJob, self), method_name)(
+        getattr(super(), method_name)(
             *args, manage_transaction=manage_transaction, **kwargs)
         if self.snapbuild.store_upload_status != old_store_upload_status:
             notify(SnapBuildStoreUploadStatusChangedEvent(self.snapbuild))
@@ -318,7 +318,7 @@ class SnapStoreUploadJob(SnapBuildJobDerived):
 
     def getOopsVars(self):
         """See `IRunnableJob`."""
-        oops_vars = super(SnapStoreUploadJob, self).getOopsVars()
+        oops_vars = super().getOopsVars()
         oops_vars.append(('error_detail', self.error_detail))
         return oops_vars
 
diff --git a/lib/lp/snappy/model/snapjob.py b/lib/lp/snappy/model/snapjob.py
index bf16b2d..c84f823 100644
--- a/lib/lp/snappy/model/snapjob.py
+++ b/lib/lp/snappy/model/snapjob.py
@@ -106,7 +106,7 @@ class SnapJob(StormBase):
         :param metadata: The type-specific variables, as a JSON-compatible
             dict.
         """
-        super(SnapJob, self).__init__()
+        super().__init__()
         self.job = Job(**job_args)
         self.snap = snap
         self.job_type = job_type
@@ -155,7 +155,7 @@ class SnapJobDerived(BaseRunnableJob, metaclass=EnumeratedSubclass):
 
     def getOopsVars(self):
         """See `IRunnableJob`."""
-        oops_vars = super(SnapJobDerived, self).getOopsVars()
+        oops_vars = super().getOopsVars()
         oops_vars.extend([
             ("job_id", self.context.job.id),
             ("job_type", self.context.job_type.title),
diff --git a/lib/lp/snappy/model/snappyseries.py b/lib/lp/snappy/model/snappyseries.py
index 52de880..50cef2a 100644
--- a/lib/lp/snappy/model/snappyseries.py
+++ b/lib/lp/snappy/model/snappyseries.py
@@ -65,7 +65,7 @@ class SnappySeries(Storm):
 
     def __init__(self, registrant, name, display_name, status,
                  preferred_distro_series=None, date_created=DEFAULT):
-        super(SnappySeries, self).__init__()
+        super().__init__()
         self.registrant = registrant
         self.name = name
         self.display_name = display_name
@@ -207,7 +207,7 @@ class SnappyDistroSeries(Storm, SnappyDistroSeriesMixin):
     preferred = Bool(name='preferred', allow_none=False)
 
     def __init__(self, snappy_series, distro_series, preferred=False):
-        super(SnappyDistroSeries, self).__init__()
+        super().__init__()
         self.snappy_series = snappy_series
         self.distro_series = distro_series
         self.preferred = preferred
diff --git a/lib/lp/snappy/model/snapstoreclient.py b/lib/lp/snappy/model/snapstoreclient.py
index a288a35..e5900fc 100644
--- a/lib/lp/snappy/model/snapstoreclient.py
+++ b/lib/lp/snappy/model/snapstoreclient.py
@@ -398,7 +398,7 @@ class SnapStoreClient:
         channels = memcache_client.get_json(memcache_key, log, description)
 
         if (channels is None and
-                not getFeatureFlag(u"snap.disable_channel_search")):
+                not getFeatureFlag("snap.disable_channel_search")):
             path = "api/v1/channels"
             timeline = cls._getTimeline()
             if timeline is not None:
diff --git a/lib/lp/snappy/model/snapsubscription.py b/lib/lp/snappy/model/snapsubscription.py
index fd36b12..4384cd5 100644
--- a/lib/lp/snappy/model/snapsubscription.py
+++ b/lib/lp/snappy/model/snapsubscription.py
@@ -44,7 +44,7 @@ class SnapSubscription(StormBase):
     subscribed_by = Reference(subscribed_by_id, "Person.id")
 
     def __init__(self, snap, person, subscribed_by):
-        super(SnapSubscription, self).__init__()
+        super().__init__()
         self.snap = snap
         self.person = person
         self.subscribed_by = subscribed_by
diff --git a/lib/lp/snappy/tests/test_snap.py b/lib/lp/snappy/tests/test_snap.py
index 08ce35b..178c4fc 100644
--- a/lib/lp/snappy/tests/test_snap.py
+++ b/lib/lp/snappy/tests/test_snap.py
@@ -186,7 +186,7 @@ class TestSnap(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestSnap, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture(SNAP_TESTING_FLAGS))
 
     def test_implements_interfaces(self):
@@ -1391,7 +1391,7 @@ class TestSnapDeleteWithBuilds(TestCaseWithFactory):
     layer = LaunchpadFunctionalLayer
 
     def setUp(self):
-        super(TestSnapDeleteWithBuilds, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture(SNAP_TESTING_FLAGS))
 
     def test_delete_with_builds(self):
@@ -1507,7 +1507,7 @@ class TestSnapVisibility(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestSnapVisibility, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture(SNAP_TESTING_FLAGS))
 
     def getSnapGrants(self, snap, person=None):
@@ -1654,7 +1654,7 @@ class TestSnapSet(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestSnapSet, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture(SNAP_TESTING_FLAGS))
 
     def test_class_implements_interfaces(self):
@@ -1891,7 +1891,7 @@ class TestSnapSet(TestCaseWithFactory):
         self.assertContentEqual(snaps[3:], snap_set.findByPerson(owners[1]))
 
     def test_get_snap_privacy_filter_includes_grants(self):
-        grantee, creator = [self.factory.makePerson() for i in range(2)]
+        grantee, creator = (self.factory.makePerson() for i in range(2))
         # All snaps are owned by "creator", and "grantee" will later have
         # access granted using sharing service.
         snap_data = dict(registrant=creator, owner=creator, private=True)
@@ -2763,7 +2763,7 @@ class TestSnapProcessors(TestCaseWithFactory):
     layer = LaunchpadFunctionalLayer
 
     def setUp(self):
-        super(TestSnapProcessors, self).setUp(user="foo.bar@xxxxxxxxxxxxx")
+        super().setUp(user="foo.bar@xxxxxxxxxxxxx")
         self.useFixture(FeatureFixture(SNAP_TESTING_FLAGS))
         self.default_procs = [
             getUtility(IProcessorSet).getByName("386"),
@@ -2880,7 +2880,7 @@ class TestSnapWebservice(TestCaseWithFactory):
     layer = LaunchpadFunctionalLayer
 
     def setUp(self):
-        super(TestSnapWebservice, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture(SNAP_TESTING_FLAGS))
         self.snap_store_client = FakeMethod()
         self.snap_store_client.listChannels = FakeMethod(result=[
diff --git a/lib/lp/snappy/tests/test_snapbase.py b/lib/lp/snappy/tests/test_snapbase.py
index 88bf5ff..a5de6f2 100644
--- a/lib/lp/snappy/tests/test_snapbase.py
+++ b/lib/lp/snappy/tests/test_snapbase.py
@@ -80,7 +80,7 @@ class TestSnapBaseProcessors(TestCaseWithFactory):
     layer = ZopelessDatabaseLayer
 
     def setUp(self):
-        super(TestSnapBaseProcessors, self).setUp(user="foo.bar@xxxxxxxxxxxxx")
+        super().setUp(user="foo.bar@xxxxxxxxxxxxx")
         self.unrestricted_procs = [
             self.factory.makeProcessor() for _ in range(3)]
         self.restricted_procs = [
diff --git a/lib/lp/snappy/tests/test_snapbuild.py b/lib/lp/snappy/tests/test_snapbuild.py
index 9ed98cb..639893f 100644
--- a/lib/lp/snappy/tests/test_snapbuild.py
+++ b/lib/lp/snappy/tests/test_snapbuild.py
@@ -100,7 +100,7 @@ class TestSnapBuild(TestCaseWithFactory):
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestSnapBuild, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture(SNAP_TESTING_FLAGS))
         self.pushConfig(
             "snappy", store_url="http://sca.example/";,
@@ -700,7 +700,7 @@ class TestSnapBuildSet(TestCaseWithFactory):
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestSnapBuildSet, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture(SNAP_TESTING_FLAGS))
 
     def test_getByBuildFarmJob_works(self):
@@ -731,7 +731,7 @@ class TestSnapBuildWebservice(TestCaseWithFactory):
     layer = LaunchpadFunctionalLayer
 
     def setUp(self):
-        super(TestSnapBuildWebservice, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture(SNAP_TESTING_FLAGS))
         self.person = self.factory.makePerson()
         self.webservice = webservice_for_person(
@@ -897,7 +897,7 @@ class TestSnapBuildMacaroonIssuer(MacaroonTestMixin, TestCaseWithFactory):
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestSnapBuildMacaroonIssuer, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture(SNAP_TESTING_FLAGS))
         self.pushConfig(
             "launchpad", internal_macaroon_secret_key="some-secret")
diff --git a/lib/lp/snappy/tests/test_snapbuildbehaviour.py b/lib/lp/snappy/tests/test_snapbuildbehaviour.py
index dbd91e7..fc2d5a8 100644
--- a/lib/lp/snappy/tests/test_snapbuildbehaviour.py
+++ b/lib/lp/snappy/tests/test_snapbuildbehaviour.py
@@ -125,7 +125,7 @@ class TestSnapBuildBehaviourBase(TestCaseWithFactory):
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestSnapBuildBehaviourBase, self).setUp()
+        super().setUp()
         self.pushConfig("snappy", tools_source=None, tools_fingerprint=None)
 
     def makeJob(self, archive=None, pocket=PackagePublishingPocket.UPDATES,
@@ -251,7 +251,7 @@ class TestAsyncSnapBuildBehaviour(StatsMixin, TestSnapBuildBehaviourBase):
 
     @defer.inlineCallbacks
     def setUp(self):
-        super(TestAsyncSnapBuildBehaviour, self).setUp()
+        super().setUp()
         build_username = 'SNAPBUILD-1'
         self.token = {'secret': uuid.uuid4().hex,
                       'username': build_username,
@@ -273,7 +273,7 @@ class TestAsyncSnapBuildBehaviour(StatsMixin, TestSnapBuildBehaviourBase):
     def makeJob(self, **kwargs):
         # We need a builder slave in these tests, in order that requesting a
         # proxy token can piggyback on its reactor and pool.
-        job = super(TestAsyncSnapBuildBehaviour, self).makeJob(**kwargs)
+        job = super().makeJob(**kwargs)
         builder = MockBuilder()
         builder.processor = job.build.processor
         slave = self.useFixture(SlaveTestHelpers()).getClientSlave()
diff --git a/lib/lp/snappy/tests/test_snapbuildjob.py b/lib/lp/snappy/tests/test_snapbuildjob.py
index 1918da5..e0c485e 100644
--- a/lib/lp/snappy/tests/test_snapbuildjob.py
+++ b/lib/lp/snappy/tests/test_snapbuildjob.py
@@ -95,7 +95,7 @@ class TestSnapBuildJob(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestSnapBuildJob, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture(SNAP_TESTING_FLAGS))
 
     def test_provides_interface(self):
@@ -111,7 +111,7 @@ class TestSnapStoreUploadJob(TestCaseWithFactory):
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestSnapStoreUploadJob, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture(SNAP_TESTING_FLAGS))
         self.status_url = "http://sca.example/dev/api/snaps/1/builds/1/status";
         self.store_url = "http://sca.example/dev/click-apps/1/rev/1/";
diff --git a/lib/lp/snappy/tests/test_snappyseries.py b/lib/lp/snappy/tests/test_snappyseries.py
index cfdf194..7d4e64c 100644
--- a/lib/lp/snappy/tests/test_snappyseries.py
+++ b/lib/lp/snappy/tests/test_snappyseries.py
@@ -43,7 +43,7 @@ class TestSnappySeries(TestCaseWithFactory):
     layer = ZopelessDatabaseLayer
 
     def setUp(self):
-        super(TestSnappySeries, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture(SNAP_TESTING_FLAGS))
 
     def test_implements_interface(self):
@@ -108,7 +108,7 @@ class TestSnappySeriesSet(TestCaseWithFactory):
     layer = ZopelessDatabaseLayer
 
     def setUp(self):
-        super(TestSnappySeriesSet, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture(SNAP_TESTING_FLAGS))
 
     def test_getByName(self):
@@ -132,7 +132,7 @@ class TestSnappySeriesWebservice(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestSnappySeriesWebservice, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture(SNAP_TESTING_FLAGS))
 
     def test_new_unpriv(self):
@@ -234,7 +234,7 @@ class TestSnappyDistroSeriesSet(TestCaseWithFactory):
     layer = ZopelessDatabaseLayer
 
     def setUp(self):
-        super(TestSnappyDistroSeriesSet, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture(SNAP_TESTING_FLAGS))
 
     def test_getByBothSeries(self):
diff --git a/lib/lp/snappy/tests/test_snapstoreclient.py b/lib/lp/snappy/tests/test_snapstoreclient.py
index 66e446b..b4bd3ea 100644
--- a/lib/lp/snappy/tests/test_snapstoreclient.py
+++ b/lib/lp/snappy/tests/test_snapstoreclient.py
@@ -213,7 +213,7 @@ class TestSnapStoreClient(TestCaseWithFactory):
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestSnapStoreClient, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture(SNAP_TESTING_FLAGS))
         self.pushConfig(
             "snappy", store_url="http://sca.example/";,
@@ -769,7 +769,7 @@ class TestSnapStoreClient(TestCaseWithFactory):
     @responses.activate
     def test_listChannels_disable_search(self):
         self.useFixture(
-            FeatureFixture({u"snap.disable_channel_search": u"on"}))
+            FeatureFixture({"snap.disable_channel_search": "on"}))
         expected_channels = [
             {"name": "candidate", "display_name": "Candidate"},
             {"name": "edge", "display_name": "Edge"},
diff --git a/lib/lp/snappy/tests/test_snapvocabularies.py b/lib/lp/snappy/tests/test_snapvocabularies.py
index bac4756..942b5c6 100644
--- a/lib/lp/snappy/tests/test_snapvocabularies.py
+++ b/lib/lp/snappy/tests/test_snapvocabularies.py
@@ -15,7 +15,7 @@ class TestSnappyDistroSeriesVocabulary(TestCaseWithFactory):
     layer = ZopelessDatabaseLayer
 
     def setUp(self):
-        super(TestSnappyDistroSeriesVocabulary, self).setUp()
+        super().setUp()
         self.vocab = SnappyDistroSeriesVocabulary()
 
     def test_getTermByToken(self):
diff --git a/lib/lp/snappy/validators/tests/test_channels.py b/lib/lp/snappy/validators/tests/test_channels.py
index e2da963..02b19ad 100644
--- a/lib/lp/snappy/validators/tests/test_channels.py
+++ b/lib/lp/snappy/validators/tests/test_channels.py
@@ -18,7 +18,7 @@ class TestChannelsValidator(TestCaseWithFactory):
     layer = LaunchpadFunctionalLayer
 
     def setUp(self):
-        super(TestChannelsValidator, self).setUp()
+        super().setUp()
         self.risks = [
             {"name": "stable", "display_name": "Stable"},
             {"name": "candidate", "display_name": "Candidate"},
diff --git a/lib/lp/snappy/vocabularies.py b/lib/lp/snappy/vocabularies.py
index 6fa31a9..8a22a9c 100644
--- a/lib/lp/snappy/vocabularies.py
+++ b/lib/lp/snappy/vocabularies.py
@@ -238,7 +238,7 @@ class SnapStoreChannelVocabulary(SimpleVocabulary):
                 for name in context_channels:
                     if name not in known_names:
                         terms.append(self.createTerm(name, name, name))
-        super(SnapStoreChannelVocabulary, self).__init__(terms)
+        super().__init__(terms)
 
     @classmethod
     def createTerm(cls, *args):