← Back to team overview

launchpad-reviewers team mailing list archive

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

 

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

Commit message:
lp.{coop,oci}: Apply "pyupgrade --py3-plus"

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/413412
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:pyupgrade-py3-coop-oci into launchpad:master.
diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs
index 2e06d20..a251b8f 100644
--- a/.git-blame-ignore-revs
+++ b/.git-blame-ignore-revs
@@ -26,3 +26,5 @@ b6725842a2470e3927bb73bf400c4476a06ee3ba
 cee9b128d3e49ca814464eeeeec50e6bcabcc4ba
 # apply pyupgrade --py3-plus to lp.codehosting
 f36fe66e5e5a5e82ba8c3269e32d76bd573d1175
+# apply pyupgrade --py3-plus to lp.{coop,oci}
+fbed83f22424df8fa5647349493f78937a520db5
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 77a3d08..22c2329 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -50,6 +50,8 @@ repos:
             |charms
             |code
             |codehosting
+            |coop
+            |oci
           )/
 -   repo: https://github.com/PyCQA/isort
     rev: 5.9.2
diff --git a/lib/lp/coop/answersbugs/tests/test_doc.py b/lib/lp/coop/answersbugs/tests/test_doc.py
index a917db1..a3e2eb0 100644
--- a/lib/lp/coop/answersbugs/tests/test_doc.py
+++ b/lib/lp/coop/answersbugs/tests/test_doc.py
@@ -54,8 +54,8 @@ def _createUbuntuBugTaskLinkedToQuestion():
     ubuntu = getUtility(IDistributionSet).getByName('ubuntu')
     ubuntu.addAnswerContact(ubuntu_team, ubuntu_team.teamowner)
     ubuntu_question = ubuntu.newQuestion(
-        sample_person, u"Can't install Ubuntu",
-        u"I insert the install CD in the CD-ROM drive, but it won't boot.")
+        sample_person, "Can't install Ubuntu",
+        "I insert the install CD in the CD-ROM drive, but it won't boot.")
     no_priv = getUtility(IPersonSet).getByEmail('no-priv@xxxxxxxxxxxxx')
     params = CreateBugParams(
         owner=no_priv, title="Installer fails on a Mac PPC",
diff --git a/lib/lp/oci/browser/ocirecipe.py b/lib/lp/oci/browser/ocirecipe.py
index 3b12dff..7329652 100644
--- a/lib/lp/oci/browser/ocirecipe.py
+++ b/lib/lp/oci/browser/ocirecipe.py
@@ -20,7 +20,6 @@ from lazr.restful.interface import (
     copy_field,
     use_template,
     )
-import six
 from zope.component import getUtility
 from zope.formlib.form import FormFields
 from zope.formlib.textwidgets import TextAreaWidget
@@ -448,7 +447,7 @@ class OCIRecipeEditPushRulesView(LaunchpadFormView):
         return field_type, rule_id
 
     def setUpFields(self):
-        super(OCIRecipeEditPushRulesView, self).setUpFields()
+        super().setUpFields()
         image_name_fields = []
         url_fields = []
         region_fields = []
@@ -510,7 +509,7 @@ class OCIRecipeEditPushRulesView(LaunchpadFormView):
                     required=True, readonly=False))
         image_name_fields.append(
             TextLine(
-                __name__=u'add_image_name',
+                __name__='add_image_name',
                 required=False, readonly=False))
         add_credentials = Choice(
             __name__='add_credentials',
@@ -519,26 +518,26 @@ class OCIRecipeEditPushRulesView(LaunchpadFormView):
         existing_credentials = Choice(
             vocabulary='OCIRegistryCredentials',
             required=False,
-            __name__=u'existing_credentials')
+            __name__='existing_credentials')
         url_fields.append(
             TextLine(
-                __name__=u'add_url',
+                __name__='add_url',
                 required=False, readonly=False))
         region_fields.append(
             TextLine(
-                __name__=u'add_region',
+                __name__='add_region',
                 required=False, readonly=False))
         username_fields.append(
             TextLine(
-                __name__=u'add_username',
+                __name__='add_username',
                 required=False, readonly=False))
         password_fields.append(
             Password(
-                __name__=u'add_password',
+                __name__='add_password',
                 required=False, readonly=False))
         password_fields.append(
             Password(
-                __name__=u'add_confirm_password',
+                __name__='add_confirm_password',
                 required=False, readonly=False))
 
         self.form_fields = (
@@ -561,7 +560,7 @@ class OCIRecipeEditPushRulesView(LaunchpadFormView):
 
     def setUpWidgets(self, context=None):
         """See `LaunchpadFormView`."""
-        super(OCIRecipeEditPushRulesView, self).setUpWidgets(context=context)
+        super().setUpWidgets(context=context)
         for widget in self.widgets:
             widget.display_label = False
             widget.hint = None
@@ -846,7 +845,7 @@ class OCIRecipeFormMixin:
             default = ""
         return FormFields(Text(
             __name__='build_args',
-            title=u'Build-time ARG variables',
+            title='Build-time ARG variables',
             description=("One per line. Each ARG should be in the format "
                          "of ARG_KEY=arg_value."),
             default=default,
@@ -861,7 +860,7 @@ class OCIRecipeFormMixin:
             if '=' not in line:
                 msg = ("'%s' at line %s is not a valid KEY=value pair." %
                        (line, i + 1))
-                self.setFieldError("build_args", six.text_type(msg))
+                self.setFieldError("build_args", str(msg))
                 return
             k, v = line.split('=', 1)
             build_args[k] = v
@@ -919,13 +918,13 @@ class OCIRecipeAddView(LaunchpadFormView, EnableProcessorsMixin,
     custom_widget_git_ref = GitRefWidget
 
     def initialize(self):
-        super(OCIRecipeAddView, self).initialize()
+        super().initialize()
         if not getFeatureFlag(OCI_RECIPE_ALLOW_CREATE):
             raise OCIRecipeFeatureDisabled()
 
     def setUpFields(self):
         """See `LaunchpadFormView`."""
-        super(OCIRecipeAddView, self).setUpFields()
+        super().setUpFields()
         self.form_fields += self.createBuildArgsField()
         self.form_fields += self.createEnabledProcessors(
             getUtility(IProcessorSet).getAll(),
@@ -945,7 +944,7 @@ class OCIRecipeAddView(LaunchpadFormView, EnableProcessorsMixin,
         if self.distribution_has_credentials:
             self.form_fields += FormFields(TextLine(
                 __name__='image_name',
-                title=u"Image name",
+                title="Image name",
                 description=(
                     "Name to use for registry upload. "
                     "Defaults to the name of the recipe."),
@@ -976,7 +975,7 @@ class OCIRecipeAddView(LaunchpadFormView, EnableProcessorsMixin,
 
     def setUpWidgets(self):
         """See `LaunchpadFormView`."""
-        super(OCIRecipeAddView, self).setUpWidgets()
+        super().setUpWidgets()
         self.setUpInformationTypeWidget()
         self.widgets["processors"].widget_class = "processors"
         self.setUpGitRefWidget()
@@ -1005,7 +1004,7 @@ class OCIRecipeAddView(LaunchpadFormView, EnableProcessorsMixin,
 
     def validate(self, data):
         """See `LaunchpadFormView`."""
-        super(OCIRecipeAddView, self).validate(data)
+        super().validate(data)
         owner = data.get("owner", None)
         name = data.get("name", None)
         if owner and name:
@@ -1137,7 +1136,7 @@ class OCIRecipeEditView(BaseOCIRecipeEditView, EnableProcessorsMixin,
 
     def setUpWidgets(self):
         """See `LaunchpadFormView`."""
-        super(OCIRecipeEditView, self).setUpWidgets()
+        super().setUpWidgets()
         self.setUpInformationTypeWidget()
         self.setUpGitRefWidget()
         # disable the official recipe button if the user doesn't have
@@ -1148,7 +1147,7 @@ class OCIRecipeEditView(BaseOCIRecipeEditView, EnableProcessorsMixin,
 
     def setUpFields(self):
         """See `LaunchpadFormView`."""
-        super(OCIRecipeEditView, self).setUpFields()
+        super().setUpFields()
         self.form_fields += self.createBuildArgsField()
         self.form_fields += self.createEnabledProcessors(
             self.context.available_processors,
@@ -1168,7 +1167,7 @@ class OCIRecipeEditView(BaseOCIRecipeEditView, EnableProcessorsMixin,
         if self.distribution_has_credentials:
             self.form_fields += FormFields(TextLine(
                 __name__='image_name',
-                title=u"Image name",
+                title="Image name",
                 description=(
                     "Name to use for registry upload. "
                     "Defaults to the name of the recipe."),
@@ -1177,7 +1176,7 @@ class OCIRecipeEditView(BaseOCIRecipeEditView, EnableProcessorsMixin,
 
     def validate(self, data):
         """See `LaunchpadFormView`."""
-        super(OCIRecipeEditView, self).validate(data)
+        super().validate(data)
         # XXX cjwatson 2020-02-18: We should permit and check moving recipes
         # between OCI projects too.
         owner = data.get("owner", None)
diff --git a/lib/lp/oci/browser/ocirecipebuild.py b/lib/lp/oci/browser/ocirecipebuild.py
index bdc63ad..9f1d55e 100644
--- a/lib/lp/oci/browser/ocirecipebuild.py
+++ b/lib/lp/oci/browser/ocirecipebuild.py
@@ -166,7 +166,7 @@ class OCIRecipeBuildRescoreView(LaunchpadFormView):
 
     def __call__(self):
         if self.context.can_be_rescored:
-            return super(OCIRecipeBuildRescoreView, 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/oci/browser/ocirecipesubscription.py b/lib/lp/oci/browser/ocirecipesubscription.py
index 4edf12e..c4f016f 100644
--- a/lib/lp/oci/browser/ocirecipesubscription.py
+++ b/lib/lp/oci/browser/ocirecipesubscription.py
@@ -94,7 +94,7 @@ class OCIRecipeSubscriptionEditView(RedirectToOCIRecipeMixin,
     def initialize(self):
         self.ocirecipe = self.context.recipe
         self.person = self.context.person
-        super(OCIRecipeSubscriptionEditView, self).initialize()
+        super().initialize()
 
     @action("Unsubscribe", name="unsubscribe")
     def unsubscribe_action(self, action, data):
@@ -114,7 +114,7 @@ class _OCIRecipeSubscriptionCreationView(RedirectToOCIRecipeMixin,
 
     def initialize(self):
         self.ocirecipe = self.context
-        super(_OCIRecipeSubscriptionCreationView, self).initialize()
+        super().initialize()
 
 
 class OCIRecipeSubscriptionAddView(_OCIRecipeSubscriptionCreationView):
diff --git a/lib/lp/oci/browser/tests/test_ocirecipe.py b/lib/lp/oci/browser/tests/test_ocirecipe.py
index 0479b15..9b17ee7 100644
--- a/lib/lp/oci/browser/tests/test_ocirecipe.py
+++ b/lib/lp/oci/browser/tests/test_ocirecipe.py
@@ -101,7 +101,7 @@ class TestOCIRecipeNavigation(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestOCIRecipeNavigation, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture({OCI_RECIPE_ALLOW_CREATE: 'on'}))
 
     def test_canonical_url(self):
@@ -144,7 +144,7 @@ class BaseTestOCIRecipeView(BrowserTestCase):
     layer = LaunchpadFunctionalLayer
 
     def setUp(self):
-        super(BaseTestOCIRecipeView, self).setUp()
+        super().setUp()
         self.useFixture(FakeLogger())
         self.person = self.factory.makePerson(
             name="test-person", displayname="Test Person")
@@ -153,7 +153,7 @@ class BaseTestOCIRecipeView(BrowserTestCase):
 class TestOCIRecipeAddView(OCIConfigHelperMixin, BaseTestOCIRecipeView):
 
     def setUp(self):
-        super(TestOCIRecipeAddView, self).setUp()
+        super().setUp()
         self.distroseries = self.factory.makeDistroSeries()
         self.distribution = self.distroseries.distribution
         self.useFixture(FeatureFixture({
@@ -539,7 +539,7 @@ class TestOCIRecipeAddView(OCIConfigHelperMixin, BaseTestOCIRecipeView):
 class TestOCIRecipeAdminView(BaseTestOCIRecipeView):
 
     def setUp(self):
-        super(TestOCIRecipeAdminView, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture({OCI_RECIPE_ALLOW_CREATE: 'on'}))
 
     def test_unauthorized(self):
@@ -594,7 +594,7 @@ class TestOCIRecipeAdminView(BaseTestOCIRecipeView):
 class TestOCIRecipeEditView(OCIConfigHelperMixin, BaseTestOCIRecipeView):
 
     def setUp(self):
-        super(TestOCIRecipeEditView, self).setUp()
+        super().setUp()
         self.distroseries = self.factory.makeDistroSeries()
         self.distribution = self.distroseries.distribution
         self.useFixture(FeatureFixture({
@@ -1140,7 +1140,7 @@ class TestOCIRecipeEditView(OCIConfigHelperMixin, BaseTestOCIRecipeView):
 class TestOCIRecipeDeleteView(BaseTestOCIRecipeView):
 
     def setUp(self):
-        super(TestOCIRecipeDeleteView, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture({OCI_RECIPE_ALLOW_CREATE: 'on'}))
 
     def test_unauthorized(self):
@@ -1208,7 +1208,7 @@ class TestOCIRecipeDeleteView(BaseTestOCIRecipeView):
 class TestOCIRecipeView(BaseTestOCIRecipeView):
 
     def setUp(self):
-        super(TestOCIRecipeView, self).setUp()
+        super().setUp()
         self.distroseries = self.factory.makeDistroSeries()
         processor = getUtility(IProcessorSet).getByName("386")
         self.distroarchseries = self.factory.makeDistroArchSeries(
@@ -1721,7 +1721,7 @@ class TestOCIRecipeView(BaseTestOCIRecipeView):
 class TestOCIRecipeRequestBuildsView(BaseTestOCIRecipeView):
 
     def setUp(self):
-        super(TestOCIRecipeRequestBuildsView, self).setUp()
+        super().setUp()
         self.ubuntu = getUtility(ILaunchpadCelebrities).ubuntu
         self.distroseries = self.factory.makeDistroSeries(
             distribution=self.ubuntu, name="shiny", displayname="Shiny")
@@ -1802,7 +1802,7 @@ class TestOCIRecipeRequestBuildsView(BaseTestOCIRecipeView):
 class TestOCIRecipeEditPushRulesView(OCIConfigHelperMixin,
                                      BaseTestOCIRecipeView):
     def setUp(self):
-        super(TestOCIRecipeEditPushRulesView, self).setUp()
+        super().setUp()
         self.ubuntu = getUtility(ILaunchpadCelebrities).ubuntu
         self.distroseries = self.factory.makeDistroSeries(
             distribution=self.ubuntu, name="shiny", displayname="Shiny")
@@ -2232,7 +2232,7 @@ class TestOCIRecipeEditPushRulesView(OCIConfigHelperMixin,
         self.assertEqual(len(rules), 1)
         rule = rules[0]
         self.assertThat(rule, MatchesStructure(
-            image_name=Equals(u'imagename1'),
+            image_name=Equals('imagename1'),
             registry_url=Equals(url),
             registry_credentials=MatchesStructure(
                 url=Equals(url),
@@ -2325,7 +2325,7 @@ class TestOCIRecipeEditPushRulesView(OCIConfigHelperMixin,
 
 class TestOCIRecipeListingView(BaseTestOCIRecipeView):
     def setUp(self):
-        super(TestOCIRecipeListingView, 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/oci/browser/tests/test_ocirecipebuild.py b/lib/lp/oci/browser/tests/test_ocirecipebuild.py
index 7fa823e..2466f85 100644
--- a/lib/lp/oci/browser/tests/test_ocirecipebuild.py
+++ b/lib/lp/oci/browser/tests/test_ocirecipebuild.py
@@ -46,7 +46,7 @@ class TestCanonicalUrlForOCIRecipeBuild(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestCanonicalUrlForOCIRecipeBuild, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture({OCI_RECIPE_ALLOW_CREATE: 'on'}))
 
     def test_canonical_url(self):
@@ -70,7 +70,7 @@ class TestOCIRecipeBuildView(BrowserTestCase):
     layer = LaunchpadFunctionalLayer
 
     def setUp(self):
-        super(TestOCIRecipeBuildView, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture({OCI_RECIPE_ALLOW_CREATE: 'on'}))
 
     def test_index(self):
@@ -157,7 +157,7 @@ class TestOCIRecipeBuildOperations(BrowserTestCase):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestOCIRecipeBuildOperations, self).setUp()
+        super().setUp()
         self.useFixture(FakeLogger())
         self.useFixture(FeatureFixture({OCI_RECIPE_ALLOW_CREATE: 'on'}))
         self.build = self.factory.makeOCIRecipeBuild()
diff --git a/lib/lp/oci/browser/tests/test_ocirecipesubscription.py b/lib/lp/oci/browser/tests/test_ocirecipesubscription.py
index 41b76b9..fbd60d6 100644
--- a/lib/lp/oci/browser/tests/test_ocirecipesubscription.py
+++ b/lib/lp/oci/browser/tests/test_ocirecipesubscription.py
@@ -29,7 +29,7 @@ class BaseTestOCIRecipeView(OCIConfigHelperMixin, BrowserTestCase):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(BaseTestOCIRecipeView, self).setUp()
+        super().setUp()
         self.setConfig()
         self.useFixture(FakeLogger())
         self.person = self.factory.makePerson(name='recipe-owner')
diff --git a/lib/lp/oci/interfaces/ocipushrule.py b/lib/lp/oci/interfaces/ocipushrule.py
index 5619875..9c800fa 100644
--- a/lib/lp/oci/interfaces/ocipushrule.py
+++ b/lib/lp/oci/interfaces/ocipushrule.py
@@ -40,7 +40,7 @@ class OCIPushRuleAlreadyExists(Exception):
     """
 
     def __init__(self):
-        super(OCIPushRuleAlreadyExists, self).__init__(
+        super().__init__(
             "A push rule already exists with the same URL, image name, "
             "and credentials")
 
diff --git a/lib/lp/oci/interfaces/ocirecipe.py b/lib/lp/oci/interfaces/ocirecipe.py
index 47fffe7..2a7256c 100644
--- a/lib/lp/oci/interfaces/ocirecipe.py
+++ b/lib/lp/oci/interfaces/ocirecipe.py
@@ -94,7 +94,7 @@ class OCIRecipeFeatureDisabled(Unauthorized):
     """Only certain users can create new OCI recipes."""
 
     def __init__(self):
-        super(OCIRecipeFeatureDisabled, self).__init__(
+        super().__init__(
             "You do not have permission to create new OCI recipes.")
 
 
@@ -108,7 +108,7 @@ class OCIRecipeBuildAlreadyPending(Exception):
     """A build was requested when an identical build was already pending."""
 
     def __init__(self):
-        super(OCIRecipeBuildAlreadyPending, self).__init__(
+        super().__init__(
             "An identical build of this OCI recipe is already pending.")
 
 
@@ -127,7 +127,7 @@ class UsingDistributionCredentials(Exception):
     """The OCI Recipe is in a Distribution that has credentials set."""
 
     def __init__(self):
-        super(UsingDistributionCredentials, self).__init__(
+        super().__init__(
             "The OCI recipe is in a distribution that has credentials set.")
 
 
@@ -136,7 +136,7 @@ class NoSourceForOCIRecipe(Exception):
     """OCI Recipes must have a source and build file."""
 
     def __init__(self):
-        super(NoSourceForOCIRecipe, self).__init__(
+        super().__init__(
             "New OCI recipes must have a git branch and build file.")
 
 
@@ -149,8 +149,7 @@ class CannotModifyOCIRecipeProcessor(Exception):
         'by administrators.')
 
     def __init__(self, processor):
-        super(CannotModifyOCIRecipeProcessor, self).__init__(
-            self._fmt % {'processor': processor.name})
+        super().__init__(self._fmt % {'processor': processor.name})
 
 
 @error_status(http.client.BAD_REQUEST)
@@ -158,7 +157,7 @@ class OCIRecipePrivacyMismatch(Exception):
     """OCI recipe privacy does not match its content."""
 
     def __init__(self, message=None):
-        super(OCIRecipePrivacyMismatch, self).__init__(
+        super().__init__(
             message or
             "OCI recipe contains private information and cannot be public.")
 
@@ -168,7 +167,7 @@ class OCIRecipeBranchHasInvalidFormat(Exception):
     """The branch name for the OCI recipe does not match the correct format."""
 
     def __init__(self):
-        super(OCIRecipeBranchHasInvalidFormat, self).__init__(
+        super().__init__(
             "The branch name for the OCI recipe does not "
             "match the APPVERSION-UBUNTUVERSION format (ex. v1.0-20.04)")
 
diff --git a/lib/lp/oci/interfaces/ociregistryclient.py b/lib/lp/oci/interfaces/ociregistryclient.py
index 323137d..e149a28 100644
--- a/lib/lp/oci/interfaces/ociregistryclient.py
+++ b/lib/lp/oci/interfaces/ociregistryclient.py
@@ -18,7 +18,7 @@ class OCIRegistryError(Exception):
     """An error returned by an OCI registry."""
 
     def __init__(self, summary, errors):
-        super(OCIRegistryError, self).__init__(summary)
+        super().__init__(summary)
         self.errors = errors
 
 
diff --git a/lib/lp/oci/interfaces/ociregistrycredentials.py b/lib/lp/oci/interfaces/ociregistrycredentials.py
index 16af53e..a10400c 100644
--- a/lib/lp/oci/interfaces/ociregistrycredentials.py
+++ b/lib/lp/oci/interfaces/ociregistrycredentials.py
@@ -39,7 +39,7 @@ class OCIRegistryCredentialsAlreadyExist(Exception):
     """
 
     def __init__(self):
-        super(OCIRegistryCredentialsAlreadyExist, self).__init__(
+        super().__init__(
             "Credentials already exist with the same URL, username, and "
             "region.")
 
diff --git a/lib/lp/oci/model/ocirecipe.py b/lib/lp/oci/model/ocirecipe.py
index 274092d..73edd1a 100644
--- a/lib/lp/oci/model/ocirecipe.py
+++ b/lib/lp/oci/model/ocirecipe.py
@@ -16,7 +16,6 @@ __all__ = [
 
 from lazr.lifecycle.event import ObjectCreatedEvent
 import pytz
-import six
 from storm.databases.postgres import JSON
 from storm.expr import (
     And,
@@ -246,7 +245,7 @@ class OCIRecipe(Storm, WebhookTargetMixin):
                  image_name=None, information_type=InformationType.PUBLIC):
         if not getFeatureFlag(OCI_RECIPE_ALLOW_CREATE):
             raise OCIRecipeFeatureDisabled()
-        super(OCIRecipe, self).__init__()
+        super().__init__()
         self._information_type = information_type
         self.oci_project = oci_project
         self.name = name
@@ -311,8 +310,7 @@ class OCIRecipe(Storm, WebhookTargetMixin):
     @build_args.setter
     def build_args(self, value):
         assert value is None or isinstance(value, dict)
-        self._build_args = {k: six.text_type(v)
-                            for k, v in (value or {}).items()}
+        self._build_args = {k: str(v) for k, v in (value or {}).items()}
 
     def _reconcileAccess(self):
         """Reconcile the OCI recipe's sharing information.
diff --git a/lib/lp/oci/model/ocirecipebuild.py b/lib/lp/oci/model/ocirecipebuild.py
index 0172697..fc4e3e2 100644
--- a/lib/lp/oci/model/ocirecipebuild.py
+++ b/lib/lp/oci/model/ocirecipebuild.py
@@ -104,7 +104,7 @@ class OCIFile(StormBase):
 
     def __init__(self, build, library_file, layer_file_digest=None):
         """Construct a `OCIFile`."""
-        super(OCIFile, self).__init__()
+        super().__init__()
         self.build = build
         self.library_file = library_file
         self.layer_file_digest = layer_file_digest
@@ -409,7 +409,7 @@ class OCIRecipeBuild(PackageBuildMixin, StormBase):
         """See `IBuildFarmJob`."""
         edited_fields = set()
         with notify_modified(self, edited_fields) as previous_obj:
-            super(OCIRecipeBuild, 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/oci/model/ocirecipebuildbehaviour.py b/lib/lp/oci/model/ocirecipebuildbehaviour.py
index 46c8569..0532204 100644
--- a/lib/lp/oci/model/ocirecipebuildbehaviour.py
+++ b/lib/lp/oci/model/ocirecipebuildbehaviour.py
@@ -126,8 +126,7 @@ class OCIRecipeBuildBehaviour(BuilderProxyMixin, BuildFarmJobBehaviourBase):
         Return the extra arguments required by the slave for the given build.
         """
         build = self.build
-        args = yield super(OCIRecipeBuildBehaviour, self).extraBuildArgs(
-            logger=logger)
+        args = yield super().extraBuildArgs(logger=logger)
         yield self.addProxyArgs(args, build.recipe.allow_internet)
         # XXX twom 2020-02-17 This may need to be more complex, and involve
         # distribution name.
@@ -186,7 +185,7 @@ class OCIRecipeBuildBehaviour(BuilderProxyMixin, BuildFarmJobBehaviourBase):
         self._ensureFilePath(name, file_path, upload_path)
         yield self._slave.getFile(file_hash, file_path)
 
-        with open(file_path, 'r') as file_fp:
+        with open(file_path) as file_fp:
             return json.load(file_fp)
 
     def _extractLayerFiles(self, upload_path, section, config, digests, files):
diff --git a/lib/lp/oci/model/ocirecipebuildjob.py b/lib/lp/oci/model/ocirecipebuildjob.py
index 1d3143b..4d7f098 100644
--- a/lib/lp/oci/model/ocirecipebuildjob.py
+++ b/lib/lp/oci/model/ocirecipebuildjob.py
@@ -95,7 +95,7 @@ class OCIRecipeBuildJob(StormBase):
         :param json_data: The type-specific variables, as a JSON-compatible
             dict.
         """
-        super(OCIRecipeBuildJob, self).__init__()
+        super().__init__()
         self.job = Job(**job_args)
         self.build = build
         self.job_type = job_type
@@ -156,7 +156,7 @@ class OCIRecipeBuildJobDerived(BaseRunnableJob, metaclass=EnumeratedSubclass):
 
     def getOopsVars(self):
         """See `IRunnableJob`."""
-        oops_vars = super(OCIRecipeBuildJobDerived, self).getOopsVars()
+        oops_vars = super().getOopsVars()
         oops_vars.extend([
             ('job_type', self.context.job_type.title),
             ('build_id', self.context.build.id),
@@ -232,7 +232,7 @@ class OCIRegistryUploadJob(OCIRecipeBuildJobDerived):
                       *args, **kwargs):
         edited_fields = set()
         with notify_modified(self.build, edited_fields) as before_modification:
-            getattr(super(OCIRegistryUploadJob, self), method_name)(
+            getattr(super(), method_name)(
                 *args, manage_transaction=manage_transaction, **kwargs)
             upload_status = self.build.registry_upload_status
             if upload_status != before_modification.registry_upload_status:
diff --git a/lib/lp/oci/model/ocirecipejob.py b/lib/lp/oci/model/ocirecipejob.py
index 33f3429..4ba7d5e 100644
--- a/lib/lp/oci/model/ocirecipejob.py
+++ b/lib/lp/oci/model/ocirecipejob.py
@@ -96,7 +96,7 @@ class OCIRecipeJob(StormBase):
         :param metadata: The type-specific variables, as a JSON-compatible
             dict.
         """
-        super(OCIRecipeJob, self).__init__()
+        super().__init__()
         self.job = Job(**job_args)
         self.recipe = recipe
         self.job_type = job_type
@@ -145,7 +145,7 @@ class OCIRecipeJobDerived(BaseRunnableJob, metaclass=EnumeratedSubclass):
 
     def getOopsVars(self):
         """See `IRunnableJob`."""
-        oops_vars = super(OCIRecipeJobDerived, 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/oci/model/ocirecipesubscription.py b/lib/lp/oci/model/ocirecipesubscription.py
index 970c66c..4de765e 100644
--- a/lib/lp/oci/model/ocirecipesubscription.py
+++ b/lib/lp/oci/model/ocirecipesubscription.py
@@ -44,7 +44,7 @@ class OCIRecipeSubscription(StormBase):
     subscribed_by = Reference(subscribed_by_id, "Person.id")
 
     def __init__(self, recipe, person, subscribed_by):
-        super(OCIRecipeSubscription, self).__init__()
+        super().__init__()
         self.recipe = recipe
         self.person = person
         self.subscribed_by = subscribed_by
diff --git a/lib/lp/oci/model/ociregistryclient.py b/lib/lp/oci/model/ociregistryclient.py
index 198a4b2..30a99ad 100644
--- a/lib/lp/oci/model/ociregistryclient.py
+++ b/lib/lp/oci/model/ociregistryclient.py
@@ -617,7 +617,7 @@ class OCIRegistryClient:
 
 class OCIRegistryAuthenticationError(Exception):
     def __init__(self, msg, http_error=None):
-        super(OCIRegistryAuthenticationError, self).__init__(msg)
+        super().__init__(msg)
         self.http_error = http_error
 
 
@@ -696,7 +696,7 @@ class BearerTokenRegistryClient(RegistryHTTPClient):
     """
 
     def __init__(self, push_rule):
-        super(BearerTokenRegistryClient, self).__init__(push_rule)
+        super().__init__(push_rule)
         self.auth_token = None
 
     def parseAuthInstructions(self, request):
@@ -721,7 +721,7 @@ class BearerTokenRegistryClient(RegistryHTTPClient):
                 "Auth instructions didn't include realm to get the token: %s"
                 % values)
         # We should use the basic auth version for this request.
-        response = super(BearerTokenRegistryClient, self).request(
+        response = super().request(
             url, params=values, method="GET", auth=self.credentials)
         response.raise_for_status()
         response_data = response.json()
diff --git a/lib/lp/oci/tests/helpers.py b/lib/lp/oci/tests/helpers.py
index c3b7b4b..336b078 100644
--- a/lib/lp/oci/tests/helpers.py
+++ b/lib/lp/oci/tests/helpers.py
@@ -49,7 +49,7 @@ class MatchesOCIRegistryCredentials(MatchesAll):
     """
 
     def __init__(self, main_matcher, credentials_matcher):
-        super(MatchesOCIRegistryCredentials, self).__init__(
+        super().__init__(
             main_matcher,
             AfterPreprocessing(
                 lambda matchee: removeSecurityProxy(matchee).getCredentials(),
diff --git a/lib/lp/oci/tests/test_ocipushrule.py b/lib/lp/oci/tests/test_ocipushrule.py
index 52fee49..043c6b9 100644
--- a/lib/lp/oci/tests/test_ocipushrule.py
+++ b/lib/lp/oci/tests/test_ocipushrule.py
@@ -27,7 +27,7 @@ class TestOCIPushRule(OCIConfigHelperMixin, TestCaseWithFactory):
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestOCIPushRule, self).setUp()
+        super().setUp()
         self.setConfig()
 
     def test_implements_interface(self):
@@ -75,7 +75,7 @@ class TestOCIPushRuleSet(OCIConfigHelperMixin, TestCaseWithFactory):
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestOCIPushRuleSet, self).setUp()
+        super().setUp()
         self.setConfig()
 
     def test_implements_interface(self):
diff --git a/lib/lp/oci/tests/test_ocirecipe.py b/lib/lp/oci/tests/test_ocirecipe.py
index 6bab89e..b3b4475 100644
--- a/lib/lp/oci/tests/test_ocirecipe.py
+++ b/lib/lp/oci/tests/test_ocirecipe.py
@@ -7,8 +7,6 @@ from datetime import datetime
 import json
 
 from fixtures import FakeLogger
-import six
-from six import string_types
 from storm.exceptions import LostObjectError
 from storm.store import Store
 from testtools import ExpectedException
@@ -113,7 +111,7 @@ class TestOCIRecipe(OCIConfigHelperMixin, TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestOCIRecipe, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture({OCI_RECIPE_ALLOW_CREATE: 'on'}))
 
     def test_implements_interface(self):
@@ -759,7 +757,7 @@ class TestOCIRecipe(OCIConfigHelperMixin, TestCaseWithFactory):
         # It should be sorted by owner's name first, then recipe name.
         self.assertEqual(
             [recipe3, recipe1, recipe2],
-            list(oci_project.searchRecipes(u"a")))
+            list(oci_project.searchRecipes("a")))
 
     def test_build_args_dict(self):
         args = {"MY_VERSION": "1.0.3", "ANOTHER_VERSION": "2.9.88"}
@@ -784,7 +782,7 @@ class TestOCIRecipe(OCIConfigHelperMixin, TestCaseWithFactory):
         # Makes sure we only store one level of key=pair, flattening to
         # string every value.
         args = {
-            "VAR1": {six.ensure_str("something"): [1, 2, 3]},
+            "VAR1": {"something": [1, 2, 3]},
             "VAR2": 123,
             "VAR3": "A string",
         }
@@ -873,7 +871,7 @@ class TestOCIRecipeAccessControl(TestCaseWithFactory, OCIConfigHelperMixin):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestOCIRecipeAccessControl, self).setUp()
+        super().setUp()
         self.setConfig()
 
     def test_change_oci_project_pillar_reconciles_access(self):
@@ -1042,8 +1040,7 @@ class TestOCIRecipeProcessors(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestOCIRecipeProcessors, self).setUp(
-            user="foo.bar@xxxxxxxxxxxxx")
+        super().setUp(user="foo.bar@xxxxxxxxxxxxx")
         self.default_procs = [
             getUtility(IProcessorSet).getByName("386"),
             getUtility(IProcessorSet).getByName("amd64")]
@@ -1192,7 +1189,7 @@ class TestOCIRecipeSet(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestOCIRecipeSet, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture({OCI_RECIPE_ALLOW_CREATE: 'on'}))
 
     def test_implements_interface(self):
@@ -1373,7 +1370,7 @@ class TestOCIRecipeWebservice(OCIConfigHelperMixin, TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestOCIRecipeWebservice, self).setUp()
+        super().setUp()
         self.person = self.factory.makePerson(
             displayname="Test Person")
         self.webservice = webservice_for_person(
@@ -1384,7 +1381,7 @@ class TestOCIRecipeWebservice(OCIConfigHelperMixin, TestCaseWithFactory):
     def getAbsoluteURL(self, target):
         """Get the webservice absolute URL of the given object or relative
         path."""
-        if not isinstance(target, string_types):
+        if not isinstance(target, str):
             target = api_url(target)
         return self.webservice.getAbsoluteUrl(target)
 
@@ -1688,7 +1685,7 @@ class TestOCIRecipeAsyncWebservice(TestCaseWithFactory):
     layer = LaunchpadFunctionalLayer
 
     def setUp(self):
-        super(TestOCIRecipeAsyncWebservice, self).setUp()
+        super().setUp()
         self.person = self.factory.makePerson(
             displayname="Test Person")
         self.webservice = webservice_for_person(
@@ -1764,8 +1761,8 @@ class TestOCIRecipeAsyncWebservice(TestCaseWithFactory):
                     "recipe_link": Equals(abs_url(oci_recipe)),
                     "requester_link": Equals(abs_url(self.person)),
                     "buildstate": Equals("Needs building"),
-                    "eta": IsInstance(string_types, type(None)),
-                    "date": IsInstance(string_types, type(None)),
+                    "eta": IsInstance(str, type(None)),
+                    "date": IsInstance(str, type(None)),
                     "estimate": IsInstance(bool),
                     "distro_arch_series_link": Equals(abs_url(arch_series)),
                     "registry_upload_status": Equals("Unscheduled"),
diff --git a/lib/lp/oci/tests/test_ocirecipebuild.py b/lib/lp/oci/tests/test_ocirecipebuild.py
index c86169e..1ec8718 100644
--- a/lib/lp/oci/tests/test_ocirecipebuild.py
+++ b/lib/lp/oci/tests/test_ocirecipebuild.py
@@ -11,7 +11,6 @@ from datetime import (
 from fixtures import FakeLogger
 from pymacaroons import Macaroon
 import pytz
-import six
 from six.moves.urllib.request import urlopen
 from testtools.matchers import (
     ContainsDict,
@@ -93,7 +92,7 @@ class TestOCIFileSet(TestCaseWithFactory):
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestOCIFileSet, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture({OCI_RECIPE_ALLOW_CREATE: 'on'}))
 
     def test_implements_interface(self):
@@ -119,7 +118,7 @@ class TestOCIRecipeBuild(OCIConfigHelperMixin, TestCaseWithFactory):
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestOCIRecipeBuild, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture({OCI_RECIPE_ALLOW_CREATE: 'on'}))
         self.build = self.factory.makeOCIRecipeBuild()
 
@@ -160,7 +159,7 @@ class TestOCIRecipeBuild(OCIConfigHelperMixin, TestCaseWithFactory):
 
     def test_getLayerFileByDigest(self):
         files = [self.factory.makeOCIFile(
-                    build=self.build, layer_file_digest=six.text_type(x))
+                    build=self.build, layer_file_digest=str(x))
                  for x in range(3)]
         result, _, _ = self.build.getLayerFileByDigest(
             files[0].layer_file_digest)
@@ -168,7 +167,7 @@ class TestOCIRecipeBuild(OCIConfigHelperMixin, TestCaseWithFactory):
 
     def test_getLayerFileByDigest_missing(self):
         [self.factory.makeOCIFile(
-            build=self.build, layer_file_digest=six.text_type(x))
+            build=self.build, layer_file_digest=str(x))
          for x in range(3)]
         self.assertRaises(
             NotFoundError,
@@ -609,7 +608,7 @@ class TestOCIRecipeBuildSet(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestOCIRecipeBuildSet, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture({OCI_RECIPE_ALLOW_CREATE: 'on'}))
 
     def test_implements_interface(self):
@@ -707,7 +706,7 @@ class TestOCIRecipeBuildWebservice(OCIConfigHelperMixin, TestCaseWithFactory):
     layer = LaunchpadFunctionalLayer
 
     def setUp(self):
-        super(TestOCIRecipeBuildWebservice, self).setUp()
+        super().setUp()
         self.setConfig()
         self.person = self.factory.makePerson()
         self.webservice = webservice_for_person(
@@ -855,7 +854,7 @@ class TestOCIRecipeBuildMacaroonIssuer(
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestOCIRecipeBuildMacaroonIssuer, self).setUp()
+        super().setUp()
         self.setConfig()
         self.pushConfig(
             "launchpad", internal_macaroon_secret_key="some-secret")
diff --git a/lib/lp/oci/tests/test_ocirecipebuildbehaviour.py b/lib/lp/oci/tests/test_ocirecipebuildbehaviour.py
index 5109dfe..0961a2b 100644
--- a/lib/lp/oci/tests/test_ocirecipebuildbehaviour.py
+++ b/lib/lp/oci/tests/test_ocirecipebuildbehaviour.py
@@ -140,7 +140,7 @@ class TestOCIBuildBehaviour(TestCaseWithFactory):
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestOCIBuildBehaviour, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture({OCI_RECIPE_ALLOW_CREATE: 'on'}))
 
     def test_provides_interface(self):
@@ -164,7 +164,7 @@ class TestAsyncOCIRecipeBuildBehaviour(
 
     @defer.inlineCallbacks
     def setUp(self):
-        super(TestAsyncOCIRecipeBuildBehaviour, self).setUp()
+        super().setUp()
         build_username = 'OCIBUILD-1'
         self.token = {'secret': uuid.uuid4().hex,
                       'username': build_username,
@@ -696,7 +696,7 @@ class TestHandleStatusForOCIRecipeBuild(MakeOCIBuildMixin,
         self.slave.valid_files[hash] = path
 
     def setUp(self):
-        super(TestHandleStatusForOCIRecipeBuild, self).setUp()
+        super().setUp()
         self.useFixture(fixtures.FakeLogger())
         self.useFixture(FeatureFixture({OCI_RECIPE_ALLOW_CREATE: 'on'}))
         self.build = self.makeBuild()
@@ -766,7 +766,7 @@ class TestHandleStatusForOCIRecipeBuild(MakeOCIBuildMixin,
             'layer_2.tar.gz': 'layer_2_hash'
         }
         self.factory.makeOCIFile(
-            build=self.build, layer_file_digest=u'digest_1',
+            build=self.build, layer_file_digest='digest_1',
             content=b"retrieved from librarian")
 
     def assertResultCount(self, count, result):
@@ -809,7 +809,7 @@ class TestHandleStatusForOCIRecipeBuild(MakeOCIBuildMixin,
     def test_handleStatus_OK_reuse_from_other_build(self):
         """We should be able to reuse a layer file from a separate build."""
         oci_file = self.factory.makeOCIFile(
-            layer_file_digest=u'digest_2',
+            layer_file_digest='digest_2',
             content=b"layer 2 retrieved from librarian")
 
         now = datetime.now(pytz.UTC)
@@ -971,4 +971,4 @@ class TestGetUploadMethodsForOCIRecipeBuild(
     """IPackageBuild.getUpload-related methods work with OCI recipe builds."""
     def setUp(self):
         self.useFixture(FeatureFixture({OCI_RECIPE_ALLOW_CREATE: 'on'}))
-        super(TestGetUploadMethodsForOCIRecipeBuild, self).setUp()
+        super().setUp()
diff --git a/lib/lp/oci/tests/test_ocirecipebuildjob.py b/lib/lp/oci/tests/test_ocirecipebuildjob.py
index 742b3ec..2bece4a 100644
--- a/lib/lp/oci/tests/test_ocirecipebuildjob.py
+++ b/lib/lp/oci/tests/test_ocirecipebuildjob.py
@@ -99,7 +99,7 @@ class TestOCIRecipeBuildJob(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestOCIRecipeBuildJob, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture({OCI_RECIPE_ALLOW_CREATE: 'on'}))
 
     def test_provides_interface(self):
@@ -130,7 +130,7 @@ class TestOCIRecipeBuildJobDerived(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestOCIRecipeBuildJobDerived, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture({OCI_RECIPE_ALLOW_CREATE: 'on'}))
 
     def test_repr(self):
@@ -151,8 +151,7 @@ class TestOCIRecipeBuildJobDerived(TestCaseWithFactory):
             def __getattribute__(self, item):
                 if item == 'build':
                     raise AttributeError("Somethng is wrong with build")
-                return super(
-                    ErrorOCIRecipeBuildJobDerived, self).__getattribute__(item)
+                return super().__getattribute__(item)
         oci_build = self.factory.makeOCIRecipeBuild()
         job = OCIRecipeBuildJob(
             oci_build, OCIRecipeBuildJobType.REGISTRY_UPLOAD, {})
@@ -204,7 +203,7 @@ class TestOCIRegistryUploadJob(TestCaseWithFactory, MultiArchRecipeMixin,
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestOCIRegistryUploadJob, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture({
             'webhooks.new.enabled': 'true',
             OCI_RECIPE_WEBHOOKS_FEATURE_FLAG: 'on',
@@ -556,7 +555,7 @@ class TestOCIRegistryUploadJobViaCelery(TestCaseWithFactory,
     layer = CelerySlowJobLayer
 
     def setUp(self):
-        super(TestOCIRegistryUploadJobViaCelery, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture({
             'webhooks.new.enabled': 'true',
             OCI_RECIPE_WEBHOOKS_FEATURE_FLAG: 'on',
diff --git a/lib/lp/oci/tests/test_ocirecipejob.py b/lib/lp/oci/tests/test_ocirecipejob.py
index 2a37120..ef0400f 100644
--- a/lib/lp/oci/tests/test_ocirecipejob.py
+++ b/lib/lp/oci/tests/test_ocirecipejob.py
@@ -29,7 +29,7 @@ class TestOCIRecipeRequestBuildsJob(TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestOCIRecipeRequestBuildsJob, self).setUp()
+        super().setUp()
         self.useFixture(FeatureFixture({OCI_RECIPE_ALLOW_CREATE: 'on'}))
 
     def getDistroArchSeries(self, distroseries, proc_name="386",
diff --git a/lib/lp/oci/tests/test_ociregistryclient.py b/lib/lp/oci/tests/test_ociregistryclient.py
index b6e84fc..22e8cfa 100644
--- a/lib/lp/oci/tests/test_ociregistryclient.py
+++ b/lib/lp/oci/tests/test_ociregistryclient.py
@@ -99,7 +99,7 @@ class TestOCIRegistryClient(OCIConfigHelperMixin, SpyProxyCallsMixin,
     retry_count = 0
 
     def setUp(self):
-        super(TestOCIRegistryClient, self).setUp()
+        super().setUp()
         self.setConfig()
         self.setupProxySpy()
         self.manifest = [{
@@ -1174,7 +1174,7 @@ class TestRegistryHTTPClient(OCIConfigHelperMixin, SpyProxyCallsMixin,
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestRegistryHTTPClient, self).setUp()
+        super().setUp()
         self.setConfig()
         self.setupProxySpy()
 
@@ -1314,8 +1314,8 @@ class TestRegistryHTTPClient(OCIConfigHelperMixin, SpyProxyCallsMixin,
                 boto.client.call_args)
             config = boto.client.call_args[-1]['config']
             self.assertEqual({
-                u'http': u'http://proxy.example.com:123',
-                u'https': u'http://proxy.example.com:123'}, config.proxies)
+                'http': 'http://proxy.example.com:123',
+                'https': 'http://proxy.example.com:123'}, config.proxies)
 
     @responses.activate
     def test_aws_malformed_url_region(self):
@@ -1336,7 +1336,7 @@ class TestBearerTokenRegistryClient(OCIConfigHelperMixin,
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestBearerTokenRegistryClient, self).setUp()
+        super().setUp()
         self.setConfig()
         self.setupProxySpy()
 
@@ -1510,7 +1510,7 @@ class TestAWSAuthenticator(OCIConfigHelperMixin, TestCaseWithFactory):
     layer = DatabaseFunctionalLayer
 
     def setUp(self):
-        super(TestAWSAuthenticator, self).setUp()
+        super().setUp()
         self.setConfig()
 
     def test_get_region_from_credential(self):
diff --git a/lib/lp/oci/tests/test_ociregistrycredentials.py b/lib/lp/oci/tests/test_ociregistrycredentials.py
index 1680091..66f51af 100644
--- a/lib/lp/oci/tests/test_ociregistrycredentials.py
+++ b/lib/lp/oci/tests/test_ociregistrycredentials.py
@@ -35,7 +35,7 @@ class TestOCIRegistryCredentials(OCIConfigHelperMixin, TestCaseWithFactory):
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestOCIRegistryCredentials, self).setUp()
+        super().setUp()
         self.setConfig()
 
     def test_implements_interface(self):
@@ -139,7 +139,7 @@ class TestOCIRegistryCredentialsSet(OCIConfigHelperMixin, TestCaseWithFactory):
     layer = LaunchpadZopelessLayer
 
     def setUp(self):
-        super(TestOCIRegistryCredentialsSet, self).setUp()
+        super().setUp()
         self.setConfig()
 
     def test_implements_interface(self):