launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #27549
[Merge] ~cjwatson/launchpad:no-metaclass-type into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:no-metaclass-type into launchpad:master.
Commit message:
Stop declaring "__metaclass__ = type"
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/409526
This is no longer meaningful or necessary on Python 3. Although `lib/devscripts/` still needs to run on Python 2, that doesn't matter since there are no classes there without an explicit inheritance list.
--
The attached diff has been truncated due to its size.
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:no-metaclass-type into launchpad:master.
diff --git a/brzplugins/lpserve/__init__.py b/brzplugins/lpserve/__init__.py
index 39d5cf4..52ce8ac 100644
--- a/brzplugins/lpserve/__init__.py
+++ b/brzplugins/lpserve/__init__.py
@@ -6,8 +6,6 @@
Cribbed from bzrlib.builtins.cmd_serve from Bazaar 0.16.
"""
-__metaclass__ = type
-
__all__ = [
'cmd_launchpad_server',
]
diff --git a/cronscripts/daily_product_jobs.py b/cronscripts/daily_product_jobs.py
index 0c76d5f..726cc72 100755
--- a/cronscripts/daily_product_jobs.py
+++ b/cronscripts/daily_product_jobs.py
@@ -4,8 +4,6 @@
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Request jobs to update products and send emails."""
-__metaclass__ = type
-
import _pythonpath # noqa: F401
import transaction
diff --git a/cronscripts/expire-bugtasks.py b/cronscripts/expire-bugtasks.py
index 3265a42..3f77590 100755
--- a/cronscripts/expire-bugtasks.py
+++ b/cronscripts/expire-bugtasks.py
@@ -9,8 +9,6 @@ Only bug task for project that use Malone may be expired. The expiration
period is configured through config.malone.days_before_expiration.
"""
-__metaclass__ = type
-
import _pythonpath # noqa: F401
from zope.component import getUtility
diff --git a/cronscripts/expire-questions.py b/cronscripts/expire-questions.py
index e87e873..dc710fd 100755
--- a/cronscripts/expire-questions.py
+++ b/cronscripts/expire-questions.py
@@ -10,8 +10,6 @@ The expiration period is configured through
config.answertracker.days_before_expiration
"""
-__metaclass__ = type
-
__all__ = ['ExpireQuestions']
diff --git a/cronscripts/garbo-daily.py b/cronscripts/garbo-daily.py
index 471191e..11cc815 100755
--- a/cronscripts/garbo-daily.py
+++ b/cronscripts/garbo-daily.py
@@ -9,7 +9,6 @@ Remove or archive unwanted data. Detect, warn and possibly repair data
corruption.
"""
-__metaclass__ = type
__all__ = []
import _pythonpath # noqa: F401
diff --git a/cronscripts/garbo-frequently.py b/cronscripts/garbo-frequently.py
index 127aa38..9a2b390 100755
--- a/cronscripts/garbo-frequently.py
+++ b/cronscripts/garbo-frequently.py
@@ -9,7 +9,6 @@ Remove or archive unwanted data. Detect, warn and possibly repair data
corruption.
"""
-__metaclass__ = type
__all__ = []
import _pythonpath # noqa: F401
diff --git a/cronscripts/garbo-hourly.py b/cronscripts/garbo-hourly.py
index 33334ca..9e6cb24 100755
--- a/cronscripts/garbo-hourly.py
+++ b/cronscripts/garbo-hourly.py
@@ -9,7 +9,6 @@ Remove or archive unwanted data. Detect, warn and possibly repair data
corruption.
"""
-__metaclass__ = type
__all__ = []
import _pythonpath # noqa: F401
diff --git a/cronscripts/language-pack-exporter.py b/cronscripts/language-pack-exporter.py
index 50fc0a2..cc383b8 100755
--- a/cronscripts/language-pack-exporter.py
+++ b/cronscripts/language-pack-exporter.py
@@ -5,8 +5,6 @@
"""Script to export a tarball of translations for a distro series."""
-__metaclass__ = type
-
import _pythonpath # noqa: F401
from lp.services.scripts.base import (
diff --git a/cronscripts/librarian-feed-swift.py b/cronscripts/librarian-feed-swift.py
index f2b817a..ae60177 100755
--- a/cronscripts/librarian-feed-swift.py
+++ b/cronscripts/librarian-feed-swift.py
@@ -5,8 +5,6 @@
"""Move files from Librarian disk storage into Swift."""
-__metaclass__ = type
-
import _pythonpath # noqa: F401
import os
diff --git a/cronscripts/librarian-gc.py b/cronscripts/librarian-gc.py
index c767e73..8a07cb2 100755
--- a/cronscripts/librarian-gc.py
+++ b/cronscripts/librarian-gc.py
@@ -10,8 +10,6 @@ remove expired files from the file system and clean up unreachable
rows in the database.
"""
-__metaclass__ = type
-
import _pythonpath # noqa: F401
import logging
diff --git a/cronscripts/parse-librarian-apache-access-logs.py b/cronscripts/parse-librarian-apache-access-logs.py
index a4903fe..06c51c1 100755
--- a/cronscripts/parse-librarian-apache-access-logs.py
+++ b/cronscripts/parse-librarian-apache-access-logs.py
@@ -14,8 +14,6 @@ we may need to add a hack (store._cache.clear()) to clear the cache after
updating the counts of every LFA, in order to get through the backlog.
"""
-__metaclass__ = type
-
import _pythonpath # noqa: F401
from storm.sqlobject import SQLObjectNotFound
diff --git a/cronscripts/parse-ppa-apache-access-logs.py b/cronscripts/parse-ppa-apache-access-logs.py
index b42a9ec..015ce5d 100755
--- a/cronscripts/parse-ppa-apache-access-logs.py
+++ b/cronscripts/parse-ppa-apache-access-logs.py
@@ -5,8 +5,6 @@
"""Parse PPA apache logs to find out download counts for each file."""
-__metaclass__ = type
-
import _pythonpath # noqa: F401
import functools
diff --git a/cronscripts/ppa-generate-keys.py b/cronscripts/ppa-generate-keys.py
index e580cad..6a4d936 100755
--- a/cronscripts/ppa-generate-keys.py
+++ b/cronscripts/ppa-generate-keys.py
@@ -5,8 +5,6 @@
"""A cron script that generate missing PPA signing keys."""
-__metaclass__ = type
-
import _pythonpath # noqa: F401
from lp.services.config import config
diff --git a/cronscripts/process-job-source-groups.py b/cronscripts/process-job-source-groups.py
index 14b7199..4e95fcd 100755
--- a/cronscripts/process-job-source-groups.py
+++ b/cronscripts/process-job-source-groups.py
@@ -5,8 +5,6 @@
"""Handle jobs for multiple job source classes."""
-__metaclass__ = type
-
import _pythonpath # noqa: F401
from optparse import IndentedHelpFormatter
diff --git a/cronscripts/request_daily_builds.py b/cronscripts/request_daily_builds.py
index 8e2b59f..6e7bdb5 100755
--- a/cronscripts/request_daily_builds.py
+++ b/cronscripts/request_daily_builds.py
@@ -5,8 +5,6 @@
"""Request builds for stale daily build recipes and snap packages."""
-__metaclass__ = type
-
import _pythonpath # noqa: F401
import transaction
diff --git a/cronscripts/send-bug-notifications.py b/cronscripts/send-bug-notifications.py
index 0a3fcbf..f5c2400 100755
--- a/cronscripts/send-bug-notifications.py
+++ b/cronscripts/send-bug-notifications.py
@@ -9,8 +9,6 @@ This script sends out all the pending bug notifications, and sets
date_emailed to the current date.
"""
-__metaclass__ = type
-
import _pythonpath # noqa: F401
from lp.bugs.scripts.bugnotification import SendBugNotifications
diff --git a/cronscripts/send-person-notifications.py b/cronscripts/send-person-notifications.py
index 0eb4989..febb99c 100755
--- a/cronscripts/send-person-notifications.py
+++ b/cronscripts/send-person-notifications.py
@@ -9,8 +9,6 @@ This script sends out all the pending person notifications, and sets
date_emailed to the current date.
"""
-__metaclass__ = type
-
import _pythonpath # noqa: F401
from lp.registry.scripts.personnotification import PersonNotificationManager
diff --git a/cronscripts/translations-export-to-branch.py b/cronscripts/translations-export-to-branch.py
index 520ced7..308c693 100755
--- a/cronscripts/translations-export-to-branch.py
+++ b/cronscripts/translations-export-to-branch.py
@@ -13,7 +13,6 @@ database, to let the branch scanner know that the branches' contents
have been updated. For the rest, the script talks to the slave store.
"""
-__metaclass__ = type
__all__ = []
import _pythonpath # noqa: F401
diff --git a/cronscripts/update-cve.py b/cronscripts/update-cve.py
index 81ac275..91e3cf7 100755
--- a/cronscripts/update-cve.py
+++ b/cronscripts/update-cve.py
@@ -6,8 +6,6 @@
"""A cron script that fetches the latest database of CVE details and ensures
that all of the known CVE's are fully registered in Launchpad."""
-__metaclass__ = type
-
import _pythonpath # noqa: F401
from lp.bugs.scripts.cveimport import CVEUpdater
diff --git a/cronscripts/update-database-stats.py b/cronscripts/update-database-stats.py
index e47ff9a..b0cce1e 100755
--- a/cronscripts/update-database-stats.py
+++ b/cronscripts/update-database-stats.py
@@ -4,8 +4,6 @@
"""Populate the DatabaseTableStats and DatabaseCpuStats tables."""
-__metaclass__ = type
-
import _pythonpath # noqa: F401
from lp.registry.model.person import Person
diff --git a/cronscripts/update-standing.py b/cronscripts/update-standing.py
index 3720121..bc91e46 100755
--- a/cronscripts/update-standing.py
+++ b/cronscripts/update-standing.py
@@ -5,7 +5,6 @@
"""A cron script for updating personal standings."""
-__metaclass__ = type
__all__ = []
diff --git a/database/replication/helpers.py b/database/replication/helpers.py
index 8096075..5fc4caf 100644
--- a/database/replication/helpers.py
+++ b/database/replication/helpers.py
@@ -3,7 +3,6 @@
"""Common helpers for replication scripts."""
-__metaclass__ = type
__all__ = []
import subprocess
diff --git a/database/replication/preamble.py b/database/replication/preamble.py
index 095386f..b6492d4 100755
--- a/database/replication/preamble.py
+++ b/database/replication/preamble.py
@@ -6,7 +6,6 @@
"""Generate a preamble for slonik(1) scripts based on the current LPCONFIG.
"""
-__metaclass__ = type
__all__ = []
import _pythonpath # noqa: F401
diff --git a/database/replication/sync.py b/database/replication/sync.py
index 1f7c117..f74c538 100755
--- a/database/replication/sync.py
+++ b/database/replication/sync.py
@@ -5,7 +5,6 @@
"""Block until the replication cluster synchronizes."""
-__metaclass__ = type
__all__ = []
import _pythonpath # noqa: F401
diff --git a/database/replication/walblock.py b/database/replication/walblock.py
index 8cbf8ad..bcf48c4 100755
--- a/database/replication/walblock.py
+++ b/database/replication/walblock.py
@@ -5,7 +5,6 @@
"""Feed stdin to stdout, blocking if there are too many unshipped WAL files."""
-__metaclass__ = type
__all__ = []
from glob import glob
diff --git a/database/schema/dbcontroller.py b/database/schema/dbcontroller.py
index fe0b2b2..79edf50 100644
--- a/database/schema/dbcontroller.py
+++ b/database/schema/dbcontroller.py
@@ -3,7 +3,6 @@
"""Connect to and control our pgbouncer instance."""
-__metaclass__ = type
__all__ = ['DBController', 'streaming_sync']
import time
diff --git a/database/schema/emptytables.py b/database/schema/emptytables.py
index 83366b6..46fd25f 100755
--- a/database/schema/emptytables.py
+++ b/database/schema/emptytables.py
@@ -5,8 +5,6 @@
"""List empty database tables."""
-__metaclass__ = type
-
import _pythonpath # noqa: F401
from optparse import OptionParser
diff --git a/database/schema/fti.py b/database/schema/fti.py
index 6e9c66c..44c0d16 100755
--- a/database/schema/fti.py
+++ b/database/schema/fti.py
@@ -8,8 +8,6 @@
Add full text indexes to the launchpad database
"""
-__metaclass__ = type
-
import _pythonpath # noqa: F401
from optparse import OptionParser
diff --git a/database/schema/online_fti_updater.py b/database/schema/online_fti_updater.py
index 9e0c8f8..075ceff 100755
--- a/database/schema/online_fti_updater.py
+++ b/database/schema/online_fti_updater.py
@@ -8,8 +8,6 @@ Rebuild the full text indexes in a more friendly fashion, enabling this to
be done without downtime.
"""
-__metaclass__ = type
-
import _pythonpath # noqa: F401
import psycopg
diff --git a/database/schema/reset_sequences.py b/database/schema/reset_sequences.py
index 9e3aeec..52a0f3e 100755
--- a/database/schema/reset_sequences.py
+++ b/database/schema/reset_sequences.py
@@ -12,8 +12,6 @@ This script resets all of these sequences to the correct value based on the
maximum value currently found in the corresponding table.
"""
-__metaclass__ = type
-
import _pythonpath # noqa: F401
from optparse import OptionParser
diff --git a/database/schema/security.py b/database/schema/security.py
index 0c26e0e..d1b9753 100755
--- a/database/schema/security.py
+++ b/database/schema/security.py
@@ -3,8 +3,6 @@
# Copyright 2009-2010 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
import _pythonpath # noqa: F401
from collections import defaultdict
diff --git a/database/schema/sort_sql.py b/database/schema/sort_sql.py
index 900143c..de33fc4 100755
--- a/database/schema/sort_sql.py
+++ b/database/schema/sort_sql.py
@@ -24,8 +24,6 @@ groups of statements separated by empty lines. This works because the dumps
happen by table, with one block of statements for each table.
"""
-__metaclass__ = type
-
import _pythonpath # noqa: F401
import sys
diff --git a/database/schema/unautovacuumable.py b/database/schema/unautovacuumable.py
index a8856b8..e92593e 100755
--- a/database/schema/unautovacuumable.py
+++ b/database/schema/unautovacuumable.py
@@ -13,7 +13,6 @@ disabled, autovacuum processes sometimes run and break our scripts.
Don't run this on any production systems.
"""
-__metaclass__ = type
__all__ = []
import _pythonpath # noqa: F401
diff --git a/database/schema/upgrade.py b/database/schema/upgrade.py
index 3ecba33..64b3f01 100755
--- a/database/schema/upgrade.py
+++ b/database/schema/upgrade.py
@@ -7,8 +7,6 @@
Apply all outstanding schema patches to an existing launchpad database
"""
-__metaclass__ = type
-
import _pythonpath # noqa: F401
import glob
diff --git a/lib/devscripts/sourcecode.py b/lib/devscripts/sourcecode.py
index dcd0c26..2fa821e 100644
--- a/lib/devscripts/sourcecode.py
+++ b/lib/devscripts/sourcecode.py
@@ -9,7 +9,6 @@ from __future__ import (
)
-__metaclass__ = type
__all__ = [
'interpret_config',
'parse_config_file',
diff --git a/lib/devscripts/tests/test_sourcecode.py b/lib/devscripts/tests/test_sourcecode.py
index 368ea0d..e3abbf2 100644
--- a/lib/devscripts/tests/test_sourcecode.py
+++ b/lib/devscripts/tests/test_sourcecode.py
@@ -8,9 +8,6 @@ from __future__ import (
print_function,
)
-
-__metaclass__ = type
-
import os
import shutil
import tempfile
diff --git a/lib/launchpad_loggerhead/revision.py b/lib/launchpad_loggerhead/revision.py
index 094b470..54e38c0 100644
--- a/lib/launchpad_loggerhead/revision.py
+++ b/lib/launchpad_loggerhead/revision.py
@@ -3,7 +3,6 @@
"""WSGI Middleware to add Launchpad revision headers to loggerhead."""
-__metaclass__ = type
__all__ = ['RevisionHeaderHandler']
from lp.app import versioninfo
diff --git a/lib/launchpad_loggerhead/testing.py b/lib/launchpad_loggerhead/testing.py
index 3254107..9f63a62 100644
--- a/lib/launchpad_loggerhead/testing.py
+++ b/lib/launchpad_loggerhead/testing.py
@@ -1,7 +1,6 @@
# Copyright 2018 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'LoggerheadFixture',
]
diff --git a/lib/launchpad_loggerhead/wsgi.py b/lib/launchpad_loggerhead/wsgi.py
index 5d1463b..633fb7c 100644
--- a/lib/launchpad_loggerhead/wsgi.py
+++ b/lib/launchpad_loggerhead/wsgi.py
@@ -1,7 +1,6 @@
# Copyright 2009-2018 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'LoggerheadApplication',
]
diff --git a/lib/lp/_schema_circular_imports.py b/lib/lp/_schema_circular_imports.py
index 4b1ecff..7c3c549 100644
--- a/lib/lp/_schema_circular_imports.py
+++ b/lib/lp/_schema_circular_imports.py
@@ -9,9 +9,6 @@ schema is initially set to `Interface`, but this needs to be updated once the
types are defined.
"""
-__metaclass__ = type
-
-
__all__ = []
diff --git a/lib/lp/answers/adapters.py b/lib/lp/answers/adapters.py
index c8d1a13..3c7f037 100644
--- a/lib/lp/answers/adapters.py
+++ b/lib/lp/answers/adapters.py
@@ -3,7 +3,6 @@
"""Adapters used in the Answer Tracker."""
-__metaclass__ = type
__all__ = []
diff --git a/lib/lp/answers/browser/faq.py b/lib/lp/answers/browser/faq.py
index 4a3fa88..dbca64d 100644
--- a/lib/lp/answers/browser/faq.py
+++ b/lib/lp/answers/browser/faq.py
@@ -3,8 +3,6 @@
"""`IFAQ` browser views."""
-__metaclass__ = type
-
__all__ = [
'FAQBreadcrumb',
'FAQNavigationMenu',
diff --git a/lib/lp/answers/browser/faqcollection.py b/lib/lp/answers/browser/faqcollection.py
index 67c07a7..0c2734f 100644
--- a/lib/lp/answers/browser/faqcollection.py
+++ b/lib/lp/answers/browser/faqcollection.py
@@ -3,8 +3,6 @@
"""IFAQCollection browser views."""
-__metaclass__ = type
-
__all__ = [
'FAQCollectionMenu',
'SearchFAQsView',
diff --git a/lib/lp/answers/browser/faqtarget.py b/lib/lp/answers/browser/faqtarget.py
index c0095af..c433007 100644
--- a/lib/lp/answers/browser/faqtarget.py
+++ b/lib/lp/answers/browser/faqtarget.py
@@ -3,8 +3,6 @@
"""`IFAQTarget` browser views."""
-__metaclass__ = type
-
__all__ = [
'FAQTargetNavigationMixin',
'FAQCreateView',
diff --git a/lib/lp/answers/browser/person.py b/lib/lp/answers/browser/person.py
index c8821e9..04d0b4d 100644
--- a/lib/lp/answers/browser/person.py
+++ b/lib/lp/answers/browser/person.py
@@ -3,7 +3,6 @@
"""Person-related answer listing classes."""
-__metaclass__ = type
__all__ = [
'PersonAnswerContactForView',
'PersonAnswersMenu',
diff --git a/lib/lp/answers/browser/question.py b/lib/lp/answers/browser/question.py
index de8039a..82560a8 100644
--- a/lib/lp/answers/browser/question.py
+++ b/lib/lp/answers/browser/question.py
@@ -3,8 +3,6 @@
"""Question views."""
-__metaclass__ = type
-
__all__ = [
'SearchAllQuestionsView',
'QuestionAddView',
diff --git a/lib/lp/answers/browser/questionsubscription.py b/lib/lp/answers/browser/questionsubscription.py
index d70445e..8883f85 100644
--- a/lib/lp/answers/browser/questionsubscription.py
+++ b/lib/lp/answers/browser/questionsubscription.py
@@ -3,7 +3,6 @@
"""Views for QuestionSubscription."""
-__metaclass__ = type
__all__ = [
'QuestionPortletSubscribersWithDetails',
]
diff --git a/lib/lp/answers/browser/questiontarget.py b/lib/lp/answers/browser/questiontarget.py
index eb7aecb..d039539 100644
--- a/lib/lp/answers/browser/questiontarget.py
+++ b/lib/lp/answers/browser/questiontarget.py
@@ -3,8 +3,6 @@
"""IQuestionTarget browser views."""
-__metaclass__ = type
-
__all__ = [
'AskAQuestionButtonPortlet',
'ManageAnswerContactView',
diff --git a/lib/lp/answers/browser/tests/test_breadcrumbs.py b/lib/lp/answers/browser/tests/test_breadcrumbs.py
index 675fe2d..070cb67 100644
--- a/lib/lp/answers/browser/tests/test_breadcrumbs.py
+++ b/lib/lp/answers/browser/tests/test_breadcrumbs.py
@@ -1,8 +1,6 @@
# Copyright 2009-2010 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from lp.services.webapp.publisher import canonical_url
from lp.testing import login_person
from lp.testing.breadcrumbs import BaseBreadcrumbTestCase
diff --git a/lib/lp/answers/browser/tests/test_menus.py b/lib/lp/answers/browser/tests/test_menus.py
index ff4a4d6..a0fdf48 100644
--- a/lib/lp/answers/browser/tests/test_menus.py
+++ b/lib/lp/answers/browser/tests/test_menus.py
@@ -1,8 +1,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from zope.component import getUtility
from lp.answers.browser.question import (
diff --git a/lib/lp/answers/browser/tests/test_question.py b/lib/lp/answers/browser/tests/test_question.py
index 5f2209a..7d7897d 100644
--- a/lib/lp/answers/browser/tests/test_question.py
+++ b/lib/lp/answers/browser/tests/test_question.py
@@ -3,8 +3,6 @@
"""Tests for the question module."""
-__metaclass__ = type
-
__all__ = []
from zope.security.proxy import removeSecurityProxy
diff --git a/lib/lp/answers/browser/tests/test_questionmessages.py b/lib/lp/answers/browser/tests/test_questionmessages.py
index 0e49240..bd4f5d6 100644
--- a/lib/lp/answers/browser/tests/test_questionmessages.py
+++ b/lib/lp/answers/browser/tests/test_questionmessages.py
@@ -3,8 +3,6 @@
"""Tests for the various rules around question comment visibility."""
-__metaclass__ = type
-
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
diff --git a/lib/lp/answers/browser/tests/test_questionsubscription_views.py b/lib/lp/answers/browser/tests/test_questionsubscription_views.py
index aa738e5..8c7002e 100644
--- a/lib/lp/answers/browser/tests/test_questionsubscription_views.py
+++ b/lib/lp/answers/browser/tests/test_questionsubscription_views.py
@@ -3,8 +3,6 @@
"""Tests for QuestionSubscription views."""
-__metaclass__ = type
-
import json
from lazr.restful.interfaces import IWebServiceClientRequest
diff --git a/lib/lp/answers/browser/tests/test_questiontarget.py b/lib/lp/answers/browser/tests/test_questiontarget.py
index d7805e7..c0aefe0 100644
--- a/lib/lp/answers/browser/tests/test_questiontarget.py
+++ b/lib/lp/answers/browser/tests/test_questiontarget.py
@@ -3,8 +3,6 @@
"""Test questiontarget views."""
-__metaclass__ = type
-
import json
import os
diff --git a/lib/lp/answers/browser/tests/test_views.py b/lib/lp/answers/browser/tests/test_views.py
index 54749e3..eeee41a 100644
--- a/lib/lp/answers/browser/tests/test_views.py
+++ b/lib/lp/answers/browser/tests/test_views.py
@@ -3,8 +3,6 @@
"""Test harness for Answer Tracker related unit tests."""
-__metaclass__ = type
-
__all__ = []
import unittest
diff --git a/lib/lp/answers/errors.py b/lib/lp/answers/errors.py
index cfd6f47..9f53c38 100644
--- a/lib/lp/answers/errors.py
+++ b/lib/lp/answers/errors.py
@@ -1,7 +1,6 @@
# Copyright 2011-2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'AddAnswerContactError',
'FAQTargetError',
diff --git a/lib/lp/answers/interfaces/answercontact.py b/lib/lp/answers/interfaces/answercontact.py
index 2c9fe70..91200c7 100644
--- a/lib/lp/answers/interfaces/answercontact.py
+++ b/lib/lp/answers/interfaces/answercontact.py
@@ -3,8 +3,6 @@
"""Answer contact interfaces."""
-__metaclass__ = type
-
__all__ = [
'IAnswerContact',
]
diff --git a/lib/lp/answers/interfaces/faq.py b/lib/lp/answers/interfaces/faq.py
index f8bc3ae..2aee883 100644
--- a/lib/lp/answers/interfaces/faq.py
+++ b/lib/lp/answers/interfaces/faq.py
@@ -3,8 +3,6 @@
"""Interface for FAQ document."""
-__metaclass__ = type
-
__all__ = [
'CannotDeleteFAQ',
'IFAQ',
diff --git a/lib/lp/answers/interfaces/faqcollection.py b/lib/lp/answers/interfaces/faqcollection.py
index 6adb60d..adbd7ab 100644
--- a/lib/lp/answers/interfaces/faqcollection.py
+++ b/lib/lp/answers/interfaces/faqcollection.py
@@ -3,8 +3,6 @@
"""Interface for things that contains a collection of FAQs."""
-__metaclass__ = type
-
__all__ = [
'FAQSort',
'IFAQCollection',
diff --git a/lib/lp/answers/interfaces/faqtarget.py b/lib/lp/answers/interfaces/faqtarget.py
index 19c726c..28df5b4 100644
--- a/lib/lp/answers/interfaces/faqtarget.py
+++ b/lib/lp/answers/interfaces/faqtarget.py
@@ -3,8 +3,6 @@
"""Interface for things that can host IFAQ."""
-__metaclass__ = type
-
__all__ = [
'IFAQTarget',
]
diff --git a/lib/lp/answers/interfaces/question.py b/lib/lp/answers/interfaces/question.py
index 9b894c8..41efbf7 100644
--- a/lib/lp/answers/interfaces/question.py
+++ b/lib/lp/answers/interfaces/question.py
@@ -3,8 +3,6 @@
"""Interfaces for a Question."""
-__metaclass__ = type
-
__all__ = [
'IQuestion',
'IQuestionAddMessageForm',
diff --git a/lib/lp/answers/interfaces/questioncollection.py b/lib/lp/answers/interfaces/questioncollection.py
index f773fb6..ac6596a 100644
--- a/lib/lp/answers/interfaces/questioncollection.py
+++ b/lib/lp/answers/interfaces/questioncollection.py
@@ -3,8 +3,6 @@
"""Interfaces for a Question."""
-__metaclass__ = type
-
__all__ = [
'IQuestionCollection',
'IQuestionSet',
diff --git a/lib/lp/answers/interfaces/questionjob.py b/lib/lp/answers/interfaces/questionjob.py
index 01ab719..ee37a16 100644
--- a/lib/lp/answers/interfaces/questionjob.py
+++ b/lib/lp/answers/interfaces/questionjob.py
@@ -3,7 +3,6 @@
"""Interface for the Jobs system for questions."""
-__metaclass__ = type
__all__ = [
'IQuestionJob',
'IQuestionEmailJob',
diff --git a/lib/lp/answers/interfaces/questionmessage.py b/lib/lp/answers/interfaces/questionmessage.py
index dadd1d6..da20006 100644
--- a/lib/lp/answers/interfaces/questionmessage.py
+++ b/lib/lp/answers/interfaces/questionmessage.py
@@ -3,8 +3,6 @@
"""Question message interface."""
-__metaclass__ = type
-
__all__ = [
'IQuestionMessage',
]
diff --git a/lib/lp/answers/interfaces/questionreopening.py b/lib/lp/answers/interfaces/questionreopening.py
index 40dcfa8..95807e1 100644
--- a/lib/lp/answers/interfaces/questionreopening.py
+++ b/lib/lp/answers/interfaces/questionreopening.py
@@ -3,8 +3,6 @@
"""Interface for a QuestionReopening."""
-__metaclass__ = type
-
__all__ = [
'IQuestionReopening',
]
diff --git a/lib/lp/answers/interfaces/questionsperson.py b/lib/lp/answers/interfaces/questionsperson.py
index 9b7001b..d334bd0 100644
--- a/lib/lp/answers/interfaces/questionsperson.py
+++ b/lib/lp/answers/interfaces/questionsperson.py
@@ -1,7 +1,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'IQuestionsPerson',
]
diff --git a/lib/lp/answers/interfaces/questionsubscription.py b/lib/lp/answers/interfaces/questionsubscription.py
index 52119a0..485351a 100644
--- a/lib/lp/answers/interfaces/questionsubscription.py
+++ b/lib/lp/answers/interfaces/questionsubscription.py
@@ -3,8 +3,6 @@
"""Question subscription interface."""
-__metaclass__ = type
-
__all__ = [
'IQuestionSubscription',
]
diff --git a/lib/lp/answers/interfaces/questiontarget.py b/lib/lp/answers/interfaces/questiontarget.py
index fd90bdf..d29c66c 100644
--- a/lib/lp/answers/interfaces/questiontarget.py
+++ b/lib/lp/answers/interfaces/questiontarget.py
@@ -3,8 +3,6 @@
"""Interfaces for things which have Questions."""
-__metaclass__ = type
-
__all__ = [
'IAnswersFrontPageSearchForm',
'IQuestionTarget',
diff --git a/lib/lp/answers/karma.py b/lib/lp/answers/karma.py
index a1ce23a..242fdf4 100644
--- a/lib/lp/answers/karma.py
+++ b/lib/lp/answers/karma.py
@@ -3,7 +3,6 @@
""" Karma for the Answer Tracker. """
-__metaclass__ = type
__all__ = [
'assignKarmaUsingQuestionContext',
]
diff --git a/lib/lp/answers/mail/__init__.py b/lib/lp/answers/mail/__init__.py
index c15775f..6b3f0d4 100644
--- a/lib/lp/answers/mail/__init__.py
+++ b/lib/lp/answers/mail/__init__.py
@@ -1,5 +1,4 @@
# Copyright 2010 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = []
diff --git a/lib/lp/answers/mail/handler.py b/lib/lp/answers/mail/handler.py
index f2084bf..53696ce 100644
--- a/lib/lp/answers/mail/handler.py
+++ b/lib/lp/answers/mail/handler.py
@@ -3,7 +3,6 @@
"""Handle incoming Answers email."""
-__metaclass__ = type
__all__ = [
"AnswerTrackerHandler",
]
diff --git a/lib/lp/answers/mail/question.py b/lib/lp/answers/mail/question.py
index 7ecface..98f61ed 100644
--- a/lib/lp/answers/mail/question.py
+++ b/lib/lp/answers/mail/question.py
@@ -1,7 +1,6 @@
# Copyright 2015 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'QuestionRecipientReason',
]
diff --git a/lib/lp/answers/model/answercontact.py b/lib/lp/answers/model/answercontact.py
index b89710e..dac75e7 100644
--- a/lib/lp/answers/model/answercontact.py
+++ b/lib/lp/answers/model/answercontact.py
@@ -3,7 +3,6 @@
"""SQLBase implementation of IAnswerContact."""
-__metaclass__ = type
__all__ = ['AnswerContact']
diff --git a/lib/lp/answers/model/faq.py b/lib/lp/answers/model/faq.py
index 0c22fd5..ac541ed 100644
--- a/lib/lp/answers/model/faq.py
+++ b/lib/lp/answers/model/faq.py
@@ -3,8 +3,6 @@
"""FAQ document models."""
-__metaclass__ = type
-
__all__ = [
'FAQ',
'FAQSearch',
diff --git a/lib/lp/answers/model/question.py b/lib/lp/answers/model/question.py
index df90995..0441a70 100644
--- a/lib/lp/answers/model/question.py
+++ b/lib/lp/answers/model/question.py
@@ -3,7 +3,6 @@
"""Question models."""
-__metaclass__ = type
__all__ = [
'SimilarQuestionsSearch',
'Question',
diff --git a/lib/lp/answers/model/questionjob.py b/lib/lp/answers/model/questionjob.py
index 8b47fff..2967daf 100644
--- a/lib/lp/answers/model/questionjob.py
+++ b/lib/lp/answers/model/questionjob.py
@@ -3,7 +3,6 @@
"""Job classes related to QuestionJob."""
-__metaclass__ = type
__all__ = [
'QuestionJob',
]
diff --git a/lib/lp/answers/model/questionmessage.py b/lib/lp/answers/model/questionmessage.py
index 3fe7c56..ac4b9e6 100644
--- a/lib/lp/answers/model/questionmessage.py
+++ b/lib/lp/answers/model/questionmessage.py
@@ -3,8 +3,6 @@
"""SQLBase implementation of IQuestionMessage."""
-__metaclass__ = type
-
__all__ = [
'QuestionMessage',
]
diff --git a/lib/lp/answers/model/questionreopening.py b/lib/lp/answers/model/questionreopening.py
index df9d1ee..e78da59 100644
--- a/lib/lp/answers/model/questionreopening.py
+++ b/lib/lp/answers/model/questionreopening.py
@@ -3,8 +3,6 @@
"""SQLBase implementation of IQuestionReopening."""
-__metaclass__ = type
-
__all__ = ['QuestionReopening',
'create_questionreopening']
diff --git a/lib/lp/answers/model/questionsperson.py b/lib/lp/answers/model/questionsperson.py
index 54e03dc..73b7b5b 100644
--- a/lib/lp/answers/model/questionsperson.py
+++ b/lib/lp/answers/model/questionsperson.py
@@ -1,7 +1,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'QuestionsPersonMixin',
]
diff --git a/lib/lp/answers/model/questionsubscription.py b/lib/lp/answers/model/questionsubscription.py
index 8442f8d..4bf8ad1 100644
--- a/lib/lp/answers/model/questionsubscription.py
+++ b/lib/lp/answers/model/questionsubscription.py
@@ -3,8 +3,6 @@
"""StormBase implementation of IQuestionSubscription."""
-__metaclass__ = type
-
__all__ = ['QuestionSubscription']
import pytz
diff --git a/lib/lp/answers/model/tests/test_question.py b/lib/lp/answers/model/tests/test_question.py
index 0883f46..0735fe3 100644
--- a/lib/lp/answers/model/tests/test_question.py
+++ b/lib/lp/answers/model/tests/test_question.py
@@ -1,8 +1,6 @@
# Copyright 2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/answers/model/tests/test_questionsubscription.py b/lib/lp/answers/model/tests/test_questionsubscription.py
index 31a2fe6..513914c 100644
--- a/lib/lp/answers/model/tests/test_questionsubscription.py
+++ b/lib/lp/answers/model/tests/test_questionsubscription.py
@@ -3,8 +3,6 @@
"""Tests for the QuestionSubscrption model object.."""
-__metaclass__ = type
-
from zope.component import getUtility
from lp.app.errors import UserCannotUnsubscribePerson
diff --git a/lib/lp/answers/notification.py b/lib/lp/answers/notification.py
index 6fef99a..42f04cd 100644
--- a/lib/lp/answers/notification.py
+++ b/lib/lp/answers/notification.py
@@ -3,7 +3,6 @@
"""Notifications for the Answers system."""
-__metaclass__ = type
__all__ = [
'QuestionNotification',
]
diff --git a/lib/lp/answers/publisher.py b/lib/lp/answers/publisher.py
index 8cd62e1..266d225 100644
--- a/lib/lp/answers/publisher.py
+++ b/lib/lp/answers/publisher.py
@@ -3,7 +3,6 @@
"""Answers's custom publication."""
-__metaclass__ = type
__all__ = [
'AnswersBrowserRequest',
'AnswersFacet',
diff --git a/lib/lp/answers/scripts/questionexpiration.py b/lib/lp/answers/scripts/questionexpiration.py
index 3f6bd5b..dbf2184 100644
--- a/lib/lp/answers/scripts/questionexpiration.py
+++ b/lib/lp/answers/scripts/questionexpiration.py
@@ -3,8 +3,6 @@
"""Question expiration logic."""
-__metaclass__ = type
-
from logging import getLogger
from zope.component import getUtility
diff --git a/lib/lp/answers/subscribers.py b/lib/lp/answers/subscribers.py
index 28f9a5b..8757ab2 100644
--- a/lib/lp/answers/subscribers.py
+++ b/lib/lp/answers/subscribers.py
@@ -3,7 +3,6 @@
"""Subscribers for `IFAQ`."""
-__metaclass__ = type
__all__ = ['update_last_updated']
diff --git a/lib/lp/answers/testing.py b/lib/lp/answers/testing.py
index f6360b3..5ea8002 100644
--- a/lib/lp/answers/testing.py
+++ b/lib/lp/answers/testing.py
@@ -3,7 +3,6 @@
"""Helper functions for Answer Tracker tests."""
-__metaclass__ = type
__all__ = [
'QuestionFactory',
]
diff --git a/lib/lp/answers/tests/test_faq.py b/lib/lp/answers/tests/test_faq.py
index 20eea11..84e34e8 100644
--- a/lib/lp/answers/tests/test_faq.py
+++ b/lib/lp/answers/tests/test_faq.py
@@ -3,8 +3,6 @@
"""Tests for IFAQ"""
-__metaclass__ = type
-
import transaction
from zope.component import getUtility
diff --git a/lib/lp/answers/tests/test_faq_webservice.py b/lib/lp/answers/tests/test_faq_webservice.py
index 969af27..f16c575 100644
--- a/lib/lp/answers/tests/test_faq_webservice.py
+++ b/lib/lp/answers/tests/test_faq_webservice.py
@@ -1,8 +1,6 @@
# Copyright 2015-2018 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from testtools.matchers import (
Contains,
ContainsDict,
diff --git a/lib/lp/answers/tests/test_faqtarget.py b/lib/lp/answers/tests/test_faqtarget.py
index 9d52303..d008ef9 100644
--- a/lib/lp/answers/tests/test_faqtarget.py
+++ b/lib/lp/answers/tests/test_faqtarget.py
@@ -3,8 +3,6 @@
"""Tests for IFAQTarget"""
-__metaclass__ = type
-
from zope.component import getUtility
from lp.answers.interfaces.faqtarget import IFAQTarget
diff --git a/lib/lp/answers/tests/test_publisher.py b/lib/lp/answers/tests/test_publisher.py
index 8acc360..5199061 100644
--- a/lib/lp/answers/tests/test_publisher.py
+++ b/lib/lp/answers/tests/test_publisher.py
@@ -3,8 +3,6 @@
"""Tests for answers's custom publications."""
-__metaclass__ = type
-
import io
from lp.answers.publisher import (
diff --git a/lib/lp/answers/tests/test_question.py b/lib/lp/answers/tests/test_question.py
index d81870f..8405fa8 100644
--- a/lib/lp/answers/tests/test_question.py
+++ b/lib/lp/answers/tests/test_question.py
@@ -1,8 +1,6 @@
# Copyright 2013-2017 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from testtools.testcase import ExpectedException
from zope.component import getUtility
from zope.security.interfaces import Unauthorized
diff --git a/lib/lp/answers/tests/test_question_notifications.py b/lib/lp/answers/tests/test_question_notifications.py
index 200d39a..f254055 100644
--- a/lib/lp/answers/tests/test_question_notifications.py
+++ b/lib/lp/answers/tests/test_question_notifications.py
@@ -3,8 +3,6 @@
"""Unit tests for the Answer Tracker Mail Notifications."""
-__metaclass__ = type
-
__all__ = [
'pop_questionemailjobs',
]
diff --git a/lib/lp/answers/tests/test_question_webservice.py b/lib/lp/answers/tests/test_question_webservice.py
index b4d0662..53a05f3 100644
--- a/lib/lp/answers/tests/test_question_webservice.py
+++ b/lib/lp/answers/tests/test_question_webservice.py
@@ -3,8 +3,6 @@
"""Webservice unit tests related to Launchpad Questions."""
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/answers/tests/test_question_workflow.py b/lib/lp/answers/tests/test_question_workflow.py
index 582bb6b..1ec3999 100644
--- a/lib/lp/answers/tests/test_question_workflow.py
+++ b/lib/lp/answers/tests/test_question_workflow.py
@@ -9,8 +9,6 @@ but testing all the possible transitions makes the documentation more heavy
than necessary. This is tested here.
"""
-__metaclass__ = type
-
__all__ = []
from datetime import (
diff --git a/lib/lp/answers/tests/test_questionjob.py b/lib/lp/answers/tests/test_questionjob.py
index f1ebac6..d0648e3 100644
--- a/lib/lp/answers/tests/test_questionjob.py
+++ b/lib/lp/answers/tests/test_questionjob.py
@@ -3,8 +3,6 @@
"""Tests for QuestionJobs classes."""
-__metaclass__ = type
-
from testtools.content import text_content
import transaction
from zope.component import getUtility
diff --git a/lib/lp/answers/tests/test_questiontarget.py b/lib/lp/answers/tests/test_questiontarget.py
index 89c2c9b..e825d34 100644
--- a/lib/lp/answers/tests/test_questiontarget.py
+++ b/lib/lp/answers/tests/test_questiontarget.py
@@ -3,8 +3,6 @@
"""Tests related to IQuestionTarget."""
-__metaclass__ = type
-
__all__ = []
from zope.component import getUtility
diff --git a/lib/lp/answers/tests/test_vocabulary.py b/lib/lp/answers/tests/test_vocabulary.py
index 84d3c6f..e474337 100644
--- a/lib/lp/answers/tests/test_vocabulary.py
+++ b/lib/lp/answers/tests/test_vocabulary.py
@@ -3,8 +3,6 @@
"""Test the answers domain vocabularies."""
-__metaclass__ = type
-
from lp.answers.vocabulary import (
UsesAnswersDistributionVocabulary,
UsesAnswersProductVocabulary,
diff --git a/lib/lp/answers/vocabulary.py b/lib/lp/answers/vocabulary.py
index 08dd3b7..e60e2cf 100644
--- a/lib/lp/answers/vocabulary.py
+++ b/lib/lp/answers/vocabulary.py
@@ -3,7 +3,6 @@
"""Named vocabularies defined by the Answers application."""
-__metaclass__ = type
__all__ = [
'FAQVocabulary',
'UsesAnswersDistributionVocabulary',
diff --git a/lib/lp/app/__init__.py b/lib/lp/app/__init__.py
index 5f5419e..0276aec 100644
--- a/lib/lp/app/__init__.py
+++ b/lib/lp/app/__init__.py
@@ -8,7 +8,6 @@ together. As such, it can import from any modules, but nothing should import
from it.
"""
-__metaclass__ = type
__all__ = []
# Zope recently changed the behaviour of items widgets with regards to missing
diff --git a/lib/lp/app/browser/badge.py b/lib/lp/app/browser/badge.py
index c4bec9f..2dcf6ba 100644
--- a/lib/lp/app/browser/badge.py
+++ b/lib/lp/app/browser/badge.py
@@ -8,7 +8,6 @@ Badges are shown in two main places:
* main content pages.
"""
-__metaclass__ = type
__all__ = [
'Badge',
'HasBadgeBase',
diff --git a/lib/lp/app/browser/folder.py b/lib/lp/app/browser/folder.py
index 7c29bab..8c8c9ac 100644
--- a/lib/lp/app/browser/folder.py
+++ b/lib/lp/app/browser/folder.py
@@ -1,8 +1,6 @@
# Copyright 2009-2016 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = [
'ExportedFolder',
'ExportedImageFolder',
diff --git a/lib/lp/app/browser/informationtype.py b/lib/lp/app/browser/informationtype.py
index cc092d8..f2848b4 100644
--- a/lib/lp/app/browser/informationtype.py
+++ b/lib/lp/app/browser/informationtype.py
@@ -1,7 +1,6 @@
# Copyright 2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'InformationTypePortletMixin',
]
diff --git a/lib/lp/app/browser/launchpad.py b/lib/lp/app/browser/launchpad.py
index 8bc341b..c9bb53e 100644
--- a/lib/lp/app/browser/launchpad.py
+++ b/lib/lp/app/browser/launchpad.py
@@ -3,7 +3,6 @@
"""Browser code for the launchpad application."""
-__metaclass__ = type
__all__ = [
'AppFrontPageSearchView',
'ExceptionHierarchy',
diff --git a/lib/lp/app/browser/launchpadform.py b/lib/lp/app/browser/launchpadform.py
index 8899cbd..642f044 100644
--- a/lib/lp/app/browser/launchpadform.py
+++ b/lib/lp/app/browser/launchpadform.py
@@ -4,8 +4,6 @@
"""Launchpad Form View Classes
"""
-__metaclass__ = type
-
__all__ = [
'action',
'has_structured_doc',
diff --git a/lib/lp/app/browser/lazrjs.py b/lib/lp/app/browser/lazrjs.py
index 8288bf3..51c22da 100644
--- a/lib/lp/app/browser/lazrjs.py
+++ b/lib/lp/app/browser/lazrjs.py
@@ -3,7 +3,6 @@
"""Wrappers for lazr-js widgets."""
-__metaclass__ = type
__all__ = [
'BooleanChoiceWidget',
'EnumChoiceWidget',
diff --git a/lib/lp/app/browser/linkchecker.py b/lib/lp/app/browser/linkchecker.py
index 8fec3be..b541907 100644
--- a/lib/lp/app/browser/linkchecker.py
+++ b/lib/lp/app/browser/linkchecker.py
@@ -1,7 +1,6 @@
# Copyright 2009-2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'LinkCheckerAPI',
]
diff --git a/lib/lp/app/browser/multistep.py b/lib/lp/app/browser/multistep.py
index ac77961..278f8e1 100644
--- a/lib/lp/app/browser/multistep.py
+++ b/lib/lp/app/browser/multistep.py
@@ -3,7 +3,6 @@
"""Multiple step views."""
-__metaclass__ = type
__all__ = [
'MultiStepView',
'StepView',
diff --git a/lib/lp/app/browser/root.py b/lib/lp/app/browser/root.py
index 18d9581..484fdb2 100644
--- a/lib/lp/app/browser/root.py
+++ b/lib/lp/app/browser/root.py
@@ -2,7 +2,6 @@
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Browser code for the Launchpad root page."""
-__metaclass__ = type
__all__ = [
'LaunchpadRootIndexView',
'LaunchpadSearchView',
diff --git a/lib/lp/app/browser/stringformatter.py b/lib/lp/app/browser/stringformatter.py
index d77cf50..bc40322 100644
--- a/lib/lp/app/browser/stringformatter.py
+++ b/lib/lp/app/browser/stringformatter.py
@@ -3,7 +3,6 @@
"""TALES formatter for strings."""
-__metaclass__ = type
__all__ = [
'add_word_breaks',
'break_long_words',
diff --git a/lib/lp/app/browser/tales.py b/lib/lp/app/browser/tales.py
index 0ec7220..51239bb 100644
--- a/lib/lp/app/browser/tales.py
+++ b/lib/lp/app/browser/tales.py
@@ -3,8 +3,6 @@
"""Implementation of the lp: htmlform: fmt: namespaces in TALES."""
-__metaclass__ = type
-
from bisect import bisect
from datetime import (
datetime,
diff --git a/lib/lp/app/browser/tests/test_base_layout.py b/lib/lp/app/browser/tests/test_base_layout.py
index e0fefde..1cbdaa6 100644
--- a/lib/lp/app/browser/tests/test_base_layout.py
+++ b/lib/lp/app/browser/tests/test_base_layout.py
@@ -11,8 +11,6 @@ of the page. Any page can use these layout options by including
in the root element. The template provides common layout to Launchpad.
"""
-__metaclass__ = type
-
from zope.browserpage import ViewPageTemplateFile
from lp.registry.interfaces.person import PersonVisibility
diff --git a/lib/lp/app/browser/tests/test_css_formatter.py b/lib/lp/app/browser/tests/test_css_formatter.py
index 6152c82..5c28923 100644
--- a/lib/lp/app/browser/tests/test_css_formatter.py
+++ b/lib/lp/app/browser/tests/test_css_formatter.py
@@ -3,8 +3,6 @@
"""Tests for the CSS TALES formatter."""
-__metaclass__ = type
-
from testtools.matchers import Equals
from lp.testing import (
diff --git a/lib/lp/app/browser/tests/test_formatters.py b/lib/lp/app/browser/tests/test_formatters.py
index 21dafe6..25f355c 100644
--- a/lib/lp/app/browser/tests/test_formatters.py
+++ b/lib/lp/app/browser/tests/test_formatters.py
@@ -3,8 +3,6 @@
"""Tests for the TALES formatters."""
-__metaclass__ = type
-
from lp.app.browser.tales import (
ObjectFormatterAPI,
PillarFormatterAPI,
diff --git a/lib/lp/app/browser/tests/test_inlineeditpickerwidget.py b/lib/lp/app/browser/tests/test_inlineeditpickerwidget.py
index ca4e1ff..bb78430 100644
--- a/lib/lp/app/browser/tests/test_inlineeditpickerwidget.py
+++ b/lib/lp/app/browser/tests/test_inlineeditpickerwidget.py
@@ -3,8 +3,6 @@
"""Tests for the InlineEditPickerWidget."""
-__metaclass__ = type
-
from zope.interface import (
implementer,
Interface,
diff --git a/lib/lp/app/browser/tests/test_inlinemulticheckboxwidget.py b/lib/lp/app/browser/tests/test_inlinemulticheckboxwidget.py
index 3060795..745f203 100644
--- a/lib/lp/app/browser/tests/test_inlinemulticheckboxwidget.py
+++ b/lib/lp/app/browser/tests/test_inlinemulticheckboxwidget.py
@@ -3,8 +3,6 @@
"""Tests for the InlineMultiCheckboxWidget."""
-__metaclass__ = type
-
from lazr.enum import (
EnumeratedType,
Item,
diff --git a/lib/lp/app/browser/tests/test_launchpad.py b/lib/lp/app/browser/tests/test_launchpad.py
index 4df70c5..a25c46c 100644
--- a/lib/lp/app/browser/tests/test_launchpad.py
+++ b/lib/lp/app/browser/tests/test_launchpad.py
@@ -3,8 +3,6 @@
"""Tests for traversal from the root branch object."""
-__metaclass__ = type
-
from zope.component import (
getMultiAdapter,
getUtility,
diff --git a/lib/lp/app/browser/tests/test_launchpadform.py b/lib/lp/app/browser/tests/test_launchpadform.py
index cc85eee..95190a5 100644
--- a/lib/lp/app/browser/tests/test_launchpadform.py
+++ b/lib/lp/app/browser/tests/test_launchpadform.py
@@ -3,8 +3,6 @@
"""Tests for the lp.app.browser.launchpadform module."""
-__metaclass__ = type
-
from os.path import (
dirname,
join,
diff --git a/lib/lp/app/browser/tests/test_launchpadroot.py b/lib/lp/app/browser/tests/test_launchpadroot.py
index f51ef2b..92cc935 100644
--- a/lib/lp/app/browser/tests/test_launchpadroot.py
+++ b/lib/lp/app/browser/tests/test_launchpadroot.py
@@ -3,9 +3,6 @@
"""Tests related to ILaunchpadRoot."""
-__metaclass__ = type
-
-
from fixtures import FakeLogger
from zope.component import getUtility
from zope.security.checker import selectChecker
diff --git a/lib/lp/app/browser/tests/test_linkchecker.py b/lib/lp/app/browser/tests/test_linkchecker.py
index 423e6f7..2781e2a 100644
--- a/lib/lp/app/browser/tests/test_linkchecker.py
+++ b/lib/lp/app/browser/tests/test_linkchecker.py
@@ -3,8 +3,6 @@
"""Unit tests for the LinkCheckerAPI."""
-__metaclass__ = type
-
from random import shuffle
import simplejson
diff --git a/lib/lp/app/browser/tests/test_macro_view.py b/lib/lp/app/browser/tests/test_macro_view.py
index bbb8709..0d26beb 100644
--- a/lib/lp/app/browser/tests/test_macro_view.py
+++ b/lib/lp/app/browser/tests/test_macro_view.py
@@ -3,8 +3,6 @@
"""Tests for traversal from the root branch object."""
-__metaclass__ = type
-
from zope.publisher.interfaces import NotFound
from lp.testing import TestCaseWithFactory
diff --git a/lib/lp/app/browser/tests/test_mixed_visibility.py b/lib/lp/app/browser/tests/test_mixed_visibility.py
index 0e14f03..be6014a 100644
--- a/lib/lp/app/browser/tests/test_mixed_visibility.py
+++ b/lib/lp/app/browser/tests/test_mixed_visibility.py
@@ -1,8 +1,6 @@
# Copyright 2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from lp.app.browser.tales import TeamFormatterAPI
from lp.registry.interfaces.person import PersonVisibility
from lp.testing import (
diff --git a/lib/lp/app/browser/tests/test_page_macro.py b/lib/lp/app/browser/tests/test_page_macro.py
index 5411a0e..6184afd 100644
--- a/lib/lp/app/browser/tests/test_page_macro.py
+++ b/lib/lp/app/browser/tests/test_page_macro.py
@@ -3,8 +3,6 @@
"""Tests for Launchpad's 'view/macro:page' TALES adapter."""
-__metaclass__ = type
-
import os
from zope.interface import implementer
diff --git a/lib/lp/app/browser/tests/test_stringformatter.py b/lib/lp/app/browser/tests/test_stringformatter.py
index 9b0caf3..0266453 100644
--- a/lib/lp/app/browser/tests/test_stringformatter.py
+++ b/lib/lp/app/browser/tests/test_stringformatter.py
@@ -3,8 +3,6 @@
"""Unit tests for the string TALES formatter."""
-__metaclass__ = type
-
from doctest import DocTestSuite
from textwrap import dedent
import unittest
diff --git a/lib/lp/app/browser/tests/test_views.py b/lib/lp/app/browser/tests/test_views.py
index c3187e1..1a8c266 100644
--- a/lib/lp/app/browser/tests/test_views.py
+++ b/lib/lp/app/browser/tests/test_views.py
@@ -3,8 +3,6 @@
"""Run the view tests."""
-__metaclass__ = type
-
import logging
import os
diff --git a/lib/lp/app/browser/tests/test_vocabulary.py b/lib/lp/app/browser/tests/test_vocabulary.py
index 7265281..c7cf33d 100644
--- a/lib/lp/app/browser/tests/test_vocabulary.py
+++ b/lib/lp/app/browser/tests/test_vocabulary.py
@@ -3,8 +3,6 @@
"""Test vocabulary adapters."""
-__metaclass__ = type
-
from datetime import datetime
import pytz
diff --git a/lib/lp/app/browser/tests/test_webservice.py b/lib/lp/app/browser/tests/test_webservice.py
index 33d354e..0237760 100644
--- a/lib/lp/app/browser/tests/test_webservice.py
+++ b/lib/lp/app/browser/tests/test_webservice.py
@@ -3,9 +3,6 @@
"""Tests for webservice features across Launchpad."""
-__metaclass__ = type
-
-
from lazr.restful.interfaces import IFieldHTMLRenderer
from lazr.restful.utils import get_current_web_service_request
from zope.component import getMultiAdapter
diff --git a/lib/lp/app/browser/vocabulary.py b/lib/lp/app/browser/vocabulary.py
index f92c7a5..3bfdeed 100644
--- a/lib/lp/app/browser/vocabulary.py
+++ b/lib/lp/app/browser/vocabulary.py
@@ -3,8 +3,6 @@
"""Views which export vocabularies as JSON for widgets."""
-__metaclass__ = type
-
__all__ = [
'HugeVocabularyJSONView',
'IPickerEntrySource',
diff --git a/lib/lp/app/browser/webservice.py b/lib/lp/app/browser/webservice.py
index aef41b2..a0cb712 100644
--- a/lib/lp/app/browser/webservice.py
+++ b/lib/lp/app/browser/webservice.py
@@ -3,7 +3,6 @@
"""Adapters for registry objects for the webservice."""
-__metaclass__ = type
__all__ = []
from lazr.restful.interfaces import (
diff --git a/lib/lp/app/enums.py b/lib/lp/app/enums.py
index dd44d22..c9ebe8f 100644
--- a/lib/lp/app/enums.py
+++ b/lib/lp/app/enums.py
@@ -3,7 +3,6 @@
"""Enumerations and related utilities used in the lp/app modules."""
-__metaclass__ = type
__all__ = [
'FREE_INFORMATION_TYPES',
'FREE_PRIVATE_INFORMATION_TYPES',
diff --git a/lib/lp/app/errors.py b/lib/lp/app/errors.py
index af5c4fa..cae54f4 100644
--- a/lib/lp/app/errors.py
+++ b/lib/lp/app/errors.py
@@ -3,7 +3,6 @@
"""Cross application type errors for launchpad."""
-__metaclass__ = type
__all__ = [
'GoneError',
'IncompatibleArguments',
diff --git a/lib/lp/app/interfaces/headings.py b/lib/lp/app/interfaces/headings.py
index 1c1fe71..5c50232 100644
--- a/lib/lp/app/interfaces/headings.py
+++ b/lib/lp/app/interfaces/headings.py
@@ -3,7 +3,6 @@
"""Marker interfaces that define how to generate headings for a view."""
-__metaclass__ = type
__all__ = [
'IHeadingBreadcrumb',
'IMajorHeadingView',
diff --git a/lib/lp/app/interfaces/informationtype.py b/lib/lp/app/interfaces/informationtype.py
index f0ed1f9..dc100fd 100644
--- a/lib/lp/app/interfaces/informationtype.py
+++ b/lib/lp/app/interfaces/informationtype.py
@@ -1,7 +1,6 @@
# Copyright 2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'IInformationType',
]
diff --git a/lib/lp/app/interfaces/launchpad.py b/lib/lp/app/interfaces/launchpad.py
index 2ab8033..b140b6b 100644
--- a/lib/lp/app/interfaces/launchpad.py
+++ b/lib/lp/app/interfaces/launchpad.py
@@ -6,8 +6,6 @@
Note that these are not interfaces to application content objects.
"""
-__metaclass__ = type
-
__all__ = [
'IHasIcon',
'IHasLogo',
diff --git a/lib/lp/app/interfaces/security.py b/lib/lp/app/interfaces/security.py
index f79db45..3c875fc 100644
--- a/lib/lp/app/interfaces/security.py
+++ b/lib/lp/app/interfaces/security.py
@@ -3,8 +3,6 @@
"""Interfaces for the Launchpad security policy."""
-__metaclass__ = type
-
__all__ = [
'IAuthorization',
]
diff --git a/lib/lp/app/interfaces/services.py b/lib/lp/app/interfaces/services.py
index 15ddefe..92a36ba 100644
--- a/lib/lp/app/interfaces/services.py
+++ b/lib/lp/app/interfaces/services.py
@@ -3,9 +3,6 @@
"""Interfaces used for named services."""
-
-__metaclass__ = type
-
__all__ = [
'IService',
'IServiceFactory',
diff --git a/lib/lp/app/javascript/tests/test_lp_client_integration.py.disabled b/lib/lp/app/javascript/tests/test_lp_client_integration.py.disabled
index 2ec92eb..ac74517 100644
--- a/lib/lp/app/javascript/tests/test_lp_client_integration.py.disabled
+++ b/lib/lp/app/javascript/tests/test_lp_client_integration.py.disabled
@@ -4,7 +4,6 @@
"""Support for the lp.client YUIXHR tests.
"""
-__metaclass__ = type
__all__ = []
from zope.traversing.browser import absoluteURL
diff --git a/lib/lp/app/model/launchpad.py b/lib/lp/app/model/launchpad.py
index 39253cd..22156c3 100644
--- a/lib/lp/app/model/launchpad.py
+++ b/lib/lp/app/model/launchpad.py
@@ -3,8 +3,6 @@
"""Common implementation of interfaces.launchpad interfaces."""
-__metaclass__ = type
-
__all__ = [
'ExceptionPrivacy',
'InformationTypeMixin',
diff --git a/lib/lp/app/security.py b/lib/lp/app/security.py
index 08fe1e5..e3fb8b1 100644
--- a/lib/lp/app/security.py
+++ b/lib/lp/app/security.py
@@ -3,8 +3,6 @@
"""Base class to implement the Launchpad security policy."""
-__metaclass__ = type
-
__all__ = [
'AnonymousAuthorization',
'AuthorizationBase',
diff --git a/lib/lp/app/services.py b/lib/lp/app/services.py
index 05e0d4f..154d44f 100644
--- a/lib/lp/app/services.py
+++ b/lib/lp/app/services.py
@@ -3,7 +3,6 @@
"""Factory used to get named services."""
-__metaclass__ = type
__all__ = [
'ServiceFactory',
]
diff --git a/lib/lp/app/tests/test_errors.py b/lib/lp/app/tests/test_errors.py
index 06bc4c1..a10eeb1 100644
--- a/lib/lp/app/tests/test_errors.py
+++ b/lib/lp/app/tests/test_errors.py
@@ -1,8 +1,6 @@
# Copyright 2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from six.moves.http_client import (
BAD_REQUEST,
UNAUTHORIZED,
diff --git a/lib/lp/app/tests/test_information_type_vocabulary.py b/lib/lp/app/tests/test_information_type_vocabulary.py
index 328c88b..7eaee97 100644
--- a/lib/lp/app/tests/test_information_type_vocabulary.py
+++ b/lib/lp/app/tests/test_information_type_vocabulary.py
@@ -3,8 +3,6 @@
"""Test the information type vocabulary."""
-__metaclass__ = type
-
from testtools.matchers import MatchesStructure
from lp.app.enums import InformationType
diff --git a/lib/lp/app/tests/test_launchpad.py b/lib/lp/app/tests/test_launchpad.py
index 2809569..f506a8f 100644
--- a/lib/lp/app/tests/test_launchpad.py
+++ b/lib/lp/app/tests/test_launchpad.py
@@ -3,8 +3,6 @@
"""Tests for launchpad classes."""
-__metaclass__ = type
-
from zope.security.interfaces import (
Forbidden,
ForbiddenAttribute,
diff --git a/lib/lp/app/tests/test_security.py b/lib/lp/app/tests/test_security.py
index 89b4ceb..febb5b9 100644
--- a/lib/lp/app/tests/test_security.py
+++ b/lib/lp/app/tests/test_security.py
@@ -1,8 +1,6 @@
# Copyright 2009-2015 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from zope.component import (
getSiteManager,
getUtility,
diff --git a/lib/lp/app/tests/test_validation.py b/lib/lp/app/tests/test_validation.py
index c300b51..7af94a1 100644
--- a/lib/lp/app/tests/test_validation.py
+++ b/lib/lp/app/tests/test_validation.py
@@ -3,8 +3,6 @@
"""Module docstring goes here."""
-__metaclass__ = type
-
from doctest import (
DocTestSuite,
ELLIPSIS,
diff --git a/lib/lp/app/tests/test_versioninfo.py b/lib/lp/app/tests/test_versioninfo.py
index 3515679..c73ec65 100644
--- a/lib/lp/app/tests/test_versioninfo.py
+++ b/lib/lp/app/tests/test_versioninfo.py
@@ -1,8 +1,6 @@
# Copyright 2010-2016 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
import os.path
import subprocess
import unittest
diff --git a/lib/lp/app/tests/test_yuitests.py b/lib/lp/app/tests/test_yuitests.py
index 1620c58..0d70d04 100644
--- a/lib/lp/app/tests/test_yuitests.py
+++ b/lib/lp/app/tests/test_yuitests.py
@@ -3,7 +3,6 @@
"""Run YUI.test tests."""
-__metaclass__ = type
__all__ = []
from lp.testing import (
diff --git a/lib/lp/app/utilities/celebrities.py b/lib/lp/app/utilities/celebrities.py
index 35e6d8a..99a7f70 100644
--- a/lib/lp/app/utilities/celebrities.py
+++ b/lib/lp/app/utilities/celebrities.py
@@ -3,7 +3,6 @@
"""Classes that implement ICelebrity interfaces."""
-__metaclass__ = type
__all__ = ['LaunchpadCelebrities']
from zope.component import getUtility
diff --git a/lib/lp/app/validators/__init__.py b/lib/lp/app/validators/__init__.py
index 70d9ab7..0a6bdd8 100644
--- a/lib/lp/app/validators/__init__.py
+++ b/lib/lp/app/validators/__init__.py
@@ -9,8 +9,6 @@ PostgreSQL as stored procedures.
See README.txt for discussion
"""
-__metaclass__ = type
-
from zope.formlib.exception import (
WidgetInputErrorView as Z3WidgetInputErrorView,
)
diff --git a/lib/lp/app/validators/attachment.py b/lib/lp/app/validators/attachment.py
index a998673..404790f 100644
--- a/lib/lp/app/validators/attachment.py
+++ b/lib/lp/app/validators/attachment.py
@@ -3,7 +3,6 @@
"""Validators for attachments."""
-__metaclass__ = type
__all__ = ['attachment_size_constraint']
from lp.app.validators import LaunchpadValidationError
diff --git a/lib/lp/app/validators/cve.py b/lib/lp/app/validators/cve.py
index 93c4f35..6557f30 100644
--- a/lib/lp/app/validators/cve.py
+++ b/lib/lp/app/validators/cve.py
@@ -1,8 +1,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
import re
diff --git a/lib/lp/app/validators/email.py b/lib/lp/app/validators/email.py
index 8f57276..c6a5ded 100644
--- a/lib/lp/app/validators/email.py
+++ b/lib/lp/app/validators/email.py
@@ -3,8 +3,6 @@
"""EmailAdress validator"""
-__metaclass__ = type
-
import re
from lp import _
diff --git a/lib/lp/app/validators/name.py b/lib/lp/app/validators/name.py
index 5b2575f..b4bcec2 100644
--- a/lib/lp/app/validators/name.py
+++ b/lib/lp/app/validators/name.py
@@ -3,8 +3,6 @@
"""Validators for the .name attribute (defined in various schemas.)"""
-__metaclass__ = type
-
import re
from textwrap import dedent
diff --git a/lib/lp/app/validators/path.py b/lib/lp/app/validators/path.py
index 92fc3c6..420c58f 100644
--- a/lib/lp/app/validators/path.py
+++ b/lib/lp/app/validators/path.py
@@ -3,7 +3,6 @@
"""Validators for paths and path functions."""
-__metaclass__ = type
__all__ = [
'path_does_not_escape'
]
diff --git a/lib/lp/app/validators/tests/__init__.py b/lib/lp/app/validators/tests/__init__.py
index ba0fbb0..bec2275 100644
--- a/lib/lp/app/validators/tests/__init__.py
+++ b/lib/lp/app/validators/tests/__init__.py
@@ -2,5 +2,3 @@
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Module docstring goes here."""
-
-__metaclass__ = type
diff --git a/lib/lp/app/validators/tests/test_doc.py b/lib/lp/app/validators/tests/test_doc.py
index d9031ca..fb02802 100644
--- a/lib/lp/app/validators/tests/test_doc.py
+++ b/lib/lp/app/validators/tests/test_doc.py
@@ -3,8 +3,6 @@
"""Tests for the validators."""
-__metaclass__ = type
-
import unittest
from lp.testing.layers import LaunchpadFunctionalLayer
diff --git a/lib/lp/app/validators/tests/test_path.py b/lib/lp/app/validators/tests/test_path.py
index af03fde..c76b7ce 100644
--- a/lib/lp/app/validators/tests/test_path.py
+++ b/lib/lp/app/validators/tests/test_path.py
@@ -3,8 +3,6 @@
"""Tests for path validators."""
-__metaclass__ = type
-
from lp.app.validators import LaunchpadValidationError
from lp.app.validators.path import path_does_not_escape
from lp.testing import TestCase
diff --git a/lib/lp/app/validators/tests/test_validation.py b/lib/lp/app/validators/tests/test_validation.py
index 83736e8..1231260 100644
--- a/lib/lp/app/validators/tests/test_validation.py
+++ b/lib/lp/app/validators/tests/test_validation.py
@@ -3,8 +3,6 @@
"""Unit tests for field validators"""
-__metaclass__ = type
-
from lp.app.validators.validation import validate_oci_branch_name
from lp.testing import TestCase
from lp.testing.layers import BaseLayer
diff --git a/lib/lp/app/validators/tests/test_validators.py b/lib/lp/app/validators/tests/test_validators.py
index af97c8a..83a109c 100644
--- a/lib/lp/app/validators/tests/test_validators.py
+++ b/lib/lp/app/validators/tests/test_validators.py
@@ -3,8 +3,6 @@
"""Module docstring goes here."""
-__metaclass__ = type
-
from doctest import (
DocTestSuite,
ELLIPSIS,
diff --git a/lib/lp/app/validators/url.py b/lib/lp/app/validators/url.py
index 8dcc05b..dd29b7a 100644
--- a/lib/lp/app/validators/url.py
+++ b/lib/lp/app/validators/url.py
@@ -1,8 +1,6 @@
# Copyright 2009-2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = [
'builder_url_validator',
'valid_absolute_url',
diff --git a/lib/lp/app/validators/username.py b/lib/lp/app/validators/username.py
index acfe874..252aafd 100644
--- a/lib/lp/app/validators/username.py
+++ b/lib/lp/app/validators/username.py
@@ -3,8 +3,6 @@
"""Validators for the clean-username (`Person.name`) attribute."""
-__metaclass__ = type
-
import re
from textwrap import dedent
diff --git a/lib/lp/app/validators/validation.py b/lib/lp/app/validators/validation.py
index 244aec9..b0a97c4 100644
--- a/lib/lp/app/validators/validation.py
+++ b/lib/lp/app/validators/validation.py
@@ -1,8 +1,6 @@
# Copyright 2009-2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = [
'can_be_nominated_for_series',
'valid_cve_sequence',
diff --git a/lib/lp/app/validators/version.py b/lib/lp/app/validators/version.py
index 170b869..5f4cf64 100644
--- a/lib/lp/app/validators/version.py
+++ b/lib/lp/app/validators/version.py
@@ -1,9 +1,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
-
def valid_debian_version(version):
"""
Returns True if version is a valid debian version string
diff --git a/lib/lp/app/vocabularies.py b/lib/lp/app/vocabularies.py
index 8745dd4..a6e7a87 100644
--- a/lib/lp/app/vocabularies.py
+++ b/lib/lp/app/vocabularies.py
@@ -21,8 +21,6 @@ class IFoo(Interface):
The binding of name -> class is done in the configure.zcml
"""
-__metaclass__ = type
-
__all__ = [
'InformationTypeVocabulary',
]
diff --git a/lib/lp/app/webservice/marshallers.py b/lib/lp/app/webservice/marshallers.py
index b67dc49..b90f549 100644
--- a/lib/lp/app/webservice/marshallers.py
+++ b/lib/lp/app/webservice/marshallers.py
@@ -3,8 +3,6 @@
"""Launchpad-specific field marshallers for the web service."""
-__metaclass__ = type
-
__all__ = [
'TextFieldMarshaller',
]
diff --git a/lib/lp/app/webservice/tests/test_marshallers.py b/lib/lp/app/webservice/tests/test_marshallers.py
index 08c2068..1a6ce21 100644
--- a/lib/lp/app/webservice/tests/test_marshallers.py
+++ b/lib/lp/app/webservice/tests/test_marshallers.py
@@ -3,8 +3,6 @@
"""Tests for the webservice marshallers."""
-__metaclass__ = type
-
from testtools.matchers import (
Equals,
MatchesDict,
diff --git a/lib/lp/app/widgets/announcementdate.py b/lib/lp/app/widgets/announcementdate.py
index 65859ae..c091dcb 100644
--- a/lib/lp/app/widgets/announcementdate.py
+++ b/lib/lp/app/widgets/announcementdate.py
@@ -1,8 +1,6 @@
# Copyright 2009-2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from datetime import datetime
import pytz
diff --git a/lib/lp/app/widgets/date.py b/lib/lp/app/widgets/date.py
index 4d58907..7d9a780 100644
--- a/lib/lp/app/widgets/date.py
+++ b/lib/lp/app/widgets/date.py
@@ -11,8 +11,6 @@ templates/archive-subscribers.pt for an example.
We should investigate zc.datewidget available from the Z3 SVN repository.
"""
-__metaclass__ = type
-
__all__ = [
'DateTimeWidget',
'DateWidget',
diff --git a/lib/lp/app/widgets/image.py b/lib/lp/app/widgets/image.py
index 03fca1f..8dc6587 100644
--- a/lib/lp/app/widgets/image.py
+++ b/lib/lp/app/widgets/image.py
@@ -1,8 +1,6 @@
# Copyright 2009-2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from io import BytesIO
from zope.component import getUtility
diff --git a/lib/lp/app/widgets/itemswidgets.py b/lib/lp/app/widgets/itemswidgets.py
index 1dbb59f..571f65f 100644
--- a/lib/lp/app/widgets/itemswidgets.py
+++ b/lib/lp/app/widgets/itemswidgets.py
@@ -3,8 +3,6 @@
"""Widgets dealing with a choice of options."""
-__metaclass__ = type
-
__all__ = [
'CheckBoxMatrixWidget',
'LabeledMultiCheckBoxWidget',
diff --git a/lib/lp/app/widgets/launchpadtarget.py b/lib/lp/app/widgets/launchpadtarget.py
index de3dbe7..57d684e 100644
--- a/lib/lp/app/widgets/launchpadtarget.py
+++ b/lib/lp/app/widgets/launchpadtarget.py
@@ -1,8 +1,6 @@
# Copyright 2009-2021 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from zope.browserpage import ViewPageTemplateFile
from zope.component import getUtility
from zope.formlib.interfaces import (
diff --git a/lib/lp/app/widgets/owner.py b/lib/lp/app/widgets/owner.py
index 3336a24..e9fccae 100644
--- a/lib/lp/app/widgets/owner.py
+++ b/lib/lp/app/widgets/owner.py
@@ -1,8 +1,6 @@
# Copyright 2009-2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from zope.component import getUtility
from zope.formlib.interfaces import (
IBrowserWidget,
diff --git a/lib/lp/app/widgets/popup.py b/lib/lp/app/widgets/popup.py
index 100c48b..d5e4ec5 100644
--- a/lib/lp/app/widgets/popup.py
+++ b/lib/lp/app/widgets/popup.py
@@ -3,7 +3,6 @@
"""Single selection widget using a popup to select one item from many."""
-__metaclass__ = type
__all__ = [
"BugTrackerPickerWidget",
"DistributionSourcePackagePickerWidget",
diff --git a/lib/lp/app/widgets/product.py b/lib/lp/app/widgets/product.py
index e3c9d57..86e1d91 100644
--- a/lib/lp/app/widgets/product.py
+++ b/lib/lp/app/widgets/product.py
@@ -3,7 +3,6 @@
"""Widgets related to IProduct."""
-__metaclass__ = type
__all__ = [
'GhostCheckBoxWidget',
'GhostWidget',
diff --git a/lib/lp/app/widgets/project.py b/lib/lp/app/widgets/project.py
index 9eb1f8d..4e5b796 100644
--- a/lib/lp/app/widgets/project.py
+++ b/lib/lp/app/widgets/project.py
@@ -3,8 +3,6 @@
"""Widgets related to IProjectGroup."""
-__metaclass__ = type
-
from textwrap import dedent
from zope.formlib.interfaces import (
diff --git a/lib/lp/app/widgets/suggestion.py b/lib/lp/app/widgets/suggestion.py
index 73e79b5..dc2a13e 100644
--- a/lib/lp/app/widgets/suggestion.py
+++ b/lib/lp/app/widgets/suggestion.py
@@ -3,7 +3,6 @@
"""Widgets related to IBranch."""
-__metaclass__ = type
__all__ = [
'RecipeOwnerWidget',
'TargetBranchWidget',
diff --git a/lib/lp/app/widgets/tests/test_datetime.py b/lib/lp/app/widgets/tests/test_datetime.py
index 8e3c2e6..fb1f8df 100644
--- a/lib/lp/app/widgets/tests/test_datetime.py
+++ b/lib/lp/app/widgets/tests/test_datetime.py
@@ -1,8 +1,6 @@
# Copyright 2011-2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from datetime import datetime
from zope.formlib.interfaces import ConversionError
diff --git a/lib/lp/app/widgets/tests/test_itemswidgets.py b/lib/lp/app/widgets/tests/test_itemswidgets.py
index 5976191..51b31e2 100644
--- a/lib/lp/app/widgets/tests/test_itemswidgets.py
+++ b/lib/lp/app/widgets/tests/test_itemswidgets.py
@@ -1,8 +1,6 @@
# Copyright 2011-2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
import doctest
from lazr.enum import (
diff --git a/lib/lp/app/widgets/tests/test_launchpadtarget.py b/lib/lp/app/widgets/tests/test_launchpadtarget.py
index dca46dc..5deb272 100644
--- a/lib/lp/app/widgets/tests/test_launchpadtarget.py
+++ b/lib/lp/app/widgets/tests/test_launchpadtarget.py
@@ -1,8 +1,6 @@
# Copyright 2011-2020 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
import re
from lazr.restful.fields import Reference
diff --git a/lib/lp/app/widgets/tests/test_popup.py b/lib/lp/app/widgets/tests/test_popup.py
index 95bfc9c..d57d3b3 100644
--- a/lib/lp/app/widgets/tests/test_popup.py
+++ b/lib/lp/app/widgets/tests/test_popup.py
@@ -1,8 +1,6 @@
# Copyright 2010-2016 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
import simplejson
import six
from zope.interface import Interface
diff --git a/lib/lp/app/widgets/tests/test_suggestion.py b/lib/lp/app/widgets/tests/test_suggestion.py
index e1b897d..cb1b031 100644
--- a/lib/lp/app/widgets/tests/test_suggestion.py
+++ b/lib/lp/app/widgets/tests/test_suggestion.py
@@ -1,9 +1,6 @@
# Copyright 2011-2018 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/app/widgets/tests/test_widget_doctests.py b/lib/lp/app/widgets/tests/test_widget_doctests.py
index cbad1dc..c83e746 100644
--- a/lib/lp/app/widgets/tests/test_widget_doctests.py
+++ b/lib/lp/app/widgets/tests/test_widget_doctests.py
@@ -1,8 +1,6 @@
# Copyright 2009-2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
import doctest
import unittest
diff --git a/lib/lp/archivepublisher/archivegpgsigningkey.py b/lib/lp/archivepublisher/archivegpgsigningkey.py
index 4c3688d..c32bd9a 100644
--- a/lib/lp/archivepublisher/archivegpgsigningkey.py
+++ b/lib/lp/archivepublisher/archivegpgsigningkey.py
@@ -3,8 +3,6 @@
"""ArchiveGPGSigningKey implementation."""
-__metaclass__ = type
-
__all__ = [
'ArchiveGPGSigningKey',
'SignableArchive',
diff --git a/lib/lp/archivepublisher/customupload.py b/lib/lp/archivepublisher/customupload.py
index 42dfea3..814ea29 100644
--- a/lib/lp/archivepublisher/customupload.py
+++ b/lib/lp/archivepublisher/customupload.py
@@ -11,8 +11,6 @@ Custom uploads include Debian installer packages, dist upgraders and
DDTP (Debian Description Translation Project) tarballs.
"""
-__metaclass__ = type
-
__all__ = ['CustomUpload']
import os
diff --git a/lib/lp/archivepublisher/ddtp_tarball.py b/lib/lp/archivepublisher/ddtp_tarball.py
index e894ea2..d0f4c60 100644
--- a/lib/lp/archivepublisher/ddtp_tarball.py
+++ b/lib/lp/archivepublisher/ddtp_tarball.py
@@ -10,8 +10,6 @@ DDTP-TARBALL is a custom format upload supported by Launchpad infrastructure
to enable developers to publish indexes of DDTP contents.
"""
-__metaclass__ = type
-
__all__ = [
'DdtpTarballUpload',
]
diff --git a/lib/lp/archivepublisher/deathrow.py b/lib/lp/archivepublisher/deathrow.py
index 7570e96..87722a3 100644
--- a/lib/lp/archivepublisher/deathrow.py
+++ b/lib/lp/archivepublisher/deathrow.py
@@ -4,7 +4,6 @@
"""
Processes removals of packages that are scheduled for deletion.
"""
-__metaclass__ = type
import datetime
import logging
diff --git a/lib/lp/archivepublisher/debian_installer.py b/lib/lp/archivepublisher/debian_installer.py
index 976cf8c..73d84e1 100644
--- a/lib/lp/archivepublisher/debian_installer.py
+++ b/lib/lp/archivepublisher/debian_installer.py
@@ -6,8 +6,6 @@
# This code is mostly owned by Colin Watson and is partly refactored by
# Daniel Silverstone who should be the first point of contact for it.
-__metaclass__ = type
-
__all__ = [
'DebianInstallerUpload',
]
diff --git a/lib/lp/archivepublisher/debversion.py b/lib/lp/archivepublisher/debversion.py
index 8f45ad3..94fe8c4 100644
--- a/lib/lp/archivepublisher/debversion.py
+++ b/lib/lp/archivepublisher/debversion.py
@@ -8,8 +8,6 @@ naturally and represent a Debian version string. It implements various
special methods to make dealing with them sweet.
"""
-__metaclass__ = type
-
# This code came from sourcerer but has been heavily modified since.
import re
diff --git a/lib/lp/archivepublisher/dist_upgrader.py b/lib/lp/archivepublisher/dist_upgrader.py
index f01318c..7564565 100644
--- a/lib/lp/archivepublisher/dist_upgrader.py
+++ b/lib/lp/archivepublisher/dist_upgrader.py
@@ -3,8 +3,6 @@
"""The processing of dist-upgrader tarballs."""
-__metaclass__ = type
-
__all__ = [
'DistUpgraderUpload',
]
diff --git a/lib/lp/archivepublisher/domination.py b/lib/lp/archivepublisher/domination.py
index 42b11a1..3ba380d 100644
--- a/lib/lp/archivepublisher/domination.py
+++ b/lib/lp/archivepublisher/domination.py
@@ -48,8 +48,6 @@ it is performed for each suite using:
"""
-__metaclass__ = type
-
__all__ = ['Dominator']
from collections import defaultdict
diff --git a/lib/lp/archivepublisher/indices.py b/lib/lp/archivepublisher/indices.py
index d737f7a..a88f445 100644
--- a/lib/lp/archivepublisher/indices.py
+++ b/lib/lp/archivepublisher/indices.py
@@ -8,8 +8,6 @@ __all__ = [
'build_translations_stanza_fields',
]
-__metaclass__ = type
-
from collections import OrderedDict
import hashlib
import os.path
diff --git a/lib/lp/archivepublisher/interfaces/archivegpgsigningkey.py b/lib/lp/archivepublisher/interfaces/archivegpgsigningkey.py
index 3aa6d91..f857e90 100644
--- a/lib/lp/archivepublisher/interfaces/archivegpgsigningkey.py
+++ b/lib/lp/archivepublisher/interfaces/archivegpgsigningkey.py
@@ -3,8 +3,6 @@
"""ArchiveGPGSigningKey interface."""
-__metaclass__ = type
-
__all__ = [
'CannotSignArchive',
'IArchiveGPGSigningKey',
diff --git a/lib/lp/archivepublisher/interfaces/publisherconfig.py b/lib/lp/archivepublisher/interfaces/publisherconfig.py
index 92100c6..65e80c9 100644
--- a/lib/lp/archivepublisher/interfaces/publisherconfig.py
+++ b/lib/lp/archivepublisher/interfaces/publisherconfig.py
@@ -3,8 +3,6 @@
"""PublisherConfig interface."""
-__metaclass__ = type
-
__all__ = [
'IPublisherConfig',
'IPublisherConfigSet',
diff --git a/lib/lp/archivepublisher/meta_data.py b/lib/lp/archivepublisher/meta_data.py
index f18b984..b0de662 100644
--- a/lib/lp/archivepublisher/meta_data.py
+++ b/lib/lp/archivepublisher/meta_data.py
@@ -3,7 +3,6 @@
"""Processing of archive meta-data uploads."""
-__metaclass__ = type
__all__ = [
"MetaDataUpload",
]
diff --git a/lib/lp/archivepublisher/model/publisherconfig.py b/lib/lp/archivepublisher/model/publisherconfig.py
index e88bc07..7cc8465 100644
--- a/lib/lp/archivepublisher/model/publisherconfig.py
+++ b/lib/lp/archivepublisher/model/publisherconfig.py
@@ -3,8 +3,6 @@
"""Database class for table PublisherConfig."""
-__metaclass__ = type
-
__all__ = [
'PublisherConfig',
'PublisherConfigSet',
diff --git a/lib/lp/archivepublisher/publishing.py b/lib/lp/archivepublisher/publishing.py
index daea42c..708e9de 100644
--- a/lib/lp/archivepublisher/publishing.py
+++ b/lib/lp/archivepublisher/publishing.py
@@ -10,8 +10,6 @@ __all__ = [
'getPublisher',
]
-__metaclass__ = type
-
import bz2
from collections import defaultdict
from datetime import (
diff --git a/lib/lp/archivepublisher/rosetta_translations.py b/lib/lp/archivepublisher/rosetta_translations.py
index 8718781..3673e05 100644
--- a/lib/lp/archivepublisher/rosetta_translations.py
+++ b/lib/lp/archivepublisher/rosetta_translations.py
@@ -7,8 +7,6 @@ ROSETTA-TRANSLATIONS is a custom format upload supported by Launchpad
infrastructure to enable developers to publish translations.
"""
-__metaclass__ = type
-
__all__ = [
'RosettaTranslationsUpload',
]
diff --git a/lib/lp/archivepublisher/run_parts.py b/lib/lp/archivepublisher/run_parts.py
index cd70f38..6b5bdb3 100644
--- a/lib/lp/archivepublisher/run_parts.py
+++ b/lib/lp/archivepublisher/run_parts.py
@@ -3,7 +3,6 @@
"""Publisher support for running programs from a plug-in directory."""
-__metaclass__ = type
__all__ = [
'execute_subprocess',
'find_run_parts_dir',
diff --git a/lib/lp/archivepublisher/scripts/base.py b/lib/lp/archivepublisher/scripts/base.py
index a627c10..7725447 100644
--- a/lib/lp/archivepublisher/scripts/base.py
+++ b/lib/lp/archivepublisher/scripts/base.py
@@ -4,7 +4,6 @@
"""Publisher script class."""
-__metaclass__ = type
__all__ = [
'PublisherScript',
]
diff --git a/lib/lp/archivepublisher/scripts/copy_signingkeys.py b/lib/lp/archivepublisher/scripts/copy_signingkeys.py
index 2c079e1..5ce7103 100644
--- a/lib/lp/archivepublisher/scripts/copy_signingkeys.py
+++ b/lib/lp/archivepublisher/scripts/copy_signingkeys.py
@@ -3,8 +3,6 @@
"""Script to copy signing keys between archives."""
-__metaclass__ = type
-
__all__ = [
'CopySigningKeysScript',
]
diff --git a/lib/lp/archivepublisher/scripts/generate_contents_files.py b/lib/lp/archivepublisher/scripts/generate_contents_files.py
index 4893523..2fa9d60 100644
--- a/lib/lp/archivepublisher/scripts/generate_contents_files.py
+++ b/lib/lp/archivepublisher/scripts/generate_contents_files.py
@@ -3,7 +3,6 @@
"""Archive Contents files generator."""
-__metaclass__ = type
__all__ = [
'GenerateContentsFiles',
]
diff --git a/lib/lp/archivepublisher/scripts/processaccepted.py b/lib/lp/archivepublisher/scripts/processaccepted.py
index f61edcd..3968e30 100644
--- a/lib/lp/archivepublisher/scripts/processaccepted.py
+++ b/lib/lp/archivepublisher/scripts/processaccepted.py
@@ -3,7 +3,6 @@
"""Helper functions for the process-accepted.py script."""
-__metaclass__ = type
__all__ = [
'ProcessAccepted',
]
diff --git a/lib/lp/archivepublisher/scripts/processdeathrow.py b/lib/lp/archivepublisher/scripts/processdeathrow.py
index f2d9e3b..8173f74 100644
--- a/lib/lp/archivepublisher/scripts/processdeathrow.py
+++ b/lib/lp/archivepublisher/scripts/processdeathrow.py
@@ -5,10 +5,6 @@
This script removes obsolete files from the selected archive(s) pool.
"""
-# Disable warning on catching bare 'Exception', it's needed as a
-# production artifact for continuing processing data that doesn't
-# have problems.
-__metaclass__ = type
__all__ = [
'DeathRowProcessor',
diff --git a/lib/lp/archivepublisher/scripts/publish_ftpmaster.py b/lib/lp/archivepublisher/scripts/publish_ftpmaster.py
index 25c7a21..e691dfc 100644
--- a/lib/lp/archivepublisher/scripts/publish_ftpmaster.py
+++ b/lib/lp/archivepublisher/scripts/publish_ftpmaster.py
@@ -3,7 +3,6 @@
"""Master distro publishing script."""
-__metaclass__ = type
__all__ = [
'PublishFTPMaster',
]
diff --git a/lib/lp/archivepublisher/scripts/sync_signingkeys.py b/lib/lp/archivepublisher/scripts/sync_signingkeys.py
index 68a22d9..816081a 100644
--- a/lib/lp/archivepublisher/scripts/sync_signingkeys.py
+++ b/lib/lp/archivepublisher/scripts/sync_signingkeys.py
@@ -3,9 +3,6 @@
"""Script to inject archive keys into signing service."""
-__metaclass__ = type
-
-
__all__ = [
'SyncSigningKeysScript',
]
diff --git a/lib/lp/archivepublisher/signing.py b/lib/lp/archivepublisher/signing.py
index 2a2f08d..aa3a8c2 100644
--- a/lib/lp/archivepublisher/signing.py
+++ b/lib/lp/archivepublisher/signing.py
@@ -9,8 +9,6 @@ This cannot be done on the build daemons because they are insufficiently
secure to hold signing keys, so we sign them as a custom upload instead.
"""
-__metaclass__ = type
-
__all__ = [
"SigningUpload",
"UefiUpload",
diff --git a/lib/lp/archivepublisher/static_translations.py b/lib/lp/archivepublisher/static_translations.py
index ea2d159..cda8845 100644
--- a/lib/lp/archivepublisher/static_translations.py
+++ b/lib/lp/archivepublisher/static_translations.py
@@ -3,7 +3,6 @@
"""Processing of static translations uploads."""
-__metaclass__ = type
__all__ = [
"StaticTranslationsUpload",
]
diff --git a/lib/lp/archivepublisher/tests/test_archivegpgsigningkey.py b/lib/lp/archivepublisher/tests/test_archivegpgsigningkey.py
index 6632931..13c698d 100644
--- a/lib/lp/archivepublisher/tests/test_archivegpgsigningkey.py
+++ b/lib/lp/archivepublisher/tests/test_archivegpgsigningkey.py
@@ -3,8 +3,6 @@
"""Test ArchiveGPGSigningKey."""
-__metaclass__ = type
-
import os
from textwrap import dedent
from unittest import mock
diff --git a/lib/lp/archivepublisher/tests/test_config.py b/lib/lp/archivepublisher/tests/test_config.py
index 9c11b66..85eed68 100644
--- a/lib/lp/archivepublisher/tests/test_config.py
+++ b/lib/lp/archivepublisher/tests/test_config.py
@@ -6,8 +6,6 @@
Publisher configuration provides archive-dependent filesystem paths.
"""
-__metaclass__ = type
-
import os
from zope.component import getUtility
diff --git a/lib/lp/archivepublisher/tests/test_copy_signingkeys.py b/lib/lp/archivepublisher/tests/test_copy_signingkeys.py
index e821248..3eb0bc6 100644
--- a/lib/lp/archivepublisher/tests/test_copy_signingkeys.py
+++ b/lib/lp/archivepublisher/tests/test_copy_signingkeys.py
@@ -3,8 +3,6 @@
"""Test cases for copying signing keys between archives."""
-__metaclass__ = type
-
from testtools.content import text_content
from testtools.matchers import (
MatchesSetwise,
diff --git a/lib/lp/archivepublisher/tests/test_customupload.py b/lib/lp/archivepublisher/tests/test_customupload.py
index 2a2f0d3..6578b76 100644
--- a/lib/lp/archivepublisher/tests/test_customupload.py
+++ b/lib/lp/archivepublisher/tests/test_customupload.py
@@ -3,9 +3,6 @@
"""Tests for `CustomUploads`."""
-__metaclass__ = type
-
-
import io
import os
import shutil
diff --git a/lib/lp/archivepublisher/tests/test_deathrow.py b/lib/lp/archivepublisher/tests/test_deathrow.py
index ea8427c..c493805 100644
--- a/lib/lp/archivepublisher/tests/test_deathrow.py
+++ b/lib/lp/archivepublisher/tests/test_deathrow.py
@@ -3,9 +3,6 @@
"""Tests for deathrow class."""
-__metaclass__ = type
-
-
import os
import shutil
import tempfile
diff --git a/lib/lp/archivepublisher/tests/test_debversion.py b/lib/lp/archivepublisher/tests/test_debversion.py
index 304aa40..ee252de 100644
--- a/lib/lp/archivepublisher/tests/test_debversion.py
+++ b/lib/lp/archivepublisher/tests/test_debversion.py
@@ -3,8 +3,6 @@
"""Tests for debversion."""
-__metaclass__ = type
-
# These tests came from sourcerer.
import unittest
diff --git a/lib/lp/archivepublisher/tests/test_dominator.py b/lib/lp/archivepublisher/tests/test_dominator.py
index d76e542..c079559 100755
--- a/lib/lp/archivepublisher/tests/test_dominator.py
+++ b/lib/lp/archivepublisher/tests/test_dominator.py
@@ -3,8 +3,6 @@
"""Tests for domination.py."""
-__metaclass__ = type
-
import datetime
from functools import cmp_to_key
from operator import attrgetter
diff --git a/lib/lp/archivepublisher/tests/test_ftparchive.py b/lib/lp/archivepublisher/tests/test_ftparchive.py
index 6a8fe26..139392b 100755
--- a/lib/lp/archivepublisher/tests/test_ftparchive.py
+++ b/lib/lp/archivepublisher/tests/test_ftparchive.py
@@ -3,8 +3,6 @@
"""Tests for ftparchive.py"""
-__metaclass__ = type
-
import difflib
from functools import partial
import gzip
diff --git a/lib/lp/archivepublisher/tests/test_generate_contents_files.py b/lib/lp/archivepublisher/tests/test_generate_contents_files.py
index a71f60c..6116eb8 100644
--- a/lib/lp/archivepublisher/tests/test_generate_contents_files.py
+++ b/lib/lp/archivepublisher/tests/test_generate_contents_files.py
@@ -3,8 +3,6 @@
"""Test for the `generate-contents-files` script."""
-__metaclass__ = type
-
import hashlib
from optparse import OptionValueError
import os
diff --git a/lib/lp/archivepublisher/tests/test_meta_data.py b/lib/lp/archivepublisher/tests/test_meta_data.py
index 1f09337..1348d89 100644
--- a/lib/lp/archivepublisher/tests/test_meta_data.py
+++ b/lib/lp/archivepublisher/tests/test_meta_data.py
@@ -3,8 +3,6 @@
"""Test meta-data custom uploads."""
-__metaclass__ = type
-
import os
from testtools.matchers import (
diff --git a/lib/lp/archivepublisher/tests/test_pool.py b/lib/lp/archivepublisher/tests/test_pool.py
index 3c43ad6..1387697 100644
--- a/lib/lp/archivepublisher/tests/test_pool.py
+++ b/lib/lp/archivepublisher/tests/test_pool.py
@@ -3,8 +3,6 @@
"""Tests for pool.py."""
-__metaclass__ = type
-
import hashlib
import os
import shutil
diff --git a/lib/lp/archivepublisher/tests/test_processdeathrow.py b/lib/lp/archivepublisher/tests/test_processdeathrow.py
index 3c48f98..d8ffe54 100644
--- a/lib/lp/archivepublisher/tests/test_processdeathrow.py
+++ b/lib/lp/archivepublisher/tests/test_processdeathrow.py
@@ -8,8 +8,6 @@ of the module functionality; here we just aim to test that the script
processes its arguments and handles dry-run correctly.
"""
-__metaclass__ = type
-
import datetime
import os
import shutil
diff --git a/lib/lp/archivepublisher/tests/test_publish_ftpmaster.py b/lib/lp/archivepublisher/tests/test_publish_ftpmaster.py
index 5e43664..8e01387 100644
--- a/lib/lp/archivepublisher/tests/test_publish_ftpmaster.py
+++ b/lib/lp/archivepublisher/tests/test_publish_ftpmaster.py
@@ -3,8 +3,6 @@
"""Test publish-ftpmaster cron script."""
-__metaclass__ = type
-
import logging
import os
import stat
diff --git a/lib/lp/archivepublisher/tests/test_publishdistro.py b/lib/lp/archivepublisher/tests/test_publishdistro.py
index c0f88d0..da8f548 100644
--- a/lib/lp/archivepublisher/tests/test_publishdistro.py
+++ b/lib/lp/archivepublisher/tests/test_publishdistro.py
@@ -3,8 +3,6 @@
"""Functional tests for publish-distro.py script."""
-__metaclass__ = type
-
from optparse import OptionValueError
import os
import shutil
diff --git a/lib/lp/archivepublisher/tests/test_publisher.py b/lib/lp/archivepublisher/tests/test_publisher.py
index 9000e9d..247fef3 100644
--- a/lib/lp/archivepublisher/tests/test_publisher.py
+++ b/lib/lp/archivepublisher/tests/test_publisher.py
@@ -3,8 +3,6 @@
"""Tests for publisher class."""
-__metaclass__ = type
-
import bz2
from collections import (
defaultdict,
diff --git a/lib/lp/archivepublisher/tests/test_publisher_documentation.py b/lib/lp/archivepublisher/tests/test_publisher_documentation.py
index c59fce8..0975e30 100644
--- a/lib/lp/archivepublisher/tests/test_publisher_documentation.py
+++ b/lib/lp/archivepublisher/tests/test_publisher_documentation.py
@@ -3,8 +3,6 @@
"""Runs the archivepublisher doctests."""
-__metaclass__ = type
-
import logging
import os
import unittest
diff --git a/lib/lp/archivepublisher/tests/test_publisherconfig.py b/lib/lp/archivepublisher/tests/test_publisherconfig.py
index 63f652c..d42cd50 100644
--- a/lib/lp/archivepublisher/tests/test_publisherconfig.py
+++ b/lib/lp/archivepublisher/tests/test_publisherconfig.py
@@ -3,9 +3,6 @@
"""Tests for publisherConfig model class."""
-__metaclass__ = type
-
-
from storm.exceptions import IntegrityError
from zope.component import getUtility
from zope.interface.verify import verifyObject
diff --git a/lib/lp/archivepublisher/tests/test_repositoryindexfile.py b/lib/lp/archivepublisher/tests/test_repositoryindexfile.py
index c60da47..f4b4995 100644
--- a/lib/lp/archivepublisher/tests/test_repositoryindexfile.py
+++ b/lib/lp/archivepublisher/tests/test_repositoryindexfile.py
@@ -3,8 +3,6 @@
"""Tests for `RepositoryIndexFile`."""
-__metaclass__ = type
-
import bz2
import gzip
import lzma
diff --git a/lib/lp/archivepublisher/tests/test_run_parts.py b/lib/lp/archivepublisher/tests/test_run_parts.py
index b0753a3..0244550 100644
--- a/lib/lp/archivepublisher/tests/test_run_parts.py
+++ b/lib/lp/archivepublisher/tests/test_run_parts.py
@@ -3,8 +3,6 @@
"""Test publisher run-parts handling."""
-__metaclass__ = type
-
import os.path
from fixtures import MonkeyPatch
diff --git a/lib/lp/archivepublisher/tests/test_signing.py b/lib/lp/archivepublisher/tests/test_signing.py
index 20ba90e..f6708fd 100644
--- a/lib/lp/archivepublisher/tests/test_signing.py
+++ b/lib/lp/archivepublisher/tests/test_signing.py
@@ -3,8 +3,6 @@
"""Test UEFI custom uploads."""
-__metaclass__ = type
-
from datetime import datetime
import os
import re
diff --git a/lib/lp/archivepublisher/tests/test_sync_signingkeys.py b/lib/lp/archivepublisher/tests/test_sync_signingkeys.py
index cc01135..9dbc55a 100644
--- a/lib/lp/archivepublisher/tests/test_sync_signingkeys.py
+++ b/lib/lp/archivepublisher/tests/test_sync_signingkeys.py
@@ -7,7 +7,6 @@
"""Test cases for the script that injects signing keys into signing service."""
-__metaclass__ = type
__all__ = [
'SyncSigningKeysScript',
]
diff --git a/lib/lp/archivepublisher/utils.py b/lib/lp/archivepublisher/utils.py
index 3731675..13fc25a 100644
--- a/lib/lp/archivepublisher/utils.py
+++ b/lib/lp/archivepublisher/utils.py
@@ -3,8 +3,6 @@
"""Miscellaneous functions for publisher."""
-__metaclass__ = type
-
__all__ = [
'RepositoryIndexFile',
'get_ppa_reference',
diff --git a/lib/lp/archiveuploader/buildinfofile.py b/lib/lp/archiveuploader/buildinfofile.py
index f2e7bb3..eb00698 100644
--- a/lib/lp/archiveuploader/buildinfofile.py
+++ b/lib/lp/archiveuploader/buildinfofile.py
@@ -3,8 +3,6 @@
"""Build information files."""
-__metaclass__ = type
-
__all__ = [
'BuildInfoFile',
]
diff --git a/lib/lp/archiveuploader/changesfile.py b/lib/lp/archiveuploader/changesfile.py
index 09cb65e..1a28b35 100644
--- a/lib/lp/archiveuploader/changesfile.py
+++ b/lib/lp/archiveuploader/changesfile.py
@@ -7,8 +7,6 @@ Classes representing Changes and DSC files, which encapsulate collections of
files uploaded.
"""
-__metaclass__ = type
-
__all__ = [
'CannotDetermineFileTypeError',
'ChangesFile',
diff --git a/lib/lp/archiveuploader/charmrecipeupload.py b/lib/lp/archiveuploader/charmrecipeupload.py
index e4da3e7..5d08beb 100644
--- a/lib/lp/archiveuploader/charmrecipeupload.py
+++ b/lib/lp/archiveuploader/charmrecipeupload.py
@@ -3,7 +3,6 @@
"""Process a charm recipe upload."""
-__metaclass__ = type
__all__ = [
"CharmRecipeUpload",
]
diff --git a/lib/lp/archiveuploader/dscfile.py b/lib/lp/archiveuploader/dscfile.py
index 7efbc85..0ca6d03 100644
--- a/lib/lp/archiveuploader/dscfile.py
+++ b/lib/lp/archiveuploader/dscfile.py
@@ -7,8 +7,6 @@ Class representing a DSC file, which encapsulates collections of
files representing a source uploaded.
"""
-__metaclass__ = type
-
__all__ = [
'DSCFile',
'DSCUploadedFile',
diff --git a/lib/lp/archiveuploader/livefsupload.py b/lib/lp/archiveuploader/livefsupload.py
index 7eedbe3..4d12f8e 100644
--- a/lib/lp/archiveuploader/livefsupload.py
+++ b/lib/lp/archiveuploader/livefsupload.py
@@ -3,8 +3,6 @@
"""Process a live filesystem upload."""
-__metaclass__ = type
-
import os
from zope.component import getUtility
diff --git a/lib/lp/archiveuploader/nascentupload.py b/lib/lp/archiveuploader/nascentupload.py
index be9cdcc..eba9a06 100644
--- a/lib/lp/archiveuploader/nascentupload.py
+++ b/lib/lp/archiveuploader/nascentupload.py
@@ -16,8 +16,6 @@ Documentation on general design
prepares the email message
"""
-__metaclass__ = type
-
import os
import apt_pkg
diff --git a/lib/lp/archiveuploader/nascentuploadfile.py b/lib/lp/archiveuploader/nascentuploadfile.py
index 5b961f2..b3d68cc 100644
--- a/lib/lp/archiveuploader/nascentuploadfile.py
+++ b/lib/lp/archiveuploader/nascentuploadfile.py
@@ -3,8 +3,6 @@
"""Specific models for uploaded files"""
-__metaclass__ = type
-
__all__ = [
'BaseBinaryUploadFile',
'CustomUploadFile',
diff --git a/lib/lp/archiveuploader/ocirecipeupload.py b/lib/lp/archiveuploader/ocirecipeupload.py
index 516ef90..460b923 100644
--- a/lib/lp/archiveuploader/ocirecipeupload.py
+++ b/lib/lp/archiveuploader/ocirecipeupload.py
@@ -3,7 +3,6 @@
"""Upload OCI build artifacts to the librarian."""
-__metaclass__ = type
__all__ = ['OCIRecipeUpload']
diff --git a/lib/lp/archiveuploader/scripts/processupload.py b/lib/lp/archiveuploader/scripts/processupload.py
index 05a5205..53969bc 100644
--- a/lib/lp/archiveuploader/scripts/processupload.py
+++ b/lib/lp/archiveuploader/scripts/processupload.py
@@ -3,7 +3,6 @@
"""Upload processor for Soyuz."""
-__metaclass__ = type
__all__ = ['ProcessUpload']
import os
diff --git a/lib/lp/archiveuploader/snapupload.py b/lib/lp/archiveuploader/snapupload.py
index 9642d31..80f14ae 100644
--- a/lib/lp/archiveuploader/snapupload.py
+++ b/lib/lp/archiveuploader/snapupload.py
@@ -3,8 +3,6 @@
"""Process a snap package upload."""
-__metaclass__ = type
-
import os
from zope.component import getUtility
diff --git a/lib/lp/archiveuploader/tests/__init__.py b/lib/lp/archiveuploader/tests/__init__.py
index 19a65f2..6fe2757 100644
--- a/lib/lp/archiveuploader/tests/__init__.py
+++ b/lib/lp/archiveuploader/tests/__init__.py
@@ -3,8 +3,6 @@
"""Tests for the archive uploader."""
-__metaclass__ = type
-
__all__ = [
'datadir',
'getPolicy',
diff --git a/lib/lp/archiveuploader/tests/test_buildduploads.py b/lib/lp/archiveuploader/tests/test_buildduploads.py
index 3b764d0..ab8a571 100644
--- a/lib/lp/archiveuploader/tests/test_buildduploads.py
+++ b/lib/lp/archiveuploader/tests/test_buildduploads.py
@@ -3,8 +3,6 @@
"""Test buildd uploads use-cases."""
-__metaclass__ = type
-
import os
from zope.component import getUtility
diff --git a/lib/lp/archiveuploader/tests/test_buildinfofile.py b/lib/lp/archiveuploader/tests/test_buildinfofile.py
index 2724ab7..d14134f 100644
--- a/lib/lp/archiveuploader/tests/test_buildinfofile.py
+++ b/lib/lp/archiveuploader/tests/test_buildinfofile.py
@@ -3,8 +3,6 @@
"""Build information file tests."""
-__metaclass__ = type
-
from debian.deb822 import Changes
from lp.archiveuploader.buildinfofile import BuildInfoFile
diff --git a/lib/lp/archiveuploader/tests/test_changesfile.py b/lib/lp/archiveuploader/tests/test_changesfile.py
index 4e1e318..6ce64e8 100644
--- a/lib/lp/archiveuploader/tests/test_changesfile.py
+++ b/lib/lp/archiveuploader/tests/test_changesfile.py
@@ -3,8 +3,6 @@
"""Test ChangesFile functionality."""
-__metaclass__ = type
-
import os
from debian.deb822 import Changes
diff --git a/lib/lp/archiveuploader/tests/test_charmrecipeupload.py b/lib/lp/archiveuploader/tests/test_charmrecipeupload.py
index e1a989a..edd2da7 100644
--- a/lib/lp/archiveuploader/tests/test_charmrecipeupload.py
+++ b/lib/lp/archiveuploader/tests/test_charmrecipeupload.py
@@ -3,8 +3,6 @@
"""Tests for `CharmRecipeUpload`."""
-__metaclass__ = type
-
import os
from pymacaroons import Macaroon
diff --git a/lib/lp/archiveuploader/tests/test_dscfile.py b/lib/lp/archiveuploader/tests/test_dscfile.py
index 64c0cbf..e1b4404 100644
--- a/lib/lp/archiveuploader/tests/test_dscfile.py
+++ b/lib/lp/archiveuploader/tests/test_dscfile.py
@@ -3,8 +3,6 @@
"""Test dscfile.py"""
-__metaclass__ = type
-
from collections import namedtuple
import os
diff --git a/lib/lp/archiveuploader/tests/test_livefsupload.py b/lib/lp/archiveuploader/tests/test_livefsupload.py
index a54c08a..273773b 100644
--- a/lib/lp/archiveuploader/tests/test_livefsupload.py
+++ b/lib/lp/archiveuploader/tests/test_livefsupload.py
@@ -3,8 +3,6 @@
"""Test uploads of LiveFSBuilds."""
-__metaclass__ = type
-
import os
from storm.store import Store
diff --git a/lib/lp/archiveuploader/tests/test_nascentupload.py b/lib/lp/archiveuploader/tests/test_nascentupload.py
index a599a7b..d7a0a87 100644
--- a/lib/lp/archiveuploader/tests/test_nascentupload.py
+++ b/lib/lp/archiveuploader/tests/test_nascentupload.py
@@ -3,8 +3,6 @@
"""Test NascentUpload functionality."""
-__metaclass__ = type
-
from testtools import TestCase
from testtools.matchers import MatchesStructure
diff --git a/lib/lp/archiveuploader/tests/test_nascentupload_documentation.py b/lib/lp/archiveuploader/tests/test_nascentupload_documentation.py
index 79f19c2..af05764 100644
--- a/lib/lp/archiveuploader/tests/test_nascentupload_documentation.py
+++ b/lib/lp/archiveuploader/tests/test_nascentupload_documentation.py
@@ -3,8 +3,6 @@
"""Runs the doctests for archiveuploader module."""
-__metaclass__ = type
-
import os
import unittest
diff --git a/lib/lp/archiveuploader/tests/test_nascentuploadfile.py b/lib/lp/archiveuploader/tests/test_nascentuploadfile.py
index ce267a4..9dfa59f 100644
--- a/lib/lp/archiveuploader/tests/test_nascentuploadfile.py
+++ b/lib/lp/archiveuploader/tests/test_nascentuploadfile.py
@@ -3,8 +3,6 @@
"""Test NascentUploadFile functionality."""
-__metaclass__ = type
-
from functools import partial
import gzip
import hashlib
diff --git a/lib/lp/archiveuploader/tests/test_ocirecipeupload.py b/lib/lp/archiveuploader/tests/test_ocirecipeupload.py
index 8ec2be1..39cc56b 100644
--- a/lib/lp/archiveuploader/tests/test_ocirecipeupload.py
+++ b/lib/lp/archiveuploader/tests/test_ocirecipeupload.py
@@ -3,8 +3,6 @@
"""Tests for `OCIRecipeUpload`."""
-__metaclass__ = type
-
import json
import os
diff --git a/lib/lp/archiveuploader/tests/test_ppauploadprocessor.py b/lib/lp/archiveuploader/tests/test_ppauploadprocessor.py
index 7e79bf1..e8d1c54 100644
--- a/lib/lp/archiveuploader/tests/test_ppauploadprocessor.py
+++ b/lib/lp/archiveuploader/tests/test_ppauploadprocessor.py
@@ -7,8 +7,6 @@
"""Functional tests for uploadprocessor.py."""
-__metaclass__ = type
-
from operator import itemgetter
import os
import shutil
diff --git a/lib/lp/archiveuploader/tests/test_private_maintainers.py b/lib/lp/archiveuploader/tests/test_private_maintainers.py
index 093aa00..9500ec2 100644
--- a/lib/lp/archiveuploader/tests/test_private_maintainers.py
+++ b/lib/lp/archiveuploader/tests/test_private_maintainers.py
@@ -1,8 +1,6 @@
# Copyright 2012-2018 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from lp.archiveuploader.dscfile import SignableTagFile
from lp.archiveuploader.nascentuploadfile import UploadError
from lp.registry.interfaces.person import PersonVisibility
diff --git a/lib/lp/archiveuploader/tests/test_processupload.py b/lib/lp/archiveuploader/tests/test_processupload.py
index ee6094a..6bfed0f 100644
--- a/lib/lp/archiveuploader/tests/test_processupload.py
+++ b/lib/lp/archiveuploader/tests/test_processupload.py
@@ -1,8 +1,6 @@
# Copyright 2009-2018 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
import os
import shutil
import subprocess
diff --git a/lib/lp/archiveuploader/tests/test_recipeuploads.py b/lib/lp/archiveuploader/tests/test_recipeuploads.py
index a915fcf..49f204a 100644
--- a/lib/lp/archiveuploader/tests/test_recipeuploads.py
+++ b/lib/lp/archiveuploader/tests/test_recipeuploads.py
@@ -3,8 +3,6 @@
"""Test uploads of SourcePackageRecipeBuilds."""
-__metaclass__ = type
-
import os
from storm.store import Store
diff --git a/lib/lp/archiveuploader/tests/test_snapupload.py b/lib/lp/archiveuploader/tests/test_snapupload.py
index 51f6a50..a5b8702 100644
--- a/lib/lp/archiveuploader/tests/test_snapupload.py
+++ b/lib/lp/archiveuploader/tests/test_snapupload.py
@@ -3,8 +3,6 @@
"""Test uploads of SnapBuilds."""
-__metaclass__ = type
-
import os
from pymacaroons import Macaroon
diff --git a/lib/lp/archiveuploader/tests/test_sync_notification.py b/lib/lp/archiveuploader/tests/test_sync_notification.py
index c2e0952..893e391 100644
--- a/lib/lp/archiveuploader/tests/test_sync_notification.py
+++ b/lib/lp/archiveuploader/tests/test_sync_notification.py
@@ -3,8 +3,6 @@
"""Test notification behaviour for cross-distro package syncs."""
-__metaclass__ = type
-
import os.path
from zope.component import getUtility
diff --git a/lib/lp/archiveuploader/tests/test_uploadprocessor.py b/lib/lp/archiveuploader/tests/test_uploadprocessor.py
index 5613177..72e1976 100644
--- a/lib/lp/archiveuploader/tests/test_uploadprocessor.py
+++ b/lib/lp/archiveuploader/tests/test_uploadprocessor.py
@@ -3,7 +3,6 @@
"""Functional tests for uploadprocessor.py."""
-__metaclass__ = type
__all__ = [
"MockOptions",
"TestUploadProcessorBase",
diff --git a/lib/lp/archiveuploader/uploadpolicy.py b/lib/lp/archiveuploader/uploadpolicy.py
index c91e830..88a363d 100644
--- a/lib/lp/archiveuploader/uploadpolicy.py
+++ b/lib/lp/archiveuploader/uploadpolicy.py
@@ -3,8 +3,6 @@
"""Policy management for the upload handler."""
-__metaclass__ = type
-
__all__ = [
"AbstractUploadPolicy",
"ArchiveUploadType",
diff --git a/lib/lp/archiveuploader/uploadprocessor.py b/lib/lp/archiveuploader/uploadprocessor.py
index 0c8911b..1f22f50 100644
--- a/lib/lp/archiveuploader/uploadprocessor.py
+++ b/lib/lp/archiveuploader/uploadprocessor.py
@@ -45,8 +45,6 @@ above, failed being worst).
"""
-__metaclass__ = type
-
import os
import shutil
import sys
diff --git a/lib/lp/archiveuploader/utils.py b/lib/lp/archiveuploader/utils.py
index 721b068..949b37a 100644
--- a/lib/lp/archiveuploader/utils.py
+++ b/lib/lp/archiveuploader/utils.py
@@ -3,8 +3,6 @@
"""Archive uploader utilities."""
-__metaclass__ = type
-
__all__ = [
'determine_binary_file_type',
'determine_source_file_type',
diff --git a/lib/lp/blueprints/adapters.py b/lib/lp/blueprints/adapters.py
index b93d28b..ebd21f0 100644
--- a/lib/lp/blueprints/adapters.py
+++ b/lib/lp/blueprints/adapters.py
@@ -3,8 +3,6 @@
"""Components related to specifications."""
-__metaclass__ = type
-
from zope.interface import implementer
from lp.blueprints.interfaces.specification import ISpecificationDelta
diff --git a/lib/lp/blueprints/browser/person.py b/lib/lp/blueprints/browser/person.py
index a14e7bf..6cef1e5 100644
--- a/lib/lp/blueprints/browser/person.py
+++ b/lib/lp/blueprints/browser/person.py
@@ -1,7 +1,6 @@
# Copyright 2009-2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'PersonSpecsMenu',
'PersonSpecWorkloadTableView',
diff --git a/lib/lp/blueprints/browser/specification.py b/lib/lp/blueprints/browser/specification.py
index 310ae20..cc2d3b0 100644
--- a/lib/lp/blueprints/browser/specification.py
+++ b/lib/lp/blueprints/browser/specification.py
@@ -3,8 +3,6 @@
"""Specification views."""
-__metaclass__ = type
-
__all__ = [
'NewSpecificationFromDistributionView',
'NewSpecificationFromDistroSeriesView',
diff --git a/lib/lp/blueprints/browser/specificationbranch.py b/lib/lp/blueprints/browser/specificationbranch.py
index 6559fff..5894e56 100644
--- a/lib/lp/blueprints/browser/specificationbranch.py
+++ b/lib/lp/blueprints/browser/specificationbranch.py
@@ -3,8 +3,6 @@
"""Specification views."""
-__metaclass__ = type
-
__all__ = [
'BranchLinkToSpecificationView',
'SpecificationBranchStatusView',
diff --git a/lib/lp/blueprints/browser/specificationdependency.py b/lib/lp/blueprints/browser/specificationdependency.py
index 3f63ca1..d31d7a2 100644
--- a/lib/lp/blueprints/browser/specificationdependency.py
+++ b/lib/lp/blueprints/browser/specificationdependency.py
@@ -3,8 +3,6 @@
"""Views for SpecificationDependency."""
-__metaclass__ = type
-
__all__ = [
'SpecificationDependencyAddView',
'SpecificationDependencyRemoveView',
diff --git a/lib/lp/blueprints/browser/specificationgoal.py b/lib/lp/blueprints/browser/specificationgoal.py
index 003d01d..a7d6277 100644
--- a/lib/lp/blueprints/browser/specificationgoal.py
+++ b/lib/lp/blueprints/browser/specificationgoal.py
@@ -3,8 +3,6 @@
"""Views for Specification Goal Setting."""
-__metaclass__ = type
-
__all__ = [
'GoalDecideView',
]
diff --git a/lib/lp/blueprints/browser/specificationsubscription.py b/lib/lp/blueprints/browser/specificationsubscription.py
index 8743fd7..680e585 100644
--- a/lib/lp/blueprints/browser/specificationsubscription.py
+++ b/lib/lp/blueprints/browser/specificationsubscription.py
@@ -3,7 +3,6 @@
"""Views for SpecificationSubscription."""
-__metaclass__ = type
__all__ = [
'SpecificationSubscriptionAddView',
'SpecificationSubscriptionAddSubscriberView',
diff --git a/lib/lp/blueprints/browser/specificationtarget.py b/lib/lp/blueprints/browser/specificationtarget.py
index 32e826d..e7dcbd3 100644
--- a/lib/lp/blueprints/browser/specificationtarget.py
+++ b/lib/lp/blueprints/browser/specificationtarget.py
@@ -3,8 +3,6 @@
"""ISpecificationTarget browser views."""
-__metaclass__ = type
-
__all__ = [
'HasSpecificationsMenuMixin',
'HasSpecificationsView',
diff --git a/lib/lp/blueprints/browser/sprint.py b/lib/lp/blueprints/browser/sprint.py
index 4c342b5..a7f1fdb 100644
--- a/lib/lp/blueprints/browser/sprint.py
+++ b/lib/lp/blueprints/browser/sprint.py
@@ -3,7 +3,6 @@
"""Sprint views."""
-__metaclass__ = type
__all__ = [
'HasSprintsView',
'SprintAddView',
diff --git a/lib/lp/blueprints/browser/sprintattendance.py b/lib/lp/blueprints/browser/sprintattendance.py
index 8a7dca8..87ca4b5 100644
--- a/lib/lp/blueprints/browser/sprintattendance.py
+++ b/lib/lp/blueprints/browser/sprintattendance.py
@@ -3,7 +3,6 @@
"""Views for SprintAttendance."""
-__metaclass__ = type
__all__ = [
'SprintAttendanceAttendView',
'SprintAttendanceRegisterView',
diff --git a/lib/lp/blueprints/browser/sprintspecification.py b/lib/lp/blueprints/browser/sprintspecification.py
index 76fc492..3ecf7c2 100644
--- a/lib/lp/blueprints/browser/sprintspecification.py
+++ b/lib/lp/blueprints/browser/sprintspecification.py
@@ -3,8 +3,6 @@
"""Views for SprintSpecification."""
-__metaclass__ = type
-
__all__ = [
'SprintSpecificationDecideView',
]
diff --git a/lib/lp/blueprints/browser/tests/test_breadcrumbs.py b/lib/lp/blueprints/browser/tests/test_breadcrumbs.py
index 3f63cc4..548ecf2 100644
--- a/lib/lp/blueprints/browser/tests/test_breadcrumbs.py
+++ b/lib/lp/blueprints/browser/tests/test_breadcrumbs.py
@@ -1,8 +1,6 @@
# Copyright 2009-2010 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from lp.services.webapp.publisher import canonical_url
from lp.testing.breadcrumbs import BaseBreadcrumbTestCase
diff --git a/lib/lp/blueprints/browser/tests/test_hasspecifications.py b/lib/lp/blueprints/browser/tests/test_hasspecifications.py
index 4cfcd44..0823061 100644
--- a/lib/lp/blueprints/browser/tests/test_hasspecifications.py
+++ b/lib/lp/blueprints/browser/tests/test_hasspecifications.py
@@ -1,8 +1,6 @@
# Copyright 2010 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from lp.testing import (
login_person,
TestCaseWithFactory,
diff --git a/lib/lp/blueprints/browser/tests/test_menus.py b/lib/lp/blueprints/browser/tests/test_menus.py
index e35d40e..2edb49a 100644
--- a/lib/lp/blueprints/browser/tests/test_menus.py
+++ b/lib/lp/blueprints/browser/tests/test_menus.py
@@ -1,8 +1,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from lp.blueprints.browser.specification import (
SpecificationActionMenu,
SpecificationContextMenu,
diff --git a/lib/lp/blueprints/browser/tests/test_person_upcomingwork.py b/lib/lp/blueprints/browser/tests/test_person_upcomingwork.py
index 26bf983..9c7d459 100644
--- a/lib/lp/blueprints/browser/tests/test_person_upcomingwork.py
+++ b/lib/lp/blueprints/browser/tests/test_person_upcomingwork.py
@@ -1,8 +1,6 @@
# Copyright 2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/blueprints/browser/tests/test_specification.py b/lib/lp/blueprints/browser/tests/test_specification.py
index 6f73882..19596ff 100644
--- a/lib/lp/blueprints/browser/tests/test_specification.py
+++ b/lib/lp/blueprints/browser/tests/test_specification.py
@@ -1,8 +1,6 @@
# Copyright 2009-2017 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from datetime import datetime
import json
import re
diff --git a/lib/lp/blueprints/browser/tests/test_specificationdependency.py b/lib/lp/blueprints/browser/tests/test_specificationdependency.py
index 05d4426..fc0360f 100644
--- a/lib/lp/blueprints/browser/tests/test_specificationdependency.py
+++ b/lib/lp/blueprints/browser/tests/test_specificationdependency.py
@@ -6,8 +6,6 @@
There are also tests in lp/blueprints/stories/blueprints/xx-dependencies.txt.
"""
-__metaclass__ = type
-
from lp.app.enums import InformationType
from lp.registry.enums import SpecificationSharingPolicy
from lp.services.webapp import canonical_url
diff --git a/lib/lp/blueprints/browser/tests/test_specificationsubscription.py b/lib/lp/blueprints/browser/tests/test_specificationsubscription.py
index e2a5684..ab7ff1d 100644
--- a/lib/lp/blueprints/browser/tests/test_specificationsubscription.py
+++ b/lib/lp/blueprints/browser/tests/test_specificationsubscription.py
@@ -1,8 +1,6 @@
# Copyright 2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from lp.testing import (
person_logged_in,
TestCaseWithFactory,
diff --git a/lib/lp/blueprints/browser/tests/test_specificationtarget.py b/lib/lp/blueprints/browser/tests/test_specificationtarget.py
index 58eb759..3364f1b 100644
--- a/lib/lp/blueprints/browser/tests/test_specificationtarget.py
+++ b/lib/lp/blueprints/browser/tests/test_specificationtarget.py
@@ -1,8 +1,6 @@
# Copyright 2009-2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from fixtures import FakeLogger
import six
from zope.component import getUtility
diff --git a/lib/lp/blueprints/browser/tests/test_sprint.py b/lib/lp/blueprints/browser/tests/test_sprint.py
index 8364761..603700d 100644
--- a/lib/lp/blueprints/browser/tests/test_sprint.py
+++ b/lib/lp/blueprints/browser/tests/test_sprint.py
@@ -3,8 +3,6 @@
"""Tests for Sprint pages and views."""
-__metaclass__ = type
-
from fixtures import FakeLogger
from testtools.matchers import Equals
from zope.publisher.interfaces import NotFound
diff --git a/lib/lp/blueprints/enums.py b/lib/lp/blueprints/enums.py
index 69376d5..2c4e3cc 100644
--- a/lib/lp/blueprints/enums.py
+++ b/lib/lp/blueprints/enums.py
@@ -3,7 +3,6 @@
"""Enumerations used in the lp/blueprints modules."""
-__metaclass__ = type
__all__ = [
'NewSpecificationDefinitionStatus',
'SpecificationDefinitionStatus',
diff --git a/lib/lp/blueprints/errors.py b/lib/lp/blueprints/errors.py
index dc71017..478cf9d 100644
--- a/lib/lp/blueprints/errors.py
+++ b/lib/lp/blueprints/errors.py
@@ -3,8 +3,6 @@
"""Specification views."""
-__metaclass__ = type
-
__all__ = [
'TargetAlreadyHasSpecification',
]
diff --git a/lib/lp/blueprints/interfaces/specification.py b/lib/lp/blueprints/interfaces/specification.py
index d56a7de..a2d0308 100644
--- a/lib/lp/blueprints/interfaces/specification.py
+++ b/lib/lp/blueprints/interfaces/specification.py
@@ -3,8 +3,6 @@
"""Specification interfaces."""
-__metaclass__ = type
-
__all__ = [
'GoalProposeError',
'ISpecification',
diff --git a/lib/lp/blueprints/interfaces/specificationbranch.py b/lib/lp/blueprints/interfaces/specificationbranch.py
index e6ca7de..ff08cd0 100644
--- a/lib/lp/blueprints/interfaces/specificationbranch.py
+++ b/lib/lp/blueprints/interfaces/specificationbranch.py
@@ -3,8 +3,6 @@
"""Interfaces for linking Specifications and Branches."""
-__metaclass__ = type
-
__all__ = [
"ISpecificationBranch",
"ISpecificationBranchSet",
diff --git a/lib/lp/blueprints/interfaces/specificationdependency.py b/lib/lp/blueprints/interfaces/specificationdependency.py
index e553ec2..3cbe343 100644
--- a/lib/lp/blueprints/interfaces/specificationdependency.py
+++ b/lib/lp/blueprints/interfaces/specificationdependency.py
@@ -6,8 +6,6 @@ dependency is a second specification, so this is really a way of storing the
order in which specs must be implemented. No attempt is made to prevent
circular dependencies at present."""
-__metaclass__ = type
-
__all__ = [
'ISpecificationDependency',
'ISpecificationDependencyRemoval',
diff --git a/lib/lp/blueprints/interfaces/specificationmessage.py b/lib/lp/blueprints/interfaces/specificationmessage.py
index c656371..84196d3 100644
--- a/lib/lp/blueprints/interfaces/specificationmessage.py
+++ b/lib/lp/blueprints/interfaces/specificationmessage.py
@@ -3,7 +3,6 @@
"""Specification message interfaces."""
-__metaclass__ = type
__all__ = [
'ISpecificationMessage',
'ISpecificationMessageSet',
diff --git a/lib/lp/blueprints/interfaces/specificationsubscription.py b/lib/lp/blueprints/interfaces/specificationsubscription.py
index a69d82d..9978d90 100644
--- a/lib/lp/blueprints/interfaces/specificationsubscription.py
+++ b/lib/lp/blueprints/interfaces/specificationsubscription.py
@@ -3,8 +3,6 @@
"""Specification subscription interfaces."""
-__metaclass__ = type
-
__all__ = [
'ISpecificationSubscription',
]
diff --git a/lib/lp/blueprints/interfaces/specificationtarget.py b/lib/lp/blueprints/interfaces/specificationtarget.py
index 4d10b71..24bb08f 100644
--- a/lib/lp/blueprints/interfaces/specificationtarget.py
+++ b/lib/lp/blueprints/interfaces/specificationtarget.py
@@ -3,8 +3,6 @@
"""Interfaces for things which have Specifications."""
-__metaclass__ = type
-
__all__ = [
'IHasSpecifications',
'ISpecificationTarget',
diff --git a/lib/lp/blueprints/interfaces/specificationworkitem.py b/lib/lp/blueprints/interfaces/specificationworkitem.py
index d8999db..604686c 100644
--- a/lib/lp/blueprints/interfaces/specificationworkitem.py
+++ b/lib/lp/blueprints/interfaces/specificationworkitem.py
@@ -3,8 +3,6 @@
"""SpecificationWorkItem interfaces."""
-__metaclass__ = type
-
__all__ = [
'ISpecificationWorkItem',
'ISpecificationWorkItemSet',
diff --git a/lib/lp/blueprints/interfaces/sprint.py b/lib/lp/blueprints/interfaces/sprint.py
index 89a9aec..213675f 100644
--- a/lib/lp/blueprints/interfaces/sprint.py
+++ b/lib/lp/blueprints/interfaces/sprint.py
@@ -7,8 +7,6 @@ A Sprint basically consists of a bunch of people getting together to discuss
some specific issues.
"""
-__metaclass__ = type
-
__all__ = [
'ISprint',
'IHasSprints',
diff --git a/lib/lp/blueprints/interfaces/sprintattendance.py b/lib/lp/blueprints/interfaces/sprintattendance.py
index aabd4f1..92d8779 100644
--- a/lib/lp/blueprints/interfaces/sprintattendance.py
+++ b/lib/lp/blueprints/interfaces/sprintattendance.py
@@ -3,8 +3,6 @@
"""Sprint Attendance interfaces."""
-__metaclass__ = type
-
__all__ = [
'ISprintAttendance',
]
diff --git a/lib/lp/blueprints/interfaces/sprintspecification.py b/lib/lp/blueprints/interfaces/sprintspecification.py
index 98de6ac..0b57b65 100644
--- a/lib/lp/blueprints/interfaces/sprintspecification.py
+++ b/lib/lp/blueprints/interfaces/sprintspecification.py
@@ -3,8 +3,6 @@
"""Interfaces for linking between Sprint and a Specification."""
-__metaclass__ = type
-
__all__ = [
'ISprintSpecification',
]
diff --git a/lib/lp/blueprints/mail/__init__.py b/lib/lp/blueprints/mail/__init__.py
index c15775f..6b3f0d4 100644
--- a/lib/lp/blueprints/mail/__init__.py
+++ b/lib/lp/blueprints/mail/__init__.py
@@ -1,5 +1,4 @@
# Copyright 2010 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = []
diff --git a/lib/lp/blueprints/mail/notifications.py b/lib/lp/blueprints/mail/notifications.py
index be0b573..dc20868 100644
--- a/lib/lp/blueprints/mail/notifications.py
+++ b/lib/lp/blueprints/mail/notifications.py
@@ -2,8 +2,6 @@
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Event handlers that send email notifications."""
-__metaclass__ = type
-
from lp.blueprints.interfaces.specification import ISpecification
from lp.registry.interfaces.person import IPerson
from lp.services.database.sqlbase import block_implicit_flushes
diff --git a/lib/lp/blueprints/model/specification.py b/lib/lp/blueprints/model/specification.py
index 21032d9..034a7c3 100644
--- a/lib/lp/blueprints/model/specification.py
+++ b/lib/lp/blueprints/model/specification.py
@@ -1,7 +1,6 @@
# Copyright 2009-2021 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'HasSpecificationsMixin',
'recursive_blocked_query',
diff --git a/lib/lp/blueprints/model/specificationbranch.py b/lib/lp/blueprints/model/specificationbranch.py
index 1917c6a..9248256 100644
--- a/lib/lp/blueprints/model/specificationbranch.py
+++ b/lib/lp/blueprints/model/specificationbranch.py
@@ -3,8 +3,6 @@
"""Database classes for linking specifications and branches."""
-__metaclass__ = type
-
__all__ = [
"SpecificationBranch",
"SpecificationBranchSet",
diff --git a/lib/lp/blueprints/model/specificationdependency.py b/lib/lp/blueprints/model/specificationdependency.py
index d8867ba..900c123 100644
--- a/lib/lp/blueprints/model/specificationdependency.py
+++ b/lib/lp/blueprints/model/specificationdependency.py
@@ -1,8 +1,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = ['SpecificationDependency']
from sqlobject import ForeignKey
diff --git a/lib/lp/blueprints/model/specificationmessage.py b/lib/lp/blueprints/model/specificationmessage.py
index 0da83a7..c4b8b61 100644
--- a/lib/lp/blueprints/model/specificationmessage.py
+++ b/lib/lp/blueprints/model/specificationmessage.py
@@ -1,7 +1,6 @@
# Copyright 2009-2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'SpecificationMessage',
'SpecificationMessageSet'
diff --git a/lib/lp/blueprints/model/specificationsearch.py b/lib/lp/blueprints/model/specificationsearch.py
index b8449d8..0e77bc2 100644
--- a/lib/lp/blueprints/model/specificationsearch.py
+++ b/lib/lp/blueprints/model/specificationsearch.py
@@ -3,7 +3,6 @@
"""Helper methods to search specifications."""
-__metaclass__ = type
__all__ = [
'get_specification_filters',
'get_specification_active_product_filter',
diff --git a/lib/lp/blueprints/model/specificationsubscription.py b/lib/lp/blueprints/model/specificationsubscription.py
index 17f70a1..f6244e3 100644
--- a/lib/lp/blueprints/model/specificationsubscription.py
+++ b/lib/lp/blueprints/model/specificationsubscription.py
@@ -1,8 +1,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = ['SpecificationSubscription']
from storm.locals import (
diff --git a/lib/lp/blueprints/model/specificationworkitem.py b/lib/lp/blueprints/model/specificationworkitem.py
index 8490fc8..942dd35 100644
--- a/lib/lp/blueprints/model/specificationworkitem.py
+++ b/lib/lp/blueprints/model/specificationworkitem.py
@@ -1,7 +1,6 @@
# Copyright 2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'SpecificationWorkItem',
]
diff --git a/lib/lp/blueprints/model/sprint.py b/lib/lp/blueprints/model/sprint.py
index ed6748a..65c04b8 100644
--- a/lib/lp/blueprints/model/sprint.py
+++ b/lib/lp/blueprints/model/sprint.py
@@ -1,7 +1,6 @@
# Copyright 2009-2020 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'Sprint',
'SprintSet',
diff --git a/lib/lp/blueprints/model/sprintattendance.py b/lib/lp/blueprints/model/sprintattendance.py
index 2d6509e..1ae9fa0 100644
--- a/lib/lp/blueprints/model/sprintattendance.py
+++ b/lib/lp/blueprints/model/sprintattendance.py
@@ -1,8 +1,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = ['SprintAttendance']
from storm.locals import (
diff --git a/lib/lp/blueprints/model/sprintspecification.py b/lib/lp/blueprints/model/sprintspecification.py
index eed7649..9e4c9d6 100644
--- a/lib/lp/blueprints/model/sprintspecification.py
+++ b/lib/lp/blueprints/model/sprintspecification.py
@@ -1,8 +1,6 @@
# Copyright 2009-2020 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = ['SprintSpecification']
import pytz
diff --git a/lib/lp/blueprints/model/tests/test_specification.py b/lib/lp/blueprints/model/tests/test_specification.py
index b6843ad..e0b94bd 100644
--- a/lib/lp/blueprints/model/tests/test_specification.py
+++ b/lib/lp/blueprints/model/tests/test_specification.py
@@ -3,8 +3,6 @@
"""Unit tests for blueprints here."""
-__metaclass__ = type
-
from testtools.matchers import (
Equals,
MatchesStructure,
diff --git a/lib/lp/blueprints/model/tests/test_sprint.py b/lib/lp/blueprints/model/tests/test_sprint.py
index 18f3d13..1a75d75 100644
--- a/lib/lp/blueprints/model/tests/test_sprint.py
+++ b/lib/lp/blueprints/model/tests/test_sprint.py
@@ -3,8 +3,6 @@
"""Unit test for sprints."""
-__metaclass__ = type
-
import datetime
from pytz import utc
diff --git a/lib/lp/blueprints/model/tests/test_subscription.py b/lib/lp/blueprints/model/tests/test_subscription.py
index 9efc053..8f13314 100644
--- a/lib/lp/blueprints/model/tests/test_subscription.py
+++ b/lib/lp/blueprints/model/tests/test_subscription.py
@@ -1,8 +1,6 @@
# Copyright 2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from zope.component import getUtility
from lp.app.enums import InformationType
diff --git a/lib/lp/blueprints/publisher.py b/lib/lp/blueprints/publisher.py
index 6861332..5fa7214 100644
--- a/lib/lp/blueprints/publisher.py
+++ b/lib/lp/blueprints/publisher.py
@@ -3,7 +3,6 @@
"""Blueprints' custom publication."""
-__metaclass__ = type
__all__ = [
'BlueprintsBrowserRequest',
'BlueprintsLayer',
diff --git a/lib/lp/blueprints/subscribers.py b/lib/lp/blueprints/subscribers.py
index 10f084e..e05fc99 100644
--- a/lib/lp/blueprints/subscribers.py
+++ b/lib/lp/blueprints/subscribers.py
@@ -1,9 +1,6 @@
# Copyright 2009-2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
-
from lp.registry.interfaces.person import IPerson
from lp.services.database.sqlbase import block_implicit_flushes
diff --git a/lib/lp/blueprints/tests/test_hasspecifications.py b/lib/lp/blueprints/tests/test_hasspecifications.py
index dadfb41..68cf57e 100644
--- a/lib/lp/blueprints/tests/test_hasspecifications.py
+++ b/lib/lp/blueprints/tests/test_hasspecifications.py
@@ -3,8 +3,6 @@
"""Unit tests for objects implementing IHasSpecifications."""
-__metaclass__ = type
-
from lp.blueprints.enums import SpecificationDefinitionStatus
from lp.blueprints.interfaces.specificationtarget import IHasSpecifications
from lp.testing import TestCaseWithFactory
diff --git a/lib/lp/blueprints/tests/test_implements.py b/lib/lp/blueprints/tests/test_implements.py
index 5365733..dd20e37 100644
--- a/lib/lp/blueprints/tests/test_implements.py
+++ b/lib/lp/blueprints/tests/test_implements.py
@@ -3,8 +3,6 @@
"""Tests that various objects implement specification-related interfaces."""
-__metaclass__ = type
-
from lp.blueprints.interfaces.specificationtarget import (
IHasSpecifications,
ISpecificationTarget,
diff --git a/lib/lp/blueprints/tests/test_publisher.py b/lib/lp/blueprints/tests/test_publisher.py
index 5c97bb8..ea7a818 100644
--- a/lib/lp/blueprints/tests/test_publisher.py
+++ b/lib/lp/blueprints/tests/test_publisher.py
@@ -3,8 +3,6 @@
"""Tests for blueprints' custom publications."""
-__metaclass__ = type
-
from lp.blueprints.publisher import BlueprintsLayer
from lp.layers import WebServiceLayer
from lp.services.config import config
diff --git a/lib/lp/blueprints/tests/test_specification.py b/lib/lp/blueprints/tests/test_specification.py
index 4bedc0f..3ce41fe 100644
--- a/lib/lp/blueprints/tests/test_specification.py
+++ b/lib/lp/blueprints/tests/test_specification.py
@@ -3,8 +3,6 @@
"""Unit tests for Specification."""
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/blueprints/tests/test_specification_access_policy_triggers.py b/lib/lp/blueprints/tests/test_specification_access_policy_triggers.py
index f022c21..0d6f8bb 100644
--- a/lib/lp/blueprints/tests/test_specification_access_policy_triggers.py
+++ b/lib/lp/blueprints/tests/test_specification_access_policy_triggers.py
@@ -1,8 +1,6 @@
# Copyright 2013 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
diff --git a/lib/lp/blueprints/tests/test_webservice.py b/lib/lp/blueprints/tests/test_webservice.py
index 2e3216a..b0b7582 100644
--- a/lib/lp/blueprints/tests/test_webservice.py
+++ b/lib/lp/blueprints/tests/test_webservice.py
@@ -3,8 +3,6 @@
"""Webservice unit tests related to Launchpad blueprints."""
-__metaclass__ = type
-
import json
import iso8601
diff --git a/lib/lp/blueprints/vocabularies/specification.py b/lib/lp/blueprints/vocabularies/specification.py
index 032c1f5..2c3222d 100644
--- a/lib/lp/blueprints/vocabularies/specification.py
+++ b/lib/lp/blueprints/vocabularies/specification.py
@@ -3,7 +3,6 @@
"""The vocabularies relating to specifications."""
-__metaclass__ = type
__all__ = [
'SpecificationVocabulary',
]
diff --git a/lib/lp/blueprints/vocabularies/specificationdependency.py b/lib/lp/blueprints/vocabularies/specificationdependency.py
index ff83f67..3f9ee52 100644
--- a/lib/lp/blueprints/vocabularies/specificationdependency.py
+++ b/lib/lp/blueprints/vocabularies/specificationdependency.py
@@ -3,7 +3,6 @@
"""The vocabularies relating to dependencies of specifications."""
-__metaclass__ = type
__all__ = [
'SpecificationDepCandidatesVocabulary',
'SpecificationDependenciesVocabulary',
diff --git a/lib/lp/blueprints/vocabularies/sprint.py b/lib/lp/blueprints/vocabularies/sprint.py
index f98df43..df65163 100644
--- a/lib/lp/blueprints/vocabularies/sprint.py
+++ b/lib/lp/blueprints/vocabularies/sprint.py
@@ -3,7 +3,6 @@
"""The vocabularies relating to sprints."""
-__metaclass__ = type
__all__ = [
'FutureSprintVocabulary',
'SprintVocabulary',
diff --git a/lib/lp/blueprints/vocabularies/tests/test_specificationdependency.py b/lib/lp/blueprints/vocabularies/tests/test_specificationdependency.py
index 6584ff3..f6f015a 100644
--- a/lib/lp/blueprints/vocabularies/tests/test_specificationdependency.py
+++ b/lib/lp/blueprints/vocabularies/tests/test_specificationdependency.py
@@ -6,8 +6,6 @@
There is also a doctest in specificationdepcandidates.txt.
"""
-__metaclass__ = type
-
from zope.schema.vocabulary import getVocabularyRegistry
from lp.services.webapp import canonical_url
diff --git a/lib/lp/bugs/adapters/bug.py b/lib/lp/bugs/adapters/bug.py
index 96db19c..831f312 100644
--- a/lib/lp/bugs/adapters/bug.py
+++ b/lib/lp/bugs/adapters/bug.py
@@ -3,7 +3,6 @@
"""Resources having to do with Launchpad bugs."""
-__metaclass__ = type
__all__ = [
'bugcomment_to_entry',
'bugtask_to_privacy',
diff --git a/lib/lp/bugs/adapters/bugchange.py b/lib/lp/bugs/adapters/bugchange.py
index fb104fa..c7d8dbf 100644
--- a/lib/lp/bugs/adapters/bugchange.py
+++ b/lib/lp/bugs/adapters/bugchange.py
@@ -3,7 +3,6 @@
"""Implementations for bug changes."""
-__metaclass__ = type
__all__ = [
'ATTACHMENT_ADDED',
'ATTACHMENT_REMOVED',
diff --git a/lib/lp/bugs/adapters/bugdelta.py b/lib/lp/bugs/adapters/bugdelta.py
index f9459ff..8d8268c 100644
--- a/lib/lp/bugs/adapters/bugdelta.py
+++ b/lib/lp/bugs/adapters/bugdelta.py
@@ -3,8 +3,6 @@
"""Components related to bugs."""
-__metaclass__ = type
-
from zope.interface import implementer
from lp.bugs.interfaces.bug import IBugDelta
diff --git a/lib/lp/bugs/adapters/bugsubscriptionfilter.py b/lib/lp/bugs/adapters/bugsubscriptionfilter.py
index 27901d7..ba6f3c4 100644
--- a/lib/lp/bugs/adapters/bugsubscriptionfilter.py
+++ b/lib/lp/bugs/adapters/bugsubscriptionfilter.py
@@ -3,7 +3,6 @@
"""Adapt IStructuralSubscription to other types."""
-__metaclass__ = type
__all__ = [
'bugsubscriptionfilter_to_distribution',
'bugsubscriptionfilter_to_product',
diff --git a/lib/lp/bugs/adapters/tests/test_bugchange.py b/lib/lp/bugs/adapters/tests/test_bugchange.py
index 9b86f00..1e473fd 100644
--- a/lib/lp/bugs/adapters/tests/test_bugchange.py
+++ b/lib/lp/bugs/adapters/tests/test_bugchange.py
@@ -3,8 +3,6 @@
"""Functional tests for request_country"""
-__metaclass__ = type
-
from lp.bugs.adapters.bugchange import (
BUG_CHANGE_LOOKUP,
BugDescriptionChange,
diff --git a/lib/lp/bugs/adapters/tests/test_bugsubscriptionfilter.py b/lib/lp/bugs/adapters/tests/test_bugsubscriptionfilter.py
index fe6585e..3a4f5fc 100644
--- a/lib/lp/bugs/adapters/tests/test_bugsubscriptionfilter.py
+++ b/lib/lp/bugs/adapters/tests/test_bugsubscriptionfilter.py
@@ -3,8 +3,6 @@
"""Test IBugSubscriptionFilter adapters"""
-__metaclass__ = type
-
from lp.bugs.adapters.bugsubscriptionfilter import (
bugsubscriptionfilter_to_distribution,
bugsubscriptionfilter_to_product,
diff --git a/lib/lp/bugs/adapters/treelookup.py b/lib/lp/bugs/adapters/treelookup.py
index c1b84f2..218c07b 100644
--- a/lib/lp/bugs/adapters/treelookup.py
+++ b/lib/lp/bugs/adapters/treelookup.py
@@ -30,7 +30,6 @@ conveniences. This makes the generation of lookup trees quite pleasant
on the eye, makes debugging easier, and means they can be customised.
"""
-__metaclass__ = type
__all__ = [
'LookupBranch',
'LookupTree',
diff --git a/lib/lp/bugs/browser/bug.py b/lib/lp/bugs/browser/bug.py
index db87dc8..04c4f69 100644
--- a/lib/lp/bugs/browser/bug.py
+++ b/lib/lp/bugs/browser/bug.py
@@ -3,8 +3,6 @@
"""IBug related view classes."""
-__metaclass__ = type
-
__all__ = [
'BugActivity',
'BugContextMenu',
diff --git a/lib/lp/bugs/browser/bugalsoaffects.py b/lib/lp/bugs/browser/bugalsoaffects.py
index b65e691..d1bfe3e 100644
--- a/lib/lp/bugs/browser/bugalsoaffects.py
+++ b/lib/lp/bugs/browser/bugalsoaffects.py
@@ -1,8 +1,6 @@
# Copyright 2009-2018 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = [
'BugAlsoAffectsProductMetaView',
'BugAlsoAffectsDistroMetaView',
diff --git a/lib/lp/bugs/browser/bugattachment.py b/lib/lp/bugs/browser/bugattachment.py
index e96e9fe..17ac98f 100644
--- a/lib/lp/bugs/browser/bugattachment.py
+++ b/lib/lp/bugs/browser/bugattachment.py
@@ -3,7 +3,6 @@
"""Bug attachment views."""
-__metaclass__ = type
__all__ = [
'BugAttachmentContentCheck',
'BugAttachmentFileNavigation',
diff --git a/lib/lp/bugs/browser/bugbranch.py b/lib/lp/bugs/browser/bugbranch.py
index 7c9582d..e7ea7ab 100644
--- a/lib/lp/bugs/browser/bugbranch.py
+++ b/lib/lp/bugs/browser/bugbranch.py
@@ -3,7 +3,6 @@
"""Browser view classes for BugBranch-related objects."""
-__metaclass__ = type
__all__ = [
'BranchLinkToBugView',
'BugBranchAddView',
diff --git a/lib/lp/bugs/browser/bugcomment.py b/lib/lp/bugs/browser/bugcomment.py
index 16712ea..4687c29 100644
--- a/lib/lp/bugs/browser/bugcomment.py
+++ b/lib/lp/bugs/browser/bugcomment.py
@@ -3,7 +3,6 @@
"""Bug comment browser view classes."""
-__metaclass__ = type
__all__ = [
'BugComment',
'BugCommentBoxExpandedReplyView',
diff --git a/lib/lp/bugs/browser/buglinktarget.py b/lib/lp/bugs/browser/buglinktarget.py
index bf07c2e..122e4f4 100644
--- a/lib/lp/bugs/browser/buglinktarget.py
+++ b/lib/lp/bugs/browser/buglinktarget.py
@@ -3,8 +3,6 @@
"""Views for IBugLinkTarget."""
-__metaclass__ = type
-
__all__ = [
'BugLinkView',
'BugLinksListingView',
diff --git a/lib/lp/bugs/browser/buglisting.py b/lib/lp/bugs/browser/buglisting.py
index 1d1e24e..8e8e49e 100644
--- a/lib/lp/bugs/browser/buglisting.py
+++ b/lib/lp/bugs/browser/buglisting.py
@@ -3,8 +3,6 @@
"""IBugTask-related browser views."""
-__metaclass__ = type
-
__all__ = [
'BugNominationsView',
'BugListingBatchNavigator',
diff --git a/lib/lp/bugs/browser/bugmessage.py b/lib/lp/bugs/browser/bugmessage.py
index 7bf7612..6a69c5c 100644
--- a/lib/lp/bugs/browser/bugmessage.py
+++ b/lib/lp/bugs/browser/bugmessage.py
@@ -3,7 +3,6 @@
"""IBugMessage-related browser view classes."""
-__metaclass__ = type
__all__ = [
'BugMessageAddFormView',
]
diff --git a/lib/lp/bugs/browser/bugnomination.py b/lib/lp/bugs/browser/bugnomination.py
index f4d4222..9839ff8 100644
--- a/lib/lp/bugs/browser/bugnomination.py
+++ b/lib/lp/bugs/browser/bugnomination.py
@@ -3,8 +3,6 @@
"""Browser view classes related to bug nominations."""
-__metaclass__ = type
-
__all__ = [
'BugNominationContextMenu',
'BugNominationView',
diff --git a/lib/lp/bugs/browser/bugsubscription.py b/lib/lp/bugs/browser/bugsubscription.py
index 999e9d1..3d08282 100644
--- a/lib/lp/bugs/browser/bugsubscription.py
+++ b/lib/lp/bugs/browser/bugsubscription.py
@@ -3,7 +3,6 @@
"""Views for BugSubscription."""
-__metaclass__ = type
__all__ = [
'AdvancedSubscriptionMixin',
'BugMuteSelfView',
diff --git a/lib/lp/bugs/browser/bugsubscriptionfilter.py b/lib/lp/bugs/browser/bugsubscriptionfilter.py
index 3bc437d..13f8046 100644
--- a/lib/lp/bugs/browser/bugsubscriptionfilter.py
+++ b/lib/lp/bugs/browser/bugsubscriptionfilter.py
@@ -3,7 +3,6 @@
"""View classes for bug subscription filters."""
-__metaclass__ = type
__all__ = [
"BugSubscriptionFilterView",
]
diff --git a/lib/lp/bugs/browser/bugsupervisor.py b/lib/lp/bugs/browser/bugsupervisor.py
index c58a945..44040f2 100644
--- a/lib/lp/bugs/browser/bugsupervisor.py
+++ b/lib/lp/bugs/browser/bugsupervisor.py
@@ -3,8 +3,6 @@
"""Browser view for bug supervisor."""
-__metaclass__ = type
-
__all__ = [
'BugSupervisorEditView',
]
diff --git a/lib/lp/bugs/browser/bugtarget.py b/lib/lp/bugs/browser/bugtarget.py
index e355b57..4a2e1d4 100644
--- a/lib/lp/bugs/browser/bugtarget.py
+++ b/lib/lp/bugs/browser/bugtarget.py
@@ -3,8 +3,6 @@
"""IBugTarget-related browser views."""
-__metaclass__ = type
-
__all__ = [
"BugsPatchesView",
"BugTargetBugListingView",
diff --git a/lib/lp/bugs/browser/bugtask.py b/lib/lp/bugs/browser/bugtask.py
index 5769a3f..40f8732 100644
--- a/lib/lp/bugs/browser/bugtask.py
+++ b/lib/lp/bugs/browser/bugtask.py
@@ -3,8 +3,6 @@
"""IBugTask-related browser views."""
-__metaclass__ = type
-
__all__ = [
'bugtarget_renderer',
'BugTargetTraversalMixin',
diff --git a/lib/lp/bugs/browser/bugtracker.py b/lib/lp/bugs/browser/bugtracker.py
index 4ba744b..95c1479 100644
--- a/lib/lp/bugs/browser/bugtracker.py
+++ b/lib/lp/bugs/browser/bugtracker.py
@@ -3,8 +3,6 @@
"""Bug tracker views."""
-__metaclass__ = type
-
__all__ = [
'BugTrackerAddView',
'BugTrackerComponentGroupNavigation',
diff --git a/lib/lp/bugs/browser/bugwatch.py b/lib/lp/bugs/browser/bugwatch.py
index 2f70053..516adad 100644
--- a/lib/lp/bugs/browser/bugwatch.py
+++ b/lib/lp/bugs/browser/bugwatch.py
@@ -3,7 +3,6 @@
"""IBugWatch-related browser views."""
-__metaclass__ = type
__all__ = [
'BugWatchSetNavigation',
'BugWatchActivityPortletView',
diff --git a/lib/lp/bugs/browser/cve.py b/lib/lp/bugs/browser/cve.py
index a3e0087..f1d2348 100644
--- a/lib/lp/bugs/browser/cve.py
+++ b/lib/lp/bugs/browser/cve.py
@@ -3,8 +3,6 @@
"""CVE views."""
-__metaclass__ = type
-
__all__ = [
'CveContextMenu',
'CveIndexView',
diff --git a/lib/lp/bugs/browser/cvereport.py b/lib/lp/bugs/browser/cvereport.py
index e799288..aa674e3 100644
--- a/lib/lp/bugs/browser/cvereport.py
+++ b/lib/lp/bugs/browser/cvereport.py
@@ -3,8 +3,6 @@
"""Views to generate CVE reports (as in distro & distroseries/+cve pages)."""
-__metaclass__ = type
-
__all__ = [
'BugTaskCve',
'CVEReportView',
diff --git a/lib/lp/bugs/browser/malone.py b/lib/lp/bugs/browser/malone.py
index cc33d09..bc4271f 100644
--- a/lib/lp/bugs/browser/malone.py
+++ b/lib/lp/bugs/browser/malone.py
@@ -3,7 +3,6 @@
"""Browser code for the malone application."""
-__metaclass__ = type
__all__ = [
'MaloneApplicationNavigation',
'MaloneRelatedPages',
diff --git a/lib/lp/bugs/browser/person.py b/lib/lp/bugs/browser/person.py
index b3f4fae..9372c6d 100644
--- a/lib/lp/bugs/browser/person.py
+++ b/lib/lp/bugs/browser/person.py
@@ -3,8 +3,6 @@
"""IPerson browser views related to bugs."""
-__metaclass__ = type
-
__all__ = [
'PersonBugsMenu',
'PersonCommentedBugTaskSearchListingView',
diff --git a/lib/lp/bugs/browser/structuralsubscription.py b/lib/lp/bugs/browser/structuralsubscription.py
index f8b7eb1..66415f3 100644
--- a/lib/lp/bugs/browser/structuralsubscription.py
+++ b/lib/lp/bugs/browser/structuralsubscription.py
@@ -1,8 +1,6 @@
# Copyright 2009-2018 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = [
'expose_enum_to_js',
'expose_structural_subscription_data_to_js',
diff --git a/lib/lp/bugs/browser/tests/test_breadcrumbs.py b/lib/lp/bugs/browser/tests/test_breadcrumbs.py
index fc76b23..447f47d 100644
--- a/lib/lp/bugs/browser/tests/test_breadcrumbs.py
+++ b/lib/lp/bugs/browser/tests/test_breadcrumbs.py
@@ -1,8 +1,6 @@
# Copyright 2009-2010 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from zope.component import getUtility
from lp.bugs.interfaces.bugtracker import IBugTrackerSet
diff --git a/lib/lp/bugs/browser/tests/test_bug_context_menu.py b/lib/lp/bugs/browser/tests/test_bug_context_menu.py
index 2c0d7b2..ef81c5a 100644
--- a/lib/lp/bugs/browser/tests/test_bug_context_menu.py
+++ b/lib/lp/bugs/browser/tests/test_bug_context_menu.py
@@ -3,8 +3,6 @@
"""Tests for the `BugContextMenu`."""
-__metaclass__ = type
-
from zope.component import getUtility
from lp.bugs.browser.bug import BugContextMenu
diff --git a/lib/lp/bugs/browser/tests/test_bug_views.py b/lib/lp/bugs/browser/tests/test_bug_views.py
index 39f79a8..6984640 100644
--- a/lib/lp/bugs/browser/tests/test_bug_views.py
+++ b/lib/lp/bugs/browser/tests/test_bug_views.py
@@ -3,8 +3,6 @@
"""Tests for Bug Views."""
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/bugs/browser/tests/test_bugalsoaffects.py b/lib/lp/bugs/browser/tests/test_bugalsoaffects.py
index 7d18d9f..49d7885 100644
--- a/lib/lp/bugs/browser/tests/test_bugalsoaffects.py
+++ b/lib/lp/bugs/browser/tests/test_bugalsoaffects.py
@@ -1,8 +1,6 @@
# Copyright 2011-2016 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from zope.security.proxy import removeSecurityProxy
from lp.services.features.testing import FeatureFixture
diff --git a/lib/lp/bugs/browser/tests/test_bugattachment_edit_view.py b/lib/lp/bugs/browser/tests/test_bugattachment_edit_view.py
index bd5f970..c052cf9 100644
--- a/lib/lp/bugs/browser/tests/test_bugattachment_edit_view.py
+++ b/lib/lp/bugs/browser/tests/test_bugattachment_edit_view.py
@@ -1,8 +1,6 @@
# Copyright 2010-2020 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
import transaction
from zope.component import getUtility
diff --git a/lib/lp/bugs/browser/tests/test_bugattachment_file_access.py b/lib/lp/bugs/browser/tests/test_bugattachment_file_access.py
index a517d97..f4a50e0 100644
--- a/lib/lp/bugs/browser/tests/test_bugattachment_file_access.py
+++ b/lib/lp/bugs/browser/tests/test_bugattachment_file_access.py
@@ -1,8 +1,6 @@
# Copyright 2010-2020 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
import re
import requests
diff --git a/lib/lp/bugs/browser/tests/test_bugcomment.py b/lib/lp/bugs/browser/tests/test_bugcomment.py
index 00e8949..c23f3b0 100644
--- a/lib/lp/bugs/browser/tests/test_bugcomment.py
+++ b/lib/lp/bugs/browser/tests/test_bugcomment.py
@@ -3,8 +3,6 @@
"""Tests for the bugcomment module."""
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/bugs/browser/tests/test_buglisting.py b/lib/lp/bugs/browser/tests/test_buglisting.py
index 18ed7db..96ca744 100644
--- a/lib/lp/bugs/browser/tests/test_buglisting.py
+++ b/lib/lp/bugs/browser/tests/test_buglisting.py
@@ -1,8 +1,6 @@
# Copyright 2010-2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
import os
from soupmatchers import (
diff --git a/lib/lp/bugs/browser/tests/test_bugnomination.py b/lib/lp/bugs/browser/tests/test_bugnomination.py
index caab93f..0a32ea2 100644
--- a/lib/lp/bugs/browser/tests/test_bugnomination.py
+++ b/lib/lp/bugs/browser/tests/test_bugnomination.py
@@ -3,8 +3,6 @@
"""Tests for bug nomination views."""
-__metaclass__ = type
-
import re
import soupmatchers
diff --git a/lib/lp/bugs/browser/tests/test_bugs.py b/lib/lp/bugs/browser/tests/test_bugs.py
index b2d3061..8581b03 100644
--- a/lib/lp/bugs/browser/tests/test_bugs.py
+++ b/lib/lp/bugs/browser/tests/test_bugs.py
@@ -3,8 +3,6 @@
"""Unit tests for bug set and bug application views."""
-__metaclass__ = type
-
from zope.component import getUtility
from lp.app.enums import InformationType
diff --git a/lib/lp/bugs/browser/tests/test_bugsubscription_views.py b/lib/lp/bugs/browser/tests/test_bugsubscription_views.py
index 85fc62b..5dc2d09 100644
--- a/lib/lp/bugs/browser/tests/test_bugsubscription_views.py
+++ b/lib/lp/bugs/browser/tests/test_bugsubscription_views.py
@@ -3,8 +3,6 @@
"""Tests for BugSubscription views."""
-__metaclass__ = type
-
import json
from lazr.restful.interfaces import IWebServiceClientRequest
diff --git a/lib/lp/bugs/browser/tests/test_bugsubscriptionfilter.py b/lib/lp/bugs/browser/tests/test_bugsubscriptionfilter.py
index 32635f6..c0db2c2 100644
--- a/lib/lp/bugs/browser/tests/test_bugsubscriptionfilter.py
+++ b/lib/lp/bugs/browser/tests/test_bugsubscriptionfilter.py
@@ -3,8 +3,6 @@
"""Tests for bug subscription filter browser code."""
-__metaclass__ = type
-
import json
from lxml import html
diff --git a/lib/lp/bugs/browser/tests/test_bugsupervisor.py b/lib/lp/bugs/browser/tests/test_bugsupervisor.py
index 4d994af..d59b437 100644
--- a/lib/lp/bugs/browser/tests/test_bugsupervisor.py
+++ b/lib/lp/bugs/browser/tests/test_bugsupervisor.py
@@ -3,8 +3,6 @@
"""Unit tests for bug supervisor views."""
-__metaclass__ = type
-
from zope.component import getUtility
from lp.bugs.browser.bugsupervisor import BugSupervisorEditSchema
diff --git a/lib/lp/bugs/browser/tests/test_bugtarget_configure.py b/lib/lp/bugs/browser/tests/test_bugtarget_configure.py
index c067165..4343482 100644
--- a/lib/lp/bugs/browser/tests/test_bugtarget_configure.py
+++ b/lib/lp/bugs/browser/tests/test_bugtarget_configure.py
@@ -3,8 +3,6 @@
"""Unit tests for bug configuration views."""
-__metaclass__ = type
-
from lp.app.enums import ServiceUsage
from lp.registry.interfaces.person import TeamMembershipPolicy
from lp.testing import (
diff --git a/lib/lp/bugs/browser/tests/test_bugtarget_filebug.py b/lib/lp/bugs/browser/tests/test_bugtarget_filebug.py
index 5d04730..1b50efa 100644
--- a/lib/lp/bugs/browser/tests/test_bugtarget_filebug.py
+++ b/lib/lp/bugs/browser/tests/test_bugtarget_filebug.py
@@ -1,8 +1,6 @@
# Copyright 2010-2020 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from textwrap import dedent
from lazr.restful.interfaces import IJSONRequestCache
diff --git a/lib/lp/bugs/browser/tests/test_bugtarget_patches_view.py b/lib/lp/bugs/browser/tests/test_bugtarget_patches_view.py
index 1099347..690a785 100644
--- a/lib/lp/bugs/browser/tests/test_bugtarget_patches_view.py
+++ b/lib/lp/bugs/browser/tests/test_bugtarget_patches_view.py
@@ -1,9 +1,6 @@
# Copyright 2010 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
-
from lp.bugs.browser.buglisting import (
BugListingPortletStatsView,
DISPLAY_BUG_STATUS_FOR_PATCHES,
diff --git a/lib/lp/bugs/browser/tests/test_bugtarget_subscription.py b/lib/lp/bugs/browser/tests/test_bugtarget_subscription.py
index ffce350..38280d2 100644
--- a/lib/lp/bugs/browser/tests/test_bugtarget_subscription.py
+++ b/lib/lp/bugs/browser/tests/test_bugtarget_subscription.py
@@ -3,8 +3,6 @@
"""Tests for TestSubscriptionView."""
-__metaclass__ = type
-
from lp.bugs.browser.bugtarget import TargetSubscriptionView
from lp.testing import (
person_logged_in,
diff --git a/lib/lp/bugs/browser/tests/test_bugtarget_tags.py b/lib/lp/bugs/browser/tests/test_bugtarget_tags.py
index 311ae8a..4e48b2e 100644
--- a/lib/lp/bugs/browser/tests/test_bugtarget_tags.py
+++ b/lib/lp/bugs/browser/tests/test_bugtarget_tags.py
@@ -1,8 +1,6 @@
# Copyright 2010-2020 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from testscenarios.testcase import WithScenarios
from lp.testing import TestCaseWithFactory
diff --git a/lib/lp/bugs/browser/tests/test_bugtask.py b/lib/lp/bugs/browser/tests/test_bugtask.py
index 6b03588..4cc1c9c 100644
--- a/lib/lp/bugs/browser/tests/test_bugtask.py
+++ b/lib/lp/bugs/browser/tests/test_bugtask.py
@@ -1,8 +1,6 @@
# Copyright 2009-2021 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/bugs/browser/tests/test_bugtask_adding.py b/lib/lp/bugs/browser/tests/test_bugtask_adding.py
index 86a4144..378b38d 100644
--- a/lib/lp/bugs/browser/tests/test_bugtask_adding.py
+++ b/lib/lp/bugs/browser/tests/test_bugtask_adding.py
@@ -1,9 +1,6 @@
# Copyright 2010 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
-
from zope.component import getUtility
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
diff --git a/lib/lp/bugs/browser/tests/test_bugtask_navigation.py b/lib/lp/bugs/browser/tests/test_bugtask_navigation.py
index d6132a5..7d61ced 100644
--- a/lib/lp/bugs/browser/tests/test_bugtask_navigation.py
+++ b/lib/lp/bugs/browser/tests/test_bugtask_navigation.py
@@ -3,8 +3,6 @@
"""Test `BugTargetTraversalMixin`."""
-__metaclass__ = type
-
from zope.publisher.interfaces import NotFound
from zope.security.proxy import removeSecurityProxy
diff --git a/lib/lp/bugs/browser/tests/test_bugtracker_component.py b/lib/lp/bugs/browser/tests/test_bugtracker_component.py
index 5d24556..e294de6 100644
--- a/lib/lp/bugs/browser/tests/test_bugtracker_component.py
+++ b/lib/lp/bugs/browser/tests/test_bugtracker_component.py
@@ -3,8 +3,6 @@
"""Unit tests for linking bug tracker components to source packages."""
-__metaclass__ = type
-
from zope.component import getUtility
from lp.registry.interfaces.distribution import IDistributionSet
diff --git a/lib/lp/bugs/browser/tests/test_bugtracker_views.py b/lib/lp/bugs/browser/tests/test_bugtracker_views.py
index 28a4ce6..b7caba0 100644
--- a/lib/lp/bugs/browser/tests/test_bugtracker_views.py
+++ b/lib/lp/bugs/browser/tests/test_bugtracker_views.py
@@ -3,8 +3,6 @@
"""Tests for BugTracker views."""
-__metaclass__ = type
-
from zope.component import getUtility
from lp.app.enums import InformationType
diff --git a/lib/lp/bugs/browser/tests/test_bugview.py b/lib/lp/bugs/browser/tests/test_bugview.py
index e2ea25e..fae96b8 100644
--- a/lib/lp/bugs/browser/tests/test_bugview.py
+++ b/lib/lp/bugs/browser/tests/test_bugview.py
@@ -1,8 +1,6 @@
# Copyright 2010-2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from lazr.restful.interfaces import IJSONRequestCache
from zope.security.proxy import removeSecurityProxy
diff --git a/lib/lp/bugs/browser/tests/test_bugwatch_views.py b/lib/lp/bugs/browser/tests/test_bugwatch_views.py
index 25113bc..cdda6a4 100644
--- a/lib/lp/bugs/browser/tests/test_bugwatch_views.py
+++ b/lib/lp/bugs/browser/tests/test_bugwatch_views.py
@@ -3,8 +3,6 @@
"""Tests for BugWatch views."""
-__metaclass__ = type
-
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
diff --git a/lib/lp/bugs/browser/tests/test_configure_bugtracker_links.py b/lib/lp/bugs/browser/tests/test_configure_bugtracker_links.py
index e33e2ba..a3f259a 100644
--- a/lib/lp/bugs/browser/tests/test_configure_bugtracker_links.py
+++ b/lib/lp/bugs/browser/tests/test_configure_bugtracker_links.py
@@ -3,8 +3,6 @@
"""Unit tests for bug tracker configuration link visibility."""
-__metaclass__ = type
-
from lp.registry.browser.distribution import DistributionBugsMenu
from lp.registry.browser.distributionsourcepackage import (
DistributionSourcePackageBugsMenu,
diff --git a/lib/lp/bugs/browser/tests/test_person_bugs.py b/lib/lp/bugs/browser/tests/test_person_bugs.py
index b2a4b77..7f535c0 100644
--- a/lib/lp/bugs/browser/tests/test_person_bugs.py
+++ b/lib/lp/bugs/browser/tests/test_person_bugs.py
@@ -3,8 +3,6 @@
"""Unit tests for person bug views."""
-__metaclass__ = type
-
from lp.app.browser.tales import MenuAPI
from lp.testing import TestCaseWithFactory
from lp.testing.layers import DatabaseFunctionalLayer
diff --git a/lib/lp/bugs/browser/widgets/bug.py b/lib/lp/bugs/browser/widgets/bug.py
index 6b2e947..e203d39 100644
--- a/lib/lp/bugs/browser/widgets/bug.py
+++ b/lib/lp/bugs/browser/widgets/bug.py
@@ -1,7 +1,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
"BugTagsFrozenSetWidget",
"BugTagsWidget",
diff --git a/lib/lp/bugs/browser/widgets/bugtask.py b/lib/lp/bugs/browser/widgets/bugtask.py
index 6c1ec15..621ab69 100644
--- a/lib/lp/bugs/browser/widgets/bugtask.py
+++ b/lib/lp/bugs/browser/widgets/bugtask.py
@@ -3,7 +3,6 @@
"""Widgets related to IBugTask."""
-__metaclass__ = type
__all__ = [
"AssigneeDisplayWidget",
"BugTaskAlsoAffectsSourcePackageNameWidget",
diff --git a/lib/lp/bugs/browser/widgets/tests/test_bug.py b/lib/lp/bugs/browser/widgets/tests/test_bug.py
index 4824290..2a2d6c3 100644
--- a/lib/lp/bugs/browser/widgets/tests/test_bug.py
+++ b/lib/lp/bugs/browser/widgets/tests/test_bug.py
@@ -1,8 +1,6 @@
# Copyright 2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from lp.bugs.browser.widgets.bug import BugTagsWidget
from lp.bugs.interfaces.bugtarget import IHasOfficialBugTags
from lp.services.webapp.servers import LaunchpadTestRequest
diff --git a/lib/lp/bugs/browser/widgets/tests/test_bugtask.py b/lib/lp/bugs/browser/widgets/tests/test_bugtask.py
index 1236251..c4718ab 100644
--- a/lib/lp/bugs/browser/widgets/tests/test_bugtask.py
+++ b/lib/lp/bugs/browser/widgets/tests/test_bugtask.py
@@ -3,8 +3,6 @@
"""Test the bugtask widgets."""
-__metaclass__ = type
-
from lp.bugs.browser.widgets.bugtask import BugTaskTargetWidget
from lp.bugs.interfaces.bugtask import IBugTask
from lp.services.webapp.servers import LaunchpadTestRequest
diff --git a/lib/lp/bugs/enums.py b/lib/lp/bugs/enums.py
index ca0e995..6290763 100644
--- a/lib/lp/bugs/enums.py
+++ b/lib/lp/bugs/enums.py
@@ -3,7 +3,6 @@
"""Enums for the Bugs app."""
-__metaclass__ = type
__all__ = [
'BugNotificationLevel',
'BugNotificationStatus',
diff --git a/lib/lp/bugs/errors.py b/lib/lp/bugs/errors.py
index 4093856..06dd12e 100644
--- a/lib/lp/bugs/errors.py
+++ b/lib/lp/bugs/errors.py
@@ -3,7 +3,6 @@
"""Errors used in the lp/bugs modules."""
-__metaclass__ = type
__all__ = [
'InvalidDuplicateValue',
'InvalidSearchParameters',
diff --git a/lib/lp/bugs/externalbugtracker/__init__.py b/lib/lp/bugs/externalbugtracker/__init__.py
index d654d93..7003063 100644
--- a/lib/lp/bugs/externalbugtracker/__init__.py
+++ b/lib/lp/bugs/externalbugtracker/__init__.py
@@ -3,7 +3,6 @@
"""__init__ module for the externalbugtracker package."""
-__metaclass__ = type
__all__ = [
'BATCH_SIZE_UNLIMITED',
'BugNotFound',
diff --git a/lib/lp/bugs/externalbugtracker/base.py b/lib/lp/bugs/externalbugtracker/base.py
index b908b0c..8ce49ef 100644
--- a/lib/lp/bugs/externalbugtracker/base.py
+++ b/lib/lp/bugs/externalbugtracker/base.py
@@ -3,7 +3,6 @@
"""External bugtrackers."""
-__metaclass__ = type
__all__ = [
'BATCH_SIZE_UNLIMITED',
'BugNotFound',
diff --git a/lib/lp/bugs/externalbugtracker/bugzilla.py b/lib/lp/bugs/externalbugtracker/bugzilla.py
index 2f941e8..acfa428 100644
--- a/lib/lp/bugs/externalbugtracker/bugzilla.py
+++ b/lib/lp/bugs/externalbugtracker/bugzilla.py
@@ -3,7 +3,6 @@
"""Bugzilla ExternalBugTracker utility."""
-__metaclass__ = type
__all__ = [
'Bugzilla',
'BugzillaAPI',
diff --git a/lib/lp/bugs/externalbugtracker/debbugs.py b/lib/lp/bugs/externalbugtracker/debbugs.py
index 1bca0c7..89b252c 100644
--- a/lib/lp/bugs/externalbugtracker/debbugs.py
+++ b/lib/lp/bugs/externalbugtracker/debbugs.py
@@ -3,7 +3,6 @@
"""Debbugs ExternalBugTracker utility."""
-__metaclass__ = type
__all__ = [
'DebBugs',
'DebBugsDatabaseNotFound'
diff --git a/lib/lp/bugs/externalbugtracker/github.py b/lib/lp/bugs/externalbugtracker/github.py
index 31d91b7..0756a5b 100644
--- a/lib/lp/bugs/externalbugtracker/github.py
+++ b/lib/lp/bugs/externalbugtracker/github.py
@@ -3,7 +3,6 @@
"""GitHub ExternalBugTracker utility."""
-__metaclass__ = type
__all__ = [
'BadGitHubURL',
'GitHub',
diff --git a/lib/lp/bugs/externalbugtracker/gitlab.py b/lib/lp/bugs/externalbugtracker/gitlab.py
index ed5187b..dc5e104 100644
--- a/lib/lp/bugs/externalbugtracker/gitlab.py
+++ b/lib/lp/bugs/externalbugtracker/gitlab.py
@@ -3,7 +3,6 @@
"""GitLab ExternalBugTracker utility."""
-__metaclass__ = type
__all__ = [
'BadGitLabURL',
'GitLab',
diff --git a/lib/lp/bugs/externalbugtracker/mantis.py b/lib/lp/bugs/externalbugtracker/mantis.py
index c3257a5..bd62d0a 100644
--- a/lib/lp/bugs/externalbugtracker/mantis.py
+++ b/lib/lp/bugs/externalbugtracker/mantis.py
@@ -3,7 +3,6 @@
"""Mantis ExternalBugTracker utility."""
-__metaclass__ = type
__all__ = [
'Mantis',
'mantis_login_hook',
diff --git a/lib/lp/bugs/externalbugtracker/roundup.py b/lib/lp/bugs/externalbugtracker/roundup.py
index fc3f0a7..cf7a215 100644
--- a/lib/lp/bugs/externalbugtracker/roundup.py
+++ b/lib/lp/bugs/externalbugtracker/roundup.py
@@ -3,7 +3,6 @@
"""Round ExternalBugTracker utility."""
-__metaclass__ = type
__all__ = ['Roundup']
import csv
diff --git a/lib/lp/bugs/externalbugtracker/rt.py b/lib/lp/bugs/externalbugtracker/rt.py
index df303f9..cf33635 100644
--- a/lib/lp/bugs/externalbugtracker/rt.py
+++ b/lib/lp/bugs/externalbugtracker/rt.py
@@ -3,7 +3,6 @@
"""RT ExternalBugTracker Utility."""
-__metaclass__ = type
__all__ = ['RequestTracker']
import email
diff --git a/lib/lp/bugs/externalbugtracker/sourceforge.py b/lib/lp/bugs/externalbugtracker/sourceforge.py
index 41b83dc..4cc8b89 100644
--- a/lib/lp/bugs/externalbugtracker/sourceforge.py
+++ b/lib/lp/bugs/externalbugtracker/sourceforge.py
@@ -3,7 +3,6 @@
"""Sourceforge ExternalBugTracker utility."""
-__metaclass__ = type
__all__ = ['SourceForge']
import re
diff --git a/lib/lp/bugs/externalbugtracker/tests/test_bugzilla.py b/lib/lp/bugs/externalbugtracker/tests/test_bugzilla.py
index 92447ac..2b8ea61 100644
--- a/lib/lp/bugs/externalbugtracker/tests/test_bugzilla.py
+++ b/lib/lp/bugs/externalbugtracker/tests/test_bugzilla.py
@@ -3,8 +3,6 @@
"""Tests for the Bugzilla BugTracker."""
-__metaclass__ = type
-
from xml.parsers.expat import ExpatError
import responses
diff --git a/lib/lp/bugs/externalbugtracker/tests/test_externalbugtracker.py b/lib/lp/bugs/externalbugtracker/tests/test_externalbugtracker.py
index ac41de7..e4e2904 100644
--- a/lib/lp/bugs/externalbugtracker/tests/test_externalbugtracker.py
+++ b/lib/lp/bugs/externalbugtracker/tests/test_externalbugtracker.py
@@ -3,8 +3,6 @@
"""Test the externalbugtracker package."""
-__metaclass__ = type
-
import responses
from testtools.matchers import (
ContainsDict,
diff --git a/lib/lp/bugs/externalbugtracker/tests/test_github.py b/lib/lp/bugs/externalbugtracker/tests/test_github.py
index b342872..6c825b5 100644
--- a/lib/lp/bugs/externalbugtracker/tests/test_github.py
+++ b/lib/lp/bugs/externalbugtracker/tests/test_github.py
@@ -3,8 +3,6 @@
"""Tests for the GitHub Issues BugTracker."""
-__metaclass__ = type
-
from datetime import datetime
import json
diff --git a/lib/lp/bugs/externalbugtracker/tests/test_gitlab.py b/lib/lp/bugs/externalbugtracker/tests/test_gitlab.py
index 4978b1f..2810441 100644
--- a/lib/lp/bugs/externalbugtracker/tests/test_gitlab.py
+++ b/lib/lp/bugs/externalbugtracker/tests/test_gitlab.py
@@ -3,8 +3,6 @@
"""Tests for the GitLab Issues BugTracker."""
-__metaclass__ = type
-
from datetime import datetime
import json
diff --git a/lib/lp/bugs/externalbugtracker/tests/test_mantis.py b/lib/lp/bugs/externalbugtracker/tests/test_mantis.py
index 3d0cc74..2f6e11e 100644
--- a/lib/lp/bugs/externalbugtracker/tests/test_mantis.py
+++ b/lib/lp/bugs/externalbugtracker/tests/test_mantis.py
@@ -3,8 +3,6 @@
"""Tests for the Mantis BugTracker."""
-__metaclass__ = type
-
import responses
from six.moves.urllib_parse import urljoin
from testtools.matchers import (
diff --git a/lib/lp/bugs/externalbugtracker/tests/test_xmlrpc.py b/lib/lp/bugs/externalbugtracker/tests/test_xmlrpc.py
index 3591e98..b23cbe5 100644
--- a/lib/lp/bugs/externalbugtracker/tests/test_xmlrpc.py
+++ b/lib/lp/bugs/externalbugtracker/tests/test_xmlrpc.py
@@ -3,8 +3,6 @@
"""Tests for `lp.bugs.externalbugtracker.xmlrpc`."""
-__metaclass__ = type
-
import socket
from xml.parsers.expat import ExpatError
diff --git a/lib/lp/bugs/externalbugtracker/trac.py b/lib/lp/bugs/externalbugtracker/trac.py
index 6fdc2ef..9f8f4f6 100644
--- a/lib/lp/bugs/externalbugtracker/trac.py
+++ b/lib/lp/bugs/externalbugtracker/trac.py
@@ -3,7 +3,6 @@
"""Trac ExternalBugTracker implementation."""
-__metaclass__ = type
__all__ = ['Trac', 'TracLPPlugin']
import csv
diff --git a/lib/lp/bugs/externalbugtracker/xmlrpc.py b/lib/lp/bugs/externalbugtracker/xmlrpc.py
index f9f71f4..b263982 100644
--- a/lib/lp/bugs/externalbugtracker/xmlrpc.py
+++ b/lib/lp/bugs/externalbugtracker/xmlrpc.py
@@ -3,7 +3,6 @@
"""An XMLRPC transport which uses requests."""
-__metaclass__ = type
__all__ = [
'RequestsTransport',
]
diff --git a/lib/lp/bugs/feed/bug.py b/lib/lp/bugs/feed/bug.py
index 3f443b0..207aec4 100644
--- a/lib/lp/bugs/feed/bug.py
+++ b/lib/lp/bugs/feed/bug.py
@@ -3,8 +3,6 @@
"""Bug feed (syndication) views."""
-__metaclass__ = type
-
__all__ = [
'BugFeed',
'BugTargetBugsFeed',
diff --git a/lib/lp/bugs/interfaces/apportjob.py b/lib/lp/bugs/interfaces/apportjob.py
index 28874e2..d82e68d 100644
--- a/lib/lp/bugs/interfaces/apportjob.py
+++ b/lib/lp/bugs/interfaces/apportjob.py
@@ -2,7 +2,6 @@
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Interfaces for using the Jobs system for Apport BLOB processing."""
-__metaclass__ = type
__all__ = [
'ApportJobType',
'IApportJob',
diff --git a/lib/lp/bugs/interfaces/bug.py b/lib/lp/bugs/interfaces/bug.py
index 907a2c7..725a054 100644
--- a/lib/lp/bugs/interfaces/bug.py
+++ b/lib/lp/bugs/interfaces/bug.py
@@ -3,8 +3,6 @@
"""Interfaces related to bugs."""
-__metaclass__ = type
-
__all__ = [
'CreateBugParams',
'CreatedBugWithNoBugTasksError',
diff --git a/lib/lp/bugs/interfaces/bugactivity.py b/lib/lp/bugs/interfaces/bugactivity.py
index 54e4137..e282b66 100644
--- a/lib/lp/bugs/interfaces/bugactivity.py
+++ b/lib/lp/bugs/interfaces/bugactivity.py
@@ -3,8 +3,6 @@
"""Bug activity interfaces."""
-__metaclass__ = type
-
__all__ = [
'IBugActivity',
'IBugActivitySet',
diff --git a/lib/lp/bugs/interfaces/bugattachment.py b/lib/lp/bugs/interfaces/bugattachment.py
index 3aa7b7c..ad5548d 100644
--- a/lib/lp/bugs/interfaces/bugattachment.py
+++ b/lib/lp/bugs/interfaces/bugattachment.py
@@ -3,8 +3,6 @@
"""Bug attachment interfaces."""
-__metaclass__ = type
-
__all__ = [
'BugAttachmentType',
'IBugAttachment',
diff --git a/lib/lp/bugs/interfaces/bugbranch.py b/lib/lp/bugs/interfaces/bugbranch.py
index 8f7e6a9..78fdab1 100644
--- a/lib/lp/bugs/interfaces/bugbranch.py
+++ b/lib/lp/bugs/interfaces/bugbranch.py
@@ -3,8 +3,6 @@
"""Interfaces for linking BugTasks and Branches."""
-__metaclass__ = type
-
__all__ = [
"IBugBranch",
"IBugBranchSet",
diff --git a/lib/lp/bugs/interfaces/bugchange.py b/lib/lp/bugs/interfaces/bugchange.py
index 98fbf69..fd57999 100644
--- a/lib/lp/bugs/interfaces/bugchange.py
+++ b/lib/lp/bugs/interfaces/bugchange.py
@@ -3,7 +3,6 @@
"""Interfaces for bug changes."""
-__metaclass__ = type
__all__ = [
'IBugChange',
]
diff --git a/lib/lp/bugs/interfaces/buglink.py b/lib/lp/bugs/interfaces/buglink.py
index 19c5201..5e10854 100644
--- a/lib/lp/bugs/interfaces/buglink.py
+++ b/lib/lp/bugs/interfaces/buglink.py
@@ -3,8 +3,6 @@
"""Interfaces for objects that can be linked to bugs."""
-__metaclass__ = type
-
__all__ = [
'IBugLinkForm',
'IBugLinkTarget',
diff --git a/lib/lp/bugs/interfaces/bugmessage.py b/lib/lp/bugs/interfaces/bugmessage.py
index 15b3373..07f6bf8 100644
--- a/lib/lp/bugs/interfaces/bugmessage.py
+++ b/lib/lp/bugs/interfaces/bugmessage.py
@@ -3,7 +3,6 @@
"""Bug message interfaces."""
-__metaclass__ = type
__all__ = [
'IBugComment',
'IBugMessage',
diff --git a/lib/lp/bugs/interfaces/bugnomination.py b/lib/lp/bugs/interfaces/bugnomination.py
index 242225d..8937aa0 100644
--- a/lib/lp/bugs/interfaces/bugnomination.py
+++ b/lib/lp/bugs/interfaces/bugnomination.py
@@ -3,8 +3,6 @@
"""Interfaces related to bug nomination."""
-__metaclass__ = type
-
__all__ = [
'BugNominationStatusError',
'NominationError',
diff --git a/lib/lp/bugs/interfaces/bugnotification.py b/lib/lp/bugs/interfaces/bugnotification.py
index 411b4df..898476b 100644
--- a/lib/lp/bugs/interfaces/bugnotification.py
+++ b/lib/lp/bugs/interfaces/bugnotification.py
@@ -3,7 +3,6 @@
"""Bug notifications."""
-__metaclass__ = type
__all__ = [
'IBugNotification',
'IBugNotificationFilter',
diff --git a/lib/lp/bugs/interfaces/bugsubscription.py b/lib/lp/bugs/interfaces/bugsubscription.py
index d4b1870..ba210a9 100644
--- a/lib/lp/bugs/interfaces/bugsubscription.py
+++ b/lib/lp/bugs/interfaces/bugsubscription.py
@@ -3,8 +3,6 @@
"""Bug subscription interfaces."""
-__metaclass__ = type
-
__all__ = [
'IBugSubscription',
]
diff --git a/lib/lp/bugs/interfaces/bugsubscriptionfilter.py b/lib/lp/bugs/interfaces/bugsubscriptionfilter.py
index 9d58906..3192bff 100644
--- a/lib/lp/bugs/interfaces/bugsubscriptionfilter.py
+++ b/lib/lp/bugs/interfaces/bugsubscriptionfilter.py
@@ -3,7 +3,6 @@
"""Bug subscription filter interfaces."""
-__metaclass__ = type
__all__ = [
"IBugSubscriptionFilter",
"IBugSubscriptionFilterMute",
diff --git a/lib/lp/bugs/interfaces/bugsummary.py b/lib/lp/bugs/interfaces/bugsummary.py
index 3822f34..484e29f 100644
--- a/lib/lp/bugs/interfaces/bugsummary.py
+++ b/lib/lp/bugs/interfaces/bugsummary.py
@@ -3,7 +3,6 @@
"""BugSummary interfaces."""
-__metaclass__ = type
__all__ = [
'IBugSummary',
'IBugSummaryDimension',
diff --git a/lib/lp/bugs/interfaces/bugsupervisor.py b/lib/lp/bugs/interfaces/bugsupervisor.py
index 38fdfb6..b6c4de6 100644
--- a/lib/lp/bugs/interfaces/bugsupervisor.py
+++ b/lib/lp/bugs/interfaces/bugsupervisor.py
@@ -3,8 +3,6 @@
"""Interface for objects which have a bug Supervisor."""
-__metaclass__ = type
-
__all__ = [
'IHasBugSupervisor',
]
diff --git a/lib/lp/bugs/interfaces/bugtarget.py b/lib/lp/bugs/interfaces/bugtarget.py
index 9951a34..337fc05 100644
--- a/lib/lp/bugs/interfaces/bugtarget.py
+++ b/lib/lp/bugs/interfaces/bugtarget.py
@@ -3,8 +3,6 @@
"""Interfaces related to bugs."""
-__metaclass__ = type
-
__all__ = [
'IBugTarget',
'IHasBugs',
diff --git a/lib/lp/bugs/interfaces/bugtask.py b/lib/lp/bugs/interfaces/bugtask.py
index 7051df8..4011106 100644
--- a/lib/lp/bugs/interfaces/bugtask.py
+++ b/lib/lp/bugs/interfaces/bugtask.py
@@ -3,8 +3,6 @@
"""Bug task interfaces."""
-__metaclass__ = type
-
__all__ = [
'BUG_SUPERVISOR_BUGTASK_STATUSES',
'BugTaskImportance',
diff --git a/lib/lp/bugs/interfaces/bugtaskfilter.py b/lib/lp/bugs/interfaces/bugtaskfilter.py
index 4ecccfb..463199d 100644
--- a/lib/lp/bugs/interfaces/bugtaskfilter.py
+++ b/lib/lp/bugs/interfaces/bugtaskfilter.py
@@ -3,7 +3,6 @@
"""Fiter bugtasks based on context."""
-__metaclass__ = type
__all__ = [
'filter_bugtasks_by_context',
'OrderedBugTask',
diff --git a/lib/lp/bugs/interfaces/bugtasksearch.py b/lib/lp/bugs/interfaces/bugtasksearch.py
index 1170091..6ec6ce2 100644
--- a/lib/lp/bugs/interfaces/bugtasksearch.py
+++ b/lib/lp/bugs/interfaces/bugtasksearch.py
@@ -3,8 +3,6 @@
"""Interfaces for searching bug tasks. Mostly used with IBugTaskSet."""
-__metaclass__ = type
-
__all__ = [
'BugBlueprintSearch',
'BugBranchSearch',
diff --git a/lib/lp/bugs/interfaces/bugtracker.py b/lib/lp/bugs/interfaces/bugtracker.py
index 586c646..22fc4e9 100644
--- a/lib/lp/bugs/interfaces/bugtracker.py
+++ b/lib/lp/bugs/interfaces/bugtracker.py
@@ -3,8 +3,6 @@
"""Bug tracker interfaces."""
-__metaclass__ = type
-
__all__ = [
'BugTrackerType',
'IBugTracker',
diff --git a/lib/lp/bugs/interfaces/bugtrackerperson.py b/lib/lp/bugs/interfaces/bugtrackerperson.py
index ce46825..974ef58 100644
--- a/lib/lp/bugs/interfaces/bugtrackerperson.py
+++ b/lib/lp/bugs/interfaces/bugtrackerperson.py
@@ -3,7 +3,6 @@
"""BugTrackerPerson interface."""
-__metaclass__ = type
__all__ = [
'IBugTrackerPerson',
'BugTrackerPersonAlreadyExists',
diff --git a/lib/lp/bugs/interfaces/bugwatch.py b/lib/lp/bugs/interfaces/bugwatch.py
index 2398381..bab2f26 100644
--- a/lib/lp/bugs/interfaces/bugwatch.py
+++ b/lib/lp/bugs/interfaces/bugwatch.py
@@ -3,8 +3,6 @@
"""Bug watch interfaces."""
-__metaclass__ = type
-
__all__ = [
'BUG_WATCH_ACTIVITY_SUCCESS_STATUSES',
'BugWatchActivityStatus',
diff --git a/lib/lp/bugs/interfaces/cve.py b/lib/lp/bugs/interfaces/cve.py
index 7188e9f..2ba5a53 100644
--- a/lib/lp/bugs/interfaces/cve.py
+++ b/lib/lp/bugs/interfaces/cve.py
@@ -3,8 +3,6 @@
"""CVE interfaces."""
-__metaclass__ = type
-
__all__ = [
'CveStatus',
'ICve',
diff --git a/lib/lp/bugs/interfaces/cvereference.py b/lib/lp/bugs/interfaces/cvereference.py
index b222db8..909c86f 100644
--- a/lib/lp/bugs/interfaces/cvereference.py
+++ b/lib/lp/bugs/interfaces/cvereference.py
@@ -7,8 +7,6 @@ describes a link between the CVE and another vulnerability tracking system.
It is to CVE what a Watch is to Launchpad Bugs.
"""
-__metaclass__ = type
-
__all__ = ['ICveReference']
from zope.interface import Interface
diff --git a/lib/lp/bugs/interfaces/externalbugtracker.py b/lib/lp/bugs/interfaces/externalbugtracker.py
index 9f1eba0..dc6cd84 100644
--- a/lib/lp/bugs/interfaces/externalbugtracker.py
+++ b/lib/lp/bugs/interfaces/externalbugtracker.py
@@ -3,8 +3,6 @@
"""Interfaces declarations for external bugtrackers."""
-__metaclass__ = type
-
__all__ = [
'IExternalBugTracker',
'IExternalBugTrackerTokenAPI',
diff --git a/lib/lp/bugs/interfaces/hasbug.py b/lib/lp/bugs/interfaces/hasbug.py
index d693202..97e45d2 100644
--- a/lib/lp/bugs/interfaces/hasbug.py
+++ b/lib/lp/bugs/interfaces/hasbug.py
@@ -3,8 +3,6 @@
"""Interfaces related to bugs."""
-__metaclass__ = type
-
__all__ = [
'IHasBug',
]
diff --git a/lib/lp/bugs/interfaces/malone.py b/lib/lp/bugs/interfaces/malone.py
index 83c8d9c..6836a20 100644
--- a/lib/lp/bugs/interfaces/malone.py
+++ b/lib/lp/bugs/interfaces/malone.py
@@ -3,8 +3,6 @@
"""Interfaces pertaining to the launchpad Malone application."""
-__metaclass__ = type
-
from lazr.restful.declarations import (
call_with,
collection_default_content,
diff --git a/lib/lp/bugs/interfaces/structuralsubscription.py b/lib/lp/bugs/interfaces/structuralsubscription.py
index a253aa7..2a977d9 100644
--- a/lib/lp/bugs/interfaces/structuralsubscription.py
+++ b/lib/lp/bugs/interfaces/structuralsubscription.py
@@ -3,8 +3,6 @@
"""StructuralSubscription interfaces."""
-__metaclass__ = type
-
__all__ = [
'IStructuralSubscription',
'IStructuralSubscriptionForm',
diff --git a/lib/lp/bugs/interfaces/tests/test_bugtask.py b/lib/lp/bugs/interfaces/tests/test_bugtask.py
index 5e1cddf..3c33527 100644
--- a/lib/lp/bugs/interfaces/tests/test_bugtask.py
+++ b/lib/lp/bugs/interfaces/tests/test_bugtask.py
@@ -3,8 +3,6 @@
"""Tests for BugTask interfaces."""
-__metaclass__ = type
-
from lp.bugs.interfaces.bugtask import (
BugTaskStatus,
BugTaskStatusSearch,
diff --git a/lib/lp/bugs/mail/bugnotificationbuilder.py b/lib/lp/bugs/mail/bugnotificationbuilder.py
index e525806..9c95348 100644
--- a/lib/lp/bugs/mail/bugnotificationbuilder.py
+++ b/lib/lp/bugs/mail/bugnotificationbuilder.py
@@ -3,7 +3,6 @@
"""Bug notification building code."""
-__metaclass__ = type
__all__ = [
'BugNotificationBuilder',
'format_rfc2822_date',
diff --git a/lib/lp/bugs/mail/bugnotificationrecipients.py b/lib/lp/bugs/mail/bugnotificationrecipients.py
index bcec38d..40b88bd 100644
--- a/lib/lp/bugs/mail/bugnotificationrecipients.py
+++ b/lib/lp/bugs/mail/bugnotificationrecipients.py
@@ -3,7 +3,6 @@
"""Code for handling bug notification recipients in bug mail."""
-__metaclass__ = type
__all__ = [
'BugNotificationRecipients',
]
diff --git a/lib/lp/bugs/mail/commands.py b/lib/lp/bugs/mail/commands.py
index 6c5b831..d4b2868 100644
--- a/lib/lp/bugs/mail/commands.py
+++ b/lib/lp/bugs/mail/commands.py
@@ -1,7 +1,6 @@
# Copyright 2009-2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'BugEmailCommands',
]
diff --git a/lib/lp/bugs/mail/handler.py b/lib/lp/bugs/mail/handler.py
index fdf9a31..7265336 100644
--- a/lib/lp/bugs/mail/handler.py
+++ b/lib/lp/bugs/mail/handler.py
@@ -3,7 +3,6 @@
"""Handle incoming Bugs email."""
-__metaclass__ = type
__all__ = [
"MaloneHandler",
]
diff --git a/lib/lp/bugs/mail/newbug.py b/lib/lp/bugs/mail/newbug.py
index 4e010d6..5d921d6 100644
--- a/lib/lp/bugs/mail/newbug.py
+++ b/lib/lp/bugs/mail/newbug.py
@@ -3,7 +3,6 @@
"""Mail for new bugs."""
-__metaclass__ = type
__all__ = [
'generate_bug_add_email',
]
diff --git a/lib/lp/bugs/mail/tests/test_handler.py b/lib/lp/bugs/mail/tests/test_handler.py
index a017d48..ff4da2b 100644
--- a/lib/lp/bugs/mail/tests/test_handler.py
+++ b/lib/lp/bugs/mail/tests/test_handler.py
@@ -3,8 +3,6 @@
"""Test MaloneHandler."""
-__metaclass__ = type
-
import transaction
from zope.component import getUtility
from zope.security.management import (
diff --git a/lib/lp/bugs/model/apportjob.py b/lib/lp/bugs/model/apportjob.py
index 4bef028..1343a4a 100644
--- a/lib/lp/bugs/model/apportjob.py
+++ b/lib/lp/bugs/model/apportjob.py
@@ -3,7 +3,6 @@
"""Job classes related to ApportJobs are in here."""
-__metaclass__ = type
__all__ = [
'ApportJob',
'ApportJobDerived',
diff --git a/lib/lp/bugs/model/bug.py b/lib/lp/bugs/model/bug.py
index 4f4ea06..94f4dfc 100644
--- a/lib/lp/bugs/model/bug.py
+++ b/lib/lp/bugs/model/bug.py
@@ -3,8 +3,6 @@
"""Launchpad bug-related database table classes."""
-__metaclass__ = type
-
__all__ = [
'Bug',
'BugAffectsPerson',
diff --git a/lib/lp/bugs/model/bugactivity.py b/lib/lp/bugs/model/bugactivity.py
index 7422668..ec51800 100644
--- a/lib/lp/bugs/model/bugactivity.py
+++ b/lib/lp/bugs/model/bugactivity.py
@@ -1,7 +1,6 @@
# Copyright 2009-2016 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = ['BugActivity', 'BugActivitySet']
import re
diff --git a/lib/lp/bugs/model/bugattachment.py b/lib/lp/bugs/model/bugattachment.py
index e621b52..44dc0e9 100644
--- a/lib/lp/bugs/model/bugattachment.py
+++ b/lib/lp/bugs/model/bugattachment.py
@@ -1,7 +1,6 @@
# Copyright 2009-2020 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = ['BugAttachment', 'BugAttachmentSet']
from lazr.lifecycle.event import (
diff --git a/lib/lp/bugs/model/bugbranch.py b/lib/lp/bugs/model/bugbranch.py
index b5be80f..2987f97 100644
--- a/lib/lp/bugs/model/bugbranch.py
+++ b/lib/lp/bugs/model/bugbranch.py
@@ -3,8 +3,6 @@
"""Database classes for linking bugtasks and branches."""
-__metaclass__ = type
-
__all__ = [
"BugBranch",
"BugBranchSet",
diff --git a/lib/lp/bugs/model/buglinktarget.py b/lib/lp/bugs/model/buglinktarget.py
index 4ede06e..075e282 100644
--- a/lib/lp/bugs/model/buglinktarget.py
+++ b/lib/lp/bugs/model/buglinktarget.py
@@ -1,7 +1,6 @@
# Copyright 2009-2016 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'BugLinkTargetMixin',
'ObjectLinkedEvent',
diff --git a/lib/lp/bugs/model/bugmessage.py b/lib/lp/bugs/model/bugmessage.py
index b8e7291..8c7b673 100644
--- a/lib/lp/bugs/model/bugmessage.py
+++ b/lib/lp/bugs/model/bugmessage.py
@@ -1,7 +1,6 @@
# Copyright 2009-2021 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = ['BugMessage', 'BugMessageSet']
from email.utils import make_msgid
diff --git a/lib/lp/bugs/model/bugnomination.py b/lib/lp/bugs/model/bugnomination.py
index d44877a..c85ce77 100644
--- a/lib/lp/bugs/model/bugnomination.py
+++ b/lib/lp/bugs/model/bugnomination.py
@@ -8,7 +8,6 @@ particular distro series or product series. A bug may have zero, one,
or more nominations.
"""
-__metaclass__ = type
__all__ = [
'BugNomination',
'BugNominationSet']
diff --git a/lib/lp/bugs/model/bugnotification.py b/lib/lp/bugs/model/bugnotification.py
index 911118f..3a30136 100644
--- a/lib/lp/bugs/model/bugnotification.py
+++ b/lib/lp/bugs/model/bugnotification.py
@@ -3,7 +3,6 @@
"""Bug notifications."""
-__metaclass__ = type
__all__ = [
'BugNotification',
'BugNotificationFilter',
diff --git a/lib/lp/bugs/model/bugsubscription.py b/lib/lp/bugs/model/bugsubscription.py
index 9b3c258..d954fef 100644
--- a/lib/lp/bugs/model/bugsubscription.py
+++ b/lib/lp/bugs/model/bugsubscription.py
@@ -1,7 +1,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = ['BugSubscription']
import pytz
diff --git a/lib/lp/bugs/model/bugsubscriptionfilter.py b/lib/lp/bugs/model/bugsubscriptionfilter.py
index 20f0982..727830e 100644
--- a/lib/lp/bugs/model/bugsubscriptionfilter.py
+++ b/lib/lp/bugs/model/bugsubscriptionfilter.py
@@ -1,7 +1,6 @@
# Copyright 2009-2013 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'BugSubscriptionFilter',
'BugSubscriptionFilterInformationType',
diff --git a/lib/lp/bugs/model/bugsummary.py b/lib/lp/bugs/model/bugsummary.py
index f01134e..46b29a9 100644
--- a/lib/lp/bugs/model/bugsummary.py
+++ b/lib/lp/bugs/model/bugsummary.py
@@ -3,7 +3,6 @@
"""BugSummary Storm database classes."""
-__metaclass__ = type
__all__ = [
'BugSummary',
'CombineBugSummaryConstraint',
diff --git a/lib/lp/bugs/model/bugtarget.py b/lib/lp/bugs/model/bugtarget.py
index 377980e..f7272d3 100644
--- a/lib/lp/bugs/model/bugtarget.py
+++ b/lib/lp/bugs/model/bugtarget.py
@@ -3,7 +3,6 @@
"""Components related to IBugTarget."""
-__metaclass__ = type
__all__ = [
'BugTargetBase',
'HasBugsBase',
diff --git a/lib/lp/bugs/model/bugtask.py b/lib/lp/bugs/model/bugtask.py
index de2bcd1..14eeec1 100644
--- a/lib/lp/bugs/model/bugtask.py
+++ b/lib/lp/bugs/model/bugtask.py
@@ -3,8 +3,6 @@
"""Classes that implement IBugTask and its related interfaces."""
-__metaclass__ = type
-
__all__ = [
'BugTaskDelta',
'BugTaskToBugAdapter',
diff --git a/lib/lp/bugs/model/bugtaskflat.py b/lib/lp/bugs/model/bugtaskflat.py
index 312b51a..01e26e4 100644
--- a/lib/lp/bugs/model/bugtaskflat.py
+++ b/lib/lp/bugs/model/bugtaskflat.py
@@ -1,8 +1,6 @@
# Copyright 2012-2020 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from storm.locals import (
Bool,
DateTime,
diff --git a/lib/lp/bugs/model/bugtasksearch.py b/lib/lp/bugs/model/bugtasksearch.py
index 3640ea7..4599d67 100644
--- a/lib/lp/bugs/model/bugtasksearch.py
+++ b/lib/lp/bugs/model/bugtasksearch.py
@@ -1,8 +1,6 @@
# Copyright 2009-2020 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = [
'get_bug_privacy_filter',
'get_bug_privacy_filter_terms',
diff --git a/lib/lp/bugs/model/bugtracker.py b/lib/lp/bugs/model/bugtracker.py
index f4f10c4..b13b90c 100644
--- a/lib/lp/bugs/model/bugtracker.py
+++ b/lib/lp/bugs/model/bugtracker.py
@@ -1,7 +1,6 @@
# Copyright 2009-2020 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'BugTracker',
'BugTrackerAlias',
diff --git a/lib/lp/bugs/model/bugtrackerperson.py b/lib/lp/bugs/model/bugtrackerperson.py
index 8008680..38dd8c9 100644
--- a/lib/lp/bugs/model/bugtrackerperson.py
+++ b/lib/lp/bugs/model/bugtrackerperson.py
@@ -3,7 +3,6 @@
"""BugTrackerPerson database class."""
-__metaclass__ = type
__all__ = [
'BugTrackerPerson',
]
diff --git a/lib/lp/bugs/model/bugwatch.py b/lib/lp/bugs/model/bugwatch.py
index 4d2ee48..5dd88e5 100644
--- a/lib/lp/bugs/model/bugwatch.py
+++ b/lib/lp/bugs/model/bugwatch.py
@@ -1,7 +1,6 @@
# Copyright 2009-2020 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'BugWatch',
'BugWatchActivity',
diff --git a/lib/lp/bugs/model/cve.py b/lib/lp/bugs/model/cve.py
index 112f5f9..7e37d78 100644
--- a/lib/lp/bugs/model/cve.py
+++ b/lib/lp/bugs/model/cve.py
@@ -1,8 +1,6 @@
# Copyright 2009-2020 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = [
'Cve',
'CveSet',
diff --git a/lib/lp/bugs/model/cvereference.py b/lib/lp/bugs/model/cvereference.py
index 129b5a1..7713f8e 100644
--- a/lib/lp/bugs/model/cvereference.py
+++ b/lib/lp/bugs/model/cvereference.py
@@ -1,7 +1,6 @@
# Copyright 2009-2020 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = ['CveReference']
from storm.locals import (
diff --git a/lib/lp/bugs/model/personsubscriptioninfo.py b/lib/lp/bugs/model/personsubscriptioninfo.py
index e66eb78..a5a6651 100644
--- a/lib/lp/bugs/model/personsubscriptioninfo.py
+++ b/lib/lp/bugs/model/personsubscriptioninfo.py
@@ -1,7 +1,6 @@
# Copyright 2011-2020 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'PersonSubscriptions',
]
diff --git a/lib/lp/bugs/model/structuralsubscription.py b/lib/lp/bugs/model/structuralsubscription.py
index 36d516d..8f02d00 100644
--- a/lib/lp/bugs/model/structuralsubscription.py
+++ b/lib/lp/bugs/model/structuralsubscription.py
@@ -1,7 +1,6 @@
# Copyright 2009-2020 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'get_structural_subscribers',
'get_structural_subscription_targets',
diff --git a/lib/lp/bugs/model/tests/test_bug.py b/lib/lp/bugs/model/tests/test_bug.py
index 6a953c0..3ce02e0 100644
--- a/lib/lp/bugs/model/tests/test_bug.py
+++ b/lib/lp/bugs/model/tests/test_bug.py
@@ -1,8 +1,6 @@
# Copyright 2010-2018 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/bugs/model/tests/test_bugsubscriptionfilter.py b/lib/lp/bugs/model/tests/test_bugsubscriptionfilter.py
index 57cfd6d..1d1179a 100644
--- a/lib/lp/bugs/model/tests/test_bugsubscriptionfilter.py
+++ b/lib/lp/bugs/model/tests/test_bugsubscriptionfilter.py
@@ -3,8 +3,6 @@
"""Tests for the bugsubscription module."""
-__metaclass__ = type
-
from storm.store import Store
from zope.security.interfaces import Unauthorized
from zope.security.proxy import ProxyFactory
diff --git a/lib/lp/bugs/model/tests/test_bugsubscriptioninfo.py b/lib/lp/bugs/model/tests/test_bugsubscriptioninfo.py
index c9565aa..b3d6a24 100644
--- a/lib/lp/bugs/model/tests/test_bugsubscriptioninfo.py
+++ b/lib/lp/bugs/model/tests/test_bugsubscriptioninfo.py
@@ -3,8 +3,6 @@
"""Test `BugSubscriptionInfo`."""
-__metaclass__ = type
-
from contextlib import contextmanager
import six
diff --git a/lib/lp/bugs/model/tests/test_bugsummary.py b/lib/lp/bugs/model/tests/test_bugsummary.py
index b28e9c5..6f52a91 100644
--- a/lib/lp/bugs/model/tests/test_bugsummary.py
+++ b/lib/lp/bugs/model/tests/test_bugsummary.py
@@ -3,8 +3,6 @@
"""Tests for the BugSummary class and underlying database triggers."""
-__metaclass__ = type
-
from datetime import datetime
from pytz import utc
diff --git a/lib/lp/bugs/model/tests/test_bugtask.py b/lib/lp/bugs/model/tests/test_bugtask.py
index a9cdc36..e16ca9e 100644
--- a/lib/lp/bugs/model/tests/test_bugtask.py
+++ b/lib/lp/bugs/model/tests/test_bugtask.py
@@ -1,8 +1,6 @@
# Copyright 2009-2020 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from collections import namedtuple
from datetime import datetime
from operator import attrgetter
diff --git a/lib/lp/bugs/model/tests/test_bugtask_status.py b/lib/lp/bugs/model/tests/test_bugtask_status.py
index 609db74..12b79e3 100644
--- a/lib/lp/bugs/model/tests/test_bugtask_status.py
+++ b/lib/lp/bugs/model/tests/test_bugtask_status.py
@@ -3,8 +3,6 @@
"""Tests for bug task status transitions."""
-__metaclass__ = type
-
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
diff --git a/lib/lp/bugs/model/tests/test_bugtasksearch.py b/lib/lp/bugs/model/tests/test_bugtasksearch.py
index af9f16a..d4c909f 100644
--- a/lib/lp/bugs/model/tests/test_bugtasksearch.py
+++ b/lib/lp/bugs/model/tests/test_bugtasksearch.py
@@ -1,8 +1,6 @@
# Copyright 2010-2020 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/bugs/model/tests/test_personsubscriptioninfo.py b/lib/lp/bugs/model/tests/test_personsubscriptioninfo.py
index a42b39d..d9ebd75 100644
--- a/lib/lp/bugs/model/tests/test_personsubscriptioninfo.py
+++ b/lib/lp/bugs/model/tests/test_personsubscriptioninfo.py
@@ -3,8 +3,6 @@
"""Tests for the personsubscriptioninfo module."""
-__metaclass__ = type
-
from testtools.matchers import LessThan
from zope.security.proxy import removeSecurityProxy
diff --git a/lib/lp/bugs/publisher.py b/lib/lp/bugs/publisher.py
index a5f3977..ac0099d 100644
--- a/lib/lp/bugs/publisher.py
+++ b/lib/lp/bugs/publisher.py
@@ -3,7 +3,6 @@
"""Bugs' custom publication."""
-__metaclass__ = type
__all__ = [
'BugsBrowserRequest',
'BugsLayer',
diff --git a/lib/lp/bugs/scripts/bugexpire.py b/lib/lp/bugs/scripts/bugexpire.py
index c025593..89d656e 100644
--- a/lib/lp/bugs/scripts/bugexpire.py
+++ b/lib/lp/bugs/scripts/bugexpire.py
@@ -3,8 +3,6 @@
"""BugTask expiration rules."""
-__metaclass__ = type
-
__all__ = ['BugJanitor']
diff --git a/lib/lp/bugs/scripts/bugimport.py b/lib/lp/bugs/scripts/bugimport.py
index f8c7ea0..facc2ba 100644
--- a/lib/lp/bugs/scripts/bugimport.py
+++ b/lib/lp/bugs/scripts/bugimport.py
@@ -7,8 +7,6 @@ This code can import an XML bug dump into Launchpad. The XML format
is described in the RELAX-NG schema 'doc/bug-export.rnc'.
"""
-__metaclass__ = type
-
__all__ = [
'BugXMLSyntaxError',
'BugImporter',
diff --git a/lib/lp/bugs/scripts/bugnotification.py b/lib/lp/bugs/scripts/bugnotification.py
index fbcdbb6..f5b6183 100644
--- a/lib/lp/bugs/scripts/bugnotification.py
+++ b/lib/lp/bugs/scripts/bugnotification.py
@@ -3,8 +3,6 @@
"""Functions related to sending bug notifications."""
-__metaclass__ = type
-
__all__ = [
"construct_email_notifications",
"get_email_notifications",
diff --git a/lib/lp/bugs/scripts/bugsummaryrebuild.py b/lib/lp/bugs/scripts/bugsummaryrebuild.py
index 0950dd3..ab72f5a 100644
--- a/lib/lp/bugs/scripts/bugsummaryrebuild.py
+++ b/lib/lp/bugs/scripts/bugsummaryrebuild.py
@@ -1,8 +1,6 @@
# Copyright 2012-2021 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
import six
from storm.expr import (
Alias,
diff --git a/lib/lp/bugs/scripts/bugtasktargetnamecaches.py b/lib/lp/bugs/scripts/bugtasktargetnamecaches.py
index cf0fd4f..1b32b29 100644
--- a/lib/lp/bugs/scripts/bugtasktargetnamecaches.py
+++ b/lib/lp/bugs/scripts/bugtasktargetnamecaches.py
@@ -3,7 +3,6 @@
"""A utility module for the update-bugtasktargetnamecaches.py cronscript."""
-__metaclass__ = type
__all__ = ['BugTaskTargetNameCacheUpdater']
from collections import defaultdict
diff --git a/lib/lp/bugs/scripts/bzremotecomponentfinder.py b/lib/lp/bugs/scripts/bzremotecomponentfinder.py
index 2dac377..1c4f3da 100644
--- a/lib/lp/bugs/scripts/bzremotecomponentfinder.py
+++ b/lib/lp/bugs/scripts/bzremotecomponentfinder.py
@@ -3,7 +3,6 @@
"""Utilities for the update-bugzilla-remote-components cronscript"""
-__metaclass__ = type
__all__ = [
'BugzillaRemoteComponentFinder',
'BugzillaRemoteComponentScraper',
diff --git a/lib/lp/bugs/scripts/checkwatches/base.py b/lib/lp/bugs/scripts/checkwatches/base.py
index 4bf74fb..0a0cfce 100644
--- a/lib/lp/bugs/scripts/checkwatches/base.py
+++ b/lib/lp/bugs/scripts/checkwatches/base.py
@@ -3,7 +3,6 @@
"""Common classes and functions for the checkwatches system."""
-__metaclass__ = type
__all__ = [
'WorkingBase',
'commit_before',
diff --git a/lib/lp/bugs/scripts/checkwatches/bugwatchupdater.py b/lib/lp/bugs/scripts/checkwatches/bugwatchupdater.py
index eaa2e79..03e9648 100644
--- a/lib/lp/bugs/scripts/checkwatches/bugwatchupdater.py
+++ b/lib/lp/bugs/scripts/checkwatches/bugwatchupdater.py
@@ -3,7 +3,6 @@
"""Classes and logic for the checkwatches BugWatchUpdater."""
-__metaclass__ = type
__all__ = [
'BugWatchUpdater',
]
diff --git a/lib/lp/bugs/scripts/checkwatches/core.py b/lib/lp/bugs/scripts/checkwatches/core.py
index 8f6aa79..3540182 100644
--- a/lib/lp/bugs/scripts/checkwatches/core.py
+++ b/lib/lp/bugs/scripts/checkwatches/core.py
@@ -3,7 +3,6 @@
"""Classes and logic for the checkwatches cronscript."""
-__metaclass__ = type
__all__ = [
'BaseScheduler',
'CheckwatchesMaster',
diff --git a/lib/lp/bugs/scripts/checkwatches/remotebugupdater.py b/lib/lp/bugs/scripts/checkwatches/remotebugupdater.py
index 287039b..0248f35 100644
--- a/lib/lp/bugs/scripts/checkwatches/remotebugupdater.py
+++ b/lib/lp/bugs/scripts/checkwatches/remotebugupdater.py
@@ -3,7 +3,6 @@
"""Classes and logic for the remote bug updater."""
-__metaclass__ = type
__all__ = [
'RemoteBugUpdater',
]
diff --git a/lib/lp/bugs/scripts/checkwatches/scheduler.py b/lib/lp/bugs/scripts/checkwatches/scheduler.py
index 3bbd315..d71a906 100644
--- a/lib/lp/bugs/scripts/checkwatches/scheduler.py
+++ b/lib/lp/bugs/scripts/checkwatches/scheduler.py
@@ -2,7 +2,6 @@
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Code for the BugWatch scheduler."""
-__metaclass__ = type
__all__ = [
'BugWatchScheduler',
'MAX_SAMPLE_SIZE',
diff --git a/lib/lp/bugs/scripts/checkwatches/tests/test_base.py b/lib/lp/bugs/scripts/checkwatches/tests/test_base.py
index 1619ad4..be29938 100644
--- a/lib/lp/bugs/scripts/checkwatches/tests/test_base.py
+++ b/lib/lp/bugs/scripts/checkwatches/tests/test_base.py
@@ -3,8 +3,6 @@
"""Tests for the `base` module."""
-__metaclass__ = type
-
from contextlib import contextmanager
import transaction
diff --git a/lib/lp/bugs/scripts/checkwatches/tests/test_bugwatchupdater.py b/lib/lp/bugs/scripts/checkwatches/tests/test_bugwatchupdater.py
index 82da441..541a9a1 100644
--- a/lib/lp/bugs/scripts/checkwatches/tests/test_bugwatchupdater.py
+++ b/lib/lp/bugs/scripts/checkwatches/tests/test_bugwatchupdater.py
@@ -3,8 +3,6 @@
"""Tests for the checkwatches.bugwatchupdater module."""
-__metaclass__ = type
-
from datetime import datetime
import transaction
diff --git a/lib/lp/bugs/scripts/checkwatches/tests/test_core.py b/lib/lp/bugs/scripts/checkwatches/tests/test_core.py
index afa7182..27be1c9 100644
--- a/lib/lp/bugs/scripts/checkwatches/tests/test_core.py
+++ b/lib/lp/bugs/scripts/checkwatches/tests/test_core.py
@@ -2,8 +2,6 @@
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Checkwatches unit tests."""
-__metaclass__ = type
-
from datetime import datetime
import threading
import unittest
diff --git a/lib/lp/bugs/scripts/checkwatches/tests/test_remotebugupdater.py b/lib/lp/bugs/scripts/checkwatches/tests/test_remotebugupdater.py
index 28e05a8..36f72de 100644
--- a/lib/lp/bugs/scripts/checkwatches/tests/test_remotebugupdater.py
+++ b/lib/lp/bugs/scripts/checkwatches/tests/test_remotebugupdater.py
@@ -3,8 +3,6 @@
"""Tests for the checkwatches remotebugupdater module."""
-__metaclass__ = type
-
import transaction
from lp.bugs.externalbugtracker.base import (
diff --git a/lib/lp/bugs/scripts/checkwatches/tests/test_scheduler.py b/lib/lp/bugs/scripts/checkwatches/tests/test_scheduler.py
index ad74fb3..33bea04 100644
--- a/lib/lp/bugs/scripts/checkwatches/tests/test_scheduler.py
+++ b/lib/lp/bugs/scripts/checkwatches/tests/test_scheduler.py
@@ -3,8 +3,6 @@
"""XXX: Module docstring goes here."""
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/bugs/scripts/checkwatches/utilities.py b/lib/lp/bugs/scripts/checkwatches/utilities.py
index ad149a2..c06207e 100644
--- a/lib/lp/bugs/scripts/checkwatches/utilities.py
+++ b/lib/lp/bugs/scripts/checkwatches/utilities.py
@@ -3,7 +3,6 @@
"""Utility functions for checkwatches."""
-__metaclass__ = type
__all__ = [
'get_bugwatcherrortype_for_error',
'get_remote_system_oops_properties',
diff --git a/lib/lp/bugs/scripts/cveimport.py b/lib/lp/bugs/scripts/cveimport.py
index b29040f..f9f75ba 100644
--- a/lib/lp/bugs/scripts/cveimport.py
+++ b/lib/lp/bugs/scripts/cveimport.py
@@ -5,8 +5,6 @@
extract details of known CVE entries, and ensure that all of the known
CVE's are fully registered in Launchpad."""
-__metaclass__ = type
-
import gzip
import io
import time
diff --git a/lib/lp/bugs/scripts/importdebianbugs.py b/lib/lp/bugs/scripts/importdebianbugs.py
index 7889b94..b798e93 100644
--- a/lib/lp/bugs/scripts/importdebianbugs.py
+++ b/lib/lp/bugs/scripts/importdebianbugs.py
@@ -3,8 +3,6 @@
"""Helper class and functions for the import-debian-bugs.py script."""
-__metaclass__ = type
-
import transaction
from zope.component import getUtility
diff --git a/lib/lp/bugs/scripts/sfremoteproductfinder.py b/lib/lp/bugs/scripts/sfremoteproductfinder.py
index 952839f..c4748ab 100644
--- a/lib/lp/bugs/scripts/sfremoteproductfinder.py
+++ b/lib/lp/bugs/scripts/sfremoteproductfinder.py
@@ -3,7 +3,6 @@
"""Utilities for the sfremoteproductfinder cronscript"""
-__metaclass__ = type
__all__ = [
'SourceForgeRemoteProductFinder',
]
diff --git a/lib/lp/bugs/scripts/tests/test_bugimport.py b/lib/lp/bugs/scripts/tests/test_bugimport.py
index 2e5d7e5..a0088a6 100644
--- a/lib/lp/bugs/scripts/tests/test_bugimport.py
+++ b/lib/lp/bugs/scripts/tests/test_bugimport.py
@@ -1,8 +1,6 @@
# Copyright 2009-2019 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
import os
import re
diff --git a/lib/lp/bugs/scripts/tests/test_bugnotification.py b/lib/lp/bugs/scripts/tests/test_bugnotification.py
index 7f61e4c..d56ddf2 100644
--- a/lib/lp/bugs/scripts/tests/test_bugnotification.py
+++ b/lib/lp/bugs/scripts/tests/test_bugnotification.py
@@ -2,8 +2,6 @@
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Tests for constructing bug notification emails for sending."""
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/bugs/scripts/tests/test_bugsummaryrebuild.py b/lib/lp/bugs/scripts/tests/test_bugsummaryrebuild.py
index f7530e2..864d1c4 100644
--- a/lib/lp/bugs/scripts/tests/test_bugsummaryrebuild.py
+++ b/lib/lp/bugs/scripts/tests/test_bugsummaryrebuild.py
@@ -1,8 +1,6 @@
# Copyright 2012-2021 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from testtools.content import text_content
from testtools.matchers import MatchesRegex
import transaction
diff --git a/lib/lp/bugs/scripts/tests/test_cveimport.py b/lib/lp/bugs/scripts/tests/test_cveimport.py
index c2ea76c..07fce85 100644
--- a/lib/lp/bugs/scripts/tests/test_cveimport.py
+++ b/lib/lp/bugs/scripts/tests/test_cveimport.py
@@ -1,8 +1,6 @@
# Copyright 2018 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
import gzip
import io
diff --git a/lib/lp/bugs/scripts/updateremoteproduct.py b/lib/lp/bugs/scripts/updateremoteproduct.py
index a30e72e..7b785f6 100644
--- a/lib/lp/bugs/scripts/updateremoteproduct.py
+++ b/lib/lp/bugs/scripts/updateremoteproduct.py
@@ -8,7 +8,6 @@ from the upstream bug tracker. It only updates multi-product bug
trackers, not single-product bug trackers or email-only bug trackers.
"""
-__metaclass__ = type
__all__ = ['RemoteProductUpdater']
from zope.component import getUtility
diff --git a/lib/lp/bugs/security.py b/lib/lp/bugs/security.py
index 40668d5..142bd5d 100644
--- a/lib/lp/bugs/security.py
+++ b/lib/lp/bugs/security.py
@@ -3,7 +3,6 @@
"""Security adapters for the bugs module."""
-__metaclass__ = type
__all__ = []
from lp.app.security import (
diff --git a/lib/lp/bugs/subscribers/bug.py b/lib/lp/bugs/subscribers/bug.py
index d88d27b..b6539bd 100644
--- a/lib/lp/bugs/subscribers/bug.py
+++ b/lib/lp/bugs/subscribers/bug.py
@@ -1,7 +1,6 @@
# Copyright 2009-2015 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'add_bug_change_notifications',
'get_bug_delta',
diff --git a/lib/lp/bugs/subscribers/bugactivity.py b/lib/lp/bugs/subscribers/bugactivity.py
index 9655239..7468e1a 100644
--- a/lib/lp/bugs/subscribers/bugactivity.py
+++ b/lib/lp/bugs/subscribers/bugactivity.py
@@ -1,8 +1,6 @@
# Copyright 2009-2016 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from lazr.enum import BaseItem
import six
from zope.component import getUtility
diff --git a/lib/lp/bugs/subscribers/bugcreation.py b/lib/lp/bugs/subscribers/bugcreation.py
index 19a9225..6254fa0 100644
--- a/lib/lp/bugs/subscribers/bugcreation.py
+++ b/lib/lp/bugs/subscribers/bugcreation.py
@@ -1,7 +1,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'at_least_one_task',
]
diff --git a/lib/lp/bugs/subscribers/buglastupdated.py b/lib/lp/bugs/subscribers/buglastupdated.py
index 88c13e4..a816b89 100644
--- a/lib/lp/bugs/subscribers/buglastupdated.py
+++ b/lib/lp/bugs/subscribers/buglastupdated.py
@@ -3,8 +3,6 @@
"""Subscriber functions to update IBug.date_last_updated."""
-__metaclass__ = type
-
from datetime import datetime
from lazr.lifecycle.interfaces import IObjectModifiedEvent
diff --git a/lib/lp/bugs/subscribers/bugtask.py b/lib/lp/bugs/subscribers/bugtask.py
index 88b2fe9..b702491 100644
--- a/lib/lp/bugs/subscribers/bugtask.py
+++ b/lib/lp/bugs/subscribers/bugtask.py
@@ -1,7 +1,6 @@
# Copyright 2010 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'notify_bugtask_edited',
]
diff --git a/lib/lp/bugs/subscribers/cve.py b/lib/lp/bugs/subscribers/cve.py
index 9c2ea58..33d1b45 100644
--- a/lib/lp/bugs/subscribers/cve.py
+++ b/lib/lp/bugs/subscribers/cve.py
@@ -1,8 +1,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from lp.services.database.constants import UTC_NOW
diff --git a/lib/lp/bugs/subscribers/tests/test_bug.py b/lib/lp/bugs/subscribers/tests/test_bug.py
index 19658d1..deb459d 100644
--- a/lib/lp/bugs/subscribers/tests/test_bug.py
+++ b/lib/lp/bugs/subscribers/tests/test_bug.py
@@ -1,8 +1,6 @@
# Copyright 2011-2014 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from storm.store import Store
from testtools.matchers import Is
diff --git a/lib/lp/bugs/tests/externalbugtracker.py b/lib/lp/bugs/tests/externalbugtracker.py
index 5050f76..a6b3ea4 100644
--- a/lib/lp/bugs/tests/externalbugtracker.py
+++ b/lib/lp/bugs/tests/externalbugtracker.py
@@ -3,8 +3,6 @@
"""Helper classes for testing ExternalSystem."""
-__metaclass__ = type
-
from contextlib import contextmanager
from copy import deepcopy
from datetime import (
diff --git a/lib/lp/bugs/tests/test_apportjob.py b/lib/lp/bugs/tests/test_apportjob.py
index 3074097..1abc69f 100644
--- a/lib/lp/bugs/tests/test_apportjob.py
+++ b/lib/lp/bugs/tests/test_apportjob.py
@@ -3,8 +3,6 @@
"""Tests for ApportJobs."""
-__metaclass__ = type
-
import os
import transaction
diff --git a/lib/lp/bugs/tests/test_bug.py b/lib/lp/bugs/tests/test_bug.py
index dacbea9..9598fb1 100644
--- a/lib/lp/bugs/tests/test_bug.py
+++ b/lib/lp/bugs/tests/test_bug.py
@@ -3,8 +3,6 @@
"""Tests for lp.bugs.model.Bug."""
-__metaclass__ = type
-
from datetime import timedelta
from lazr.lifecycle.snapshot import Snapshot
diff --git a/lib/lp/bugs/tests/test_bug_messages.py b/lib/lp/bugs/tests/test_bug_messages.py
index d9df0bc..40c4235 100644
--- a/lib/lp/bugs/tests/test_bug_messages.py
+++ b/lib/lp/bugs/tests/test_bug_messages.py
@@ -3,8 +3,6 @@
"""Webservice unit tests related to Launchpad Bugs."""
-__metaclass__ = type
-
from zope.component import getUtility
from lp.app.enums import InformationType
diff --git a/lib/lp/bugs/tests/test_bug_messages_webservice.py b/lib/lp/bugs/tests/test_bug_messages_webservice.py
index c9d1f47..44393d5 100644
--- a/lib/lp/bugs/tests/test_bug_messages_webservice.py
+++ b/lib/lp/bugs/tests/test_bug_messages_webservice.py
@@ -3,8 +3,6 @@
"""Webservice unit tests related to Launchpad Bug messages."""
-__metaclass__ = type
-
from testtools.matchers import HasLength
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
diff --git a/lib/lp/bugs/tests/test_bug_notification_recipients.py b/lib/lp/bugs/tests/test_bug_notification_recipients.py
index 4f7d678..cff8d21 100644
--- a/lib/lp/bugs/tests/test_bug_notification_recipients.py
+++ b/lib/lp/bugs/tests/test_bug_notification_recipients.py
@@ -3,8 +3,6 @@
"""Tests related to bug notification recipients."""
-__metaclass__ = type
-
from testtools.matchers import (
Equals,
GreaterThan,
diff --git a/lib/lp/bugs/tests/test_bugbranch.py b/lib/lp/bugs/tests/test_bugbranch.py
index 08e435b..43c16e4 100644
--- a/lib/lp/bugs/tests/test_bugbranch.py
+++ b/lib/lp/bugs/tests/test_bugbranch.py
@@ -3,8 +3,6 @@
"""Tests for bug-branch linking from the bugs side."""
-__metaclass__ = type
-
from zope.component import getUtility
from zope.security.interfaces import Unauthorized
diff --git a/lib/lp/bugs/tests/test_buglinktarget.py b/lib/lp/bugs/tests/test_buglinktarget.py
index 5d164d4..62f7109 100644
--- a/lib/lp/bugs/tests/test_buglinktarget.py
+++ b/lib/lp/bugs/tests/test_buglinktarget.py
@@ -7,8 +7,6 @@ This module will run the interface test against the CVE, Specification,
Question, and BranchMergeProposal implementations of that interface.
"""
-__metaclass__ = type
-
__all__ = []
import unittest
diff --git a/lib/lp/bugs/tests/test_bugnomination.py b/lib/lp/bugs/tests/test_bugnomination.py
index fd17968..94d5578 100644
--- a/lib/lp/bugs/tests/test_bugnomination.py
+++ b/lib/lp/bugs/tests/test_bugnomination.py
@@ -3,8 +3,6 @@
"""Tests related to bug nominations."""
-__metaclass__ = type
-
from zope.component import getUtility
from lp.app.errors import NotFoundError
diff --git a/lib/lp/bugs/tests/test_bugnotification.py b/lib/lp/bugs/tests/test_bugnotification.py
index 6672082..c1d673e 100644
--- a/lib/lp/bugs/tests/test_bugnotification.py
+++ b/lib/lp/bugs/tests/test_bugnotification.py
@@ -3,8 +3,6 @@
"""Tests related to bug notifications."""
-__metaclass__ = type
-
from datetime import datetime
import pytz
diff --git a/lib/lp/bugs/tests/test_bugs_webservice.py b/lib/lp/bugs/tests/test_bugs_webservice.py
index 7fa7f0e..6dd7137 100644
--- a/lib/lp/bugs/tests/test_bugs_webservice.py
+++ b/lib/lp/bugs/tests/test_bugs_webservice.py
@@ -3,8 +3,6 @@
"""Webservice unit tests related to Launchpad Bugs."""
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/bugs/tests/test_bugsearch_conjoined.py b/lib/lp/bugs/tests/test_bugsearch_conjoined.py
index faf1e7f..5b572df 100644
--- a/lib/lp/bugs/tests/test_bugsearch_conjoined.py
+++ b/lib/lp/bugs/tests/test_bugsearch_conjoined.py
@@ -3,8 +3,6 @@
"""Test for the exclude_conjoined_tasks param for BugTaskSearchParams."""
-__metaclass__ = type
-
__all__ = []
from storm.store import Store
diff --git a/lib/lp/bugs/tests/test_bugsubscription.py b/lib/lp/bugs/tests/test_bugsubscription.py
index d665841..768f3b0 100644
--- a/lib/lp/bugs/tests/test_bugsubscription.py
+++ b/lib/lp/bugs/tests/test_bugsubscription.py
@@ -3,8 +3,6 @@
"""Tests for BugSubscriptions."""
-__metaclass__ = type
-
import json
from testtools.matchers import LessThan
diff --git a/lib/lp/bugs/tests/test_bugsupervisor_bugnomination.py b/lib/lp/bugs/tests/test_bugsupervisor_bugnomination.py
index db63214..e042e61 100644
--- a/lib/lp/bugs/tests/test_bugsupervisor_bugnomination.py
+++ b/lib/lp/bugs/tests/test_bugsupervisor_bugnomination.py
@@ -3,8 +3,6 @@
"""Tests related to bug nominations for an object with a bug supervisor."""
-__metaclass__ = type
-
from lp.bugs.interfaces.bugnomination import (
NominationError,
NominationSeriesObsoleteError,
diff --git a/lib/lp/bugs/tests/test_bugtarget.py b/lib/lp/bugs/tests/test_bugtarget.py
index e484118..7ee0fd5 100644
--- a/lib/lp/bugs/tests/test_bugtarget.py
+++ b/lib/lp/bugs/tests/test_bugtarget.py
@@ -7,7 +7,6 @@ This module runs the interface test against the Product, ProductSeries
ProjectGroup, DistributionSourcePackage, and DistroSeries implementations
IBugTarget. It runs the bugtarget-questiontarget.txt test.
"""
-__metaclass__ = type
__all__ = []
diff --git a/lib/lp/bugs/tests/test_bugtarget2.py b/lib/lp/bugs/tests/test_bugtarget2.py
index 638121c..9f50d1e 100644
--- a/lib/lp/bugs/tests/test_bugtarget2.py
+++ b/lib/lp/bugs/tests/test_bugtarget2.py
@@ -3,8 +3,6 @@
"""Tests for BugTargets."""
-__metaclass__ = type
-
from zope.security.interfaces import ForbiddenAttribute
from lp.bugs.interfaces.bugtarget import ISeriesBugTarget
diff --git a/lib/lp/bugs/tests/test_bugtaskfilter.py b/lib/lp/bugs/tests/test_bugtaskfilter.py
index 0151345..476ac2c 100644
--- a/lib/lp/bugs/tests/test_bugtaskfilter.py
+++ b/lib/lp/bugs/tests/test_bugtaskfilter.py
@@ -3,8 +3,6 @@
"""Tests for lp.bugs.interfaces.bugtaskfilter."""
-__metaclass__ = type
-
from testtools.matchers import Equals
from lp.bugs.interfaces.bugtaskfilter import filter_bugtasks_by_context
diff --git a/lib/lp/bugs/tests/test_bugtaskflat_triggers.py b/lib/lp/bugs/tests/test_bugtaskflat_triggers.py
index f013d83..0b77ce3 100644
--- a/lib/lp/bugs/tests/test_bugtaskflat_triggers.py
+++ b/lib/lp/bugs/tests/test_bugtaskflat_triggers.py
@@ -1,8 +1,6 @@
# Copyright 2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from collections import namedtuple
from contextlib import contextmanager
diff --git a/lib/lp/bugs/tests/test_bugtaskset.py b/lib/lp/bugs/tests/test_bugtaskset.py
index 0497f43..f6bd8f4 100644
--- a/lib/lp/bugs/tests/test_bugtaskset.py
+++ b/lib/lp/bugs/tests/test_bugtaskset.py
@@ -3,8 +3,6 @@
"""Tests for BugTaskSet."""
-__metaclass__ = type
-
from zope.component import getUtility
from lp.bugs.interfaces.bug import IBugSet
diff --git a/lib/lp/bugs/tests/test_bugtracker.py b/lib/lp/bugs/tests/test_bugtracker.py
index bd78368..1de0a76 100644
--- a/lib/lp/bugs/tests/test_bugtracker.py
+++ b/lib/lp/bugs/tests/test_bugtracker.py
@@ -1,8 +1,6 @@
# Copyright 2009-2020 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/bugs/tests/test_bugtracker_components.py b/lib/lp/bugs/tests/test_bugtracker_components.py
index e411c12..a30a522 100644
--- a/lib/lp/bugs/tests/test_bugtracker_components.py
+++ b/lib/lp/bugs/tests/test_bugtracker_components.py
@@ -3,8 +3,6 @@
"""Test for components and component groups (products) in bug trackers."""
-__metaclass__ = type
-
__all__ = []
import transaction
diff --git a/lib/lp/bugs/tests/test_bugtracker_vocabulary.py b/lib/lp/bugs/tests/test_bugtracker_vocabulary.py
index 883f0ce..d01c9da 100644
--- a/lib/lp/bugs/tests/test_bugtracker_vocabulary.py
+++ b/lib/lp/bugs/tests/test_bugtracker_vocabulary.py
@@ -3,8 +3,6 @@
"""Test the bug tracker vocabularies."""
-__metaclass__ = type
-
from zope.schema.vocabulary import getVocabularyRegistry
from lp.bugs.interfaces.bugtracker import BugTrackerType
diff --git a/lib/lp/bugs/tests/test_bugwatch.py b/lib/lp/bugs/tests/test_bugwatch.py
index 73a2108..7b1ac7c 100644
--- a/lib/lp/bugs/tests/test_bugwatch.py
+++ b/lib/lp/bugs/tests/test_bugwatch.py
@@ -3,8 +3,6 @@
"""Tests for BugWatchSet."""
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/bugs/tests/test_bzremotecomponentfinder.py b/lib/lp/bugs/tests/test_bzremotecomponentfinder.py
index 767d84b..0bdf42b 100644
--- a/lib/lp/bugs/tests/test_bzremotecomponentfinder.py
+++ b/lib/lp/bugs/tests/test_bzremotecomponentfinder.py
@@ -3,8 +3,6 @@
"""Tests cronscript for retriving components from remote Bugzillas"""
-__metaclass__ = type
-
__all__ = []
import os
diff --git a/lib/lp/bugs/tests/test_errors.py b/lib/lp/bugs/tests/test_errors.py
index b1d8dfb..aea8a32 100644
--- a/lib/lp/bugs/tests/test_errors.py
+++ b/lib/lp/bugs/tests/test_errors.py
@@ -3,10 +3,6 @@
"""Tests for bugs errors."""
-
-__metaclass__ = type
-
-
from six.moves.http_client import EXPECTATION_FAILED
from lp.bugs.errors import InvalidDuplicateValue
diff --git a/lib/lp/bugs/tests/test_externalbugtracker.py b/lib/lp/bugs/tests/test_externalbugtracker.py
index 30b4918..f049a08 100644
--- a/lib/lp/bugs/tests/test_externalbugtracker.py
+++ b/lib/lp/bugs/tests/test_externalbugtracker.py
@@ -3,8 +3,6 @@
"""Test related to ExternalBugtracker test infrastructure."""
-__metaclass__ = type
-
__all__ = []
import unittest
diff --git a/lib/lp/bugs/tests/test_publisher.py b/lib/lp/bugs/tests/test_publisher.py
index c7c9bb9..f767f5f 100644
--- a/lib/lp/bugs/tests/test_publisher.py
+++ b/lib/lp/bugs/tests/test_publisher.py
@@ -3,8 +3,6 @@
"""Tests for bugs' custom publications."""
-__metaclass__ = type
-
from lp.bugs.publisher import BugsLayer
from lp.layers import WebServiceLayer
from lp.services.config import config
diff --git a/lib/lp/bugs/tests/test_searchtasks_webservice.py b/lib/lp/bugs/tests/test_searchtasks_webservice.py
index 14d4be2..62133ca 100644
--- a/lib/lp/bugs/tests/test_searchtasks_webservice.py
+++ b/lib/lp/bugs/tests/test_searchtasks_webservice.py
@@ -3,9 +3,6 @@
"""Webservice unit tests related to Launchpad Bugs."""
-__metaclass__ = type
-
-
from lp.app.enums import InformationType
from lp.bugs.interfaces.bugtask import BugTaskStatusSearch
from lp.testing import (
diff --git a/lib/lp/bugs/tests/test_structuralsubscription.py b/lib/lp/bugs/tests/test_structuralsubscription.py
index 8678532..334cfcf 100644
--- a/lib/lp/bugs/tests/test_structuralsubscription.py
+++ b/lib/lp/bugs/tests/test_structuralsubscription.py
@@ -3,8 +3,6 @@
"""Tests for `StructuralSubscription`."""
-__metaclass__ = type
-
from storm.store import (
EmptyResultSet,
ResultSet,
diff --git a/lib/lp/bugs/tests/test_structuralsubscriptiontarget.py b/lib/lp/bugs/tests/test_structuralsubscriptiontarget.py
index cb559c9..9d75005 100644
--- a/lib/lp/bugs/tests/test_structuralsubscriptiontarget.py
+++ b/lib/lp/bugs/tests/test_structuralsubscriptiontarget.py
@@ -4,7 +4,6 @@
"""Test harness for running tests against IStructuralsubscriptionTarget
implementations.
"""
-__metaclass__ = type
import unittest
diff --git a/lib/lp/bugs/tests/test_subscribers.py b/lib/lp/bugs/tests/test_subscribers.py
index d5b259d..dfe5d3e 100644
--- a/lib/lp/bugs/tests/test_subscribers.py
+++ b/lib/lp/bugs/tests/test_subscribers.py
@@ -3,8 +3,6 @@
"""Tests for the BugActivity code."""
-__metaclass__ = type
-
from lazr.lifecycle.event import ObjectModifiedEvent
from lazr.lifecycle.snapshot import Snapshot
diff --git a/lib/lp/bugs/tests/test_vocabulary.py b/lib/lp/bugs/tests/test_vocabulary.py
index 9e462e6..a542038 100644
--- a/lib/lp/bugs/tests/test_vocabulary.py
+++ b/lib/lp/bugs/tests/test_vocabulary.py
@@ -3,8 +3,6 @@
"""Test the bug domain vocabularies."""
-__metaclass__ = type
-
from lp.bugs.vocabularies import (
BugTaskMilestoneVocabulary,
UsesBugsDistributionVocabulary,
diff --git a/lib/lp/bugs/tests/test_yuitests.py b/lib/lp/bugs/tests/test_yuitests.py
index 0f9a4b1..88958ca 100644
--- a/lib/lp/bugs/tests/test_yuitests.py
+++ b/lib/lp/bugs/tests/test_yuitests.py
@@ -3,7 +3,6 @@
"""Run YUI.test tests."""
-__metaclass__ = type
__all__ = []
from lp.testing import (
diff --git a/lib/lp/bugs/utilities/filebugdataparser.py b/lib/lp/bugs/utilities/filebugdataparser.py
index 4ffc0a1..7a7c95c 100644
--- a/lib/lp/bugs/utilities/filebugdataparser.py
+++ b/lib/lp/bugs/utilities/filebugdataparser.py
@@ -2,7 +2,6 @@
# GNU Affero General Public License version 3 (see the file LICENSE).
"""A parser for FileBug data BLOBs"""
-__metaclass__ = type
__all__ = [
'FileBugData',
'FileBugDataParser',
diff --git a/lib/lp/bugs/utilities/tests/test_filebugdataparser.py b/lib/lp/bugs/utilities/tests/test_filebugdataparser.py
index d0d3734..2008f81 100644
--- a/lib/lp/bugs/utilities/tests/test_filebugdataparser.py
+++ b/lib/lp/bugs/utilities/tests/test_filebugdataparser.py
@@ -9,8 +9,6 @@ information is uploaded as a MIME multipart message, where the different
headers tells Launchpad what kind of information it is.
"""
-__metaclass__ = type
-
import base64
import io
from textwrap import dedent
diff --git a/lib/lp/bugs/vocabularies.py b/lib/lp/bugs/vocabularies.py
index 5c4c70a..95d1954 100644
--- a/lib/lp/bugs/vocabularies.py
+++ b/lib/lp/bugs/vocabularies.py
@@ -3,7 +3,6 @@
"""Bug domain vocabularies"""
-__metaclass__ = type
__all__ = [
'UsesBugsDistributionVocabulary',
'BugNominatableDistroSeriesVocabulary',
diff --git a/lib/lp/bugs/xmlrpc/bug.py b/lib/lp/bugs/xmlrpc/bug.py
index 9fc157f..b387e1c 100644
--- a/lib/lp/bugs/xmlrpc/bug.py
+++ b/lib/lp/bugs/xmlrpc/bug.py
@@ -3,7 +3,6 @@
"""XML-RPC APIs for Malone."""
-__metaclass__ = type
__all__ = [
"ExternalBugTrackerTokenAPI",
"FileBugAPI",
diff --git a/lib/lp/buildmaster/browser/builder.py b/lib/lp/buildmaster/browser/builder.py
index 37d388f..ac718de 100644
--- a/lib/lp/buildmaster/browser/builder.py
+++ b/lib/lp/buildmaster/browser/builder.py
@@ -3,8 +3,6 @@
"""Browser views for builders."""
-__metaclass__ = type
-
__all__ = [
'BuilderOverviewMenu',
'BuilderNavigation',
diff --git a/lib/lp/buildmaster/browser/processor.py b/lib/lp/buildmaster/browser/processor.py
index 7e49a84..145f1f2 100644
--- a/lib/lp/buildmaster/browser/processor.py
+++ b/lib/lp/buildmaster/browser/processor.py
@@ -3,8 +3,6 @@
"""Navigation views for processors."""
-__metaclass__ = type
-
__all__ = [
'ProcessorSetNavigation',
]
diff --git a/lib/lp/buildmaster/browser/tests/test_builder.py b/lib/lp/buildmaster/browser/tests/test_builder.py
index 9072c47..c9185ff 100644
--- a/lib/lp/buildmaster/browser/tests/test_builder.py
+++ b/lib/lp/buildmaster/browser/tests/test_builder.py
@@ -3,8 +3,6 @@
"""Tests for the lp.soyuz.browser.builder module."""
-__metaclass__ = type
-
from datetime import timedelta
from zope.component import getUtility
diff --git a/lib/lp/buildmaster/browser/tests/test_builder_views.py b/lib/lp/buildmaster/browser/tests/test_builder_views.py
index 4d5c76e..5a903ce 100644
--- a/lib/lp/buildmaster/browser/tests/test_builder_views.py
+++ b/lib/lp/buildmaster/browser/tests/test_builder_views.py
@@ -1,8 +1,6 @@
# Copyright 2009-2018 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from functools import partial
import soupmatchers
diff --git a/lib/lp/buildmaster/browser/tests/test_processor.py b/lib/lp/buildmaster/browser/tests/test_processor.py
index 0fa3928..3743881 100644
--- a/lib/lp/buildmaster/browser/tests/test_processor.py
+++ b/lib/lp/buildmaster/browser/tests/test_processor.py
@@ -3,8 +3,6 @@
"""Tests for process navigation."""
-__metaclass__ = type
-
from lp.services.webapp.publisher import canonical_url
from lp.testing import TestCaseWithFactory
from lp.testing.layers import DatabaseFunctionalLayer
diff --git a/lib/lp/buildmaster/builderproxy.py b/lib/lp/buildmaster/builderproxy.py
index 7ff9870..aeb55c9 100644
--- a/lib/lp/buildmaster/builderproxy.py
+++ b/lib/lp/buildmaster/builderproxy.py
@@ -10,7 +10,6 @@ authenticated proxy; we provide builds with the necessary authentication
token if and only if they are allowed general internet access.
"""
-__metaclass__ = type
__all__ = [
"BuilderProxyMixin",
]
diff --git a/lib/lp/buildmaster/downloader.py b/lib/lp/buildmaster/downloader.py
index 214918b..ae795bd 100644
--- a/lib/lp/buildmaster/downloader.py
+++ b/lib/lp/buildmaster/downloader.py
@@ -7,7 +7,6 @@ To minimise subprocess memory use, this intentionally avoids importing
anything from the rest of Launchpad.
"""
-__metaclass__ = type
__all__ = [
'DownloadCommand',
'RequestProcess',
diff --git a/lib/lp/buildmaster/enums.py b/lib/lp/buildmaster/enums.py
index b3f0abb..1978130 100644
--- a/lib/lp/buildmaster/enums.py
+++ b/lib/lp/buildmaster/enums.py
@@ -3,8 +3,6 @@
"""Common build interfaces."""
-__metaclass__ = type
-
__all__ = [
'BuildBaseImageType',
'BuilderCleanStatus',
diff --git a/lib/lp/buildmaster/interactor.py b/lib/lp/buildmaster/interactor.py
index 69976c2..178b8d1 100644
--- a/lib/lp/buildmaster/interactor.py
+++ b/lib/lp/buildmaster/interactor.py
@@ -1,8 +1,6 @@
# Copyright 2009-2021 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = [
'BuilderInteractor',
'extract_vitals_from_db',
diff --git a/lib/lp/buildmaster/interfaces/builder.py b/lib/lp/buildmaster/interfaces/builder.py
index a827192..acd1dfd 100644
--- a/lib/lp/buildmaster/interfaces/builder.py
+++ b/lib/lp/buildmaster/interfaces/builder.py
@@ -3,8 +3,6 @@
"""Builder interfaces."""
-__metaclass__ = type
-
__all__ = [
'BuildDaemonError',
'BuildDaemonIsolationError',
diff --git a/lib/lp/buildmaster/interfaces/buildfarmjob.py b/lib/lp/buildmaster/interfaces/buildfarmjob.py
index 0d7a600..86d62e5 100644
--- a/lib/lp/buildmaster/interfaces/buildfarmjob.py
+++ b/lib/lp/buildmaster/interfaces/buildfarmjob.py
@@ -3,8 +3,6 @@
"""Interface for Soyuz build farm jobs."""
-__metaclass__ = type
-
__all__ = [
'IBuildFarmJob',
'IBuildFarmJobDB',
diff --git a/lib/lp/buildmaster/interfaces/buildfarmjobbehaviour.py b/lib/lp/buildmaster/interfaces/buildfarmjobbehaviour.py
index 651bd05..2b19a11 100644
--- a/lib/lp/buildmaster/interfaces/buildfarmjobbehaviour.py
+++ b/lib/lp/buildmaster/interfaces/buildfarmjobbehaviour.py
@@ -3,8 +3,6 @@
"""Interface for build farm job behaviours."""
-__metaclass__ = type
-
__all__ = [
'IBuildFarmJobBehaviour',
]
diff --git a/lib/lp/buildmaster/interfaces/buildqueue.py b/lib/lp/buildmaster/interfaces/buildqueue.py
index ee35a7a..151972e 100644
--- a/lib/lp/buildmaster/interfaces/buildqueue.py
+++ b/lib/lp/buildmaster/interfaces/buildqueue.py
@@ -3,8 +3,6 @@
"""Build interfaces."""
-__metaclass__ = type
-
__all__ = [
'IBuildQueue',
'IBuildQueueSet',
diff --git a/lib/lp/buildmaster/interfaces/packagebuild.py b/lib/lp/buildmaster/interfaces/packagebuild.py
index 7d7b976..d911ad3 100644
--- a/lib/lp/buildmaster/interfaces/packagebuild.py
+++ b/lib/lp/buildmaster/interfaces/packagebuild.py
@@ -2,7 +2,7 @@
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Interface for package-specific builds."""
-__metaclass__ = type
+
__all__ = [
'IPackageBuild',
]
diff --git a/lib/lp/buildmaster/interfaces/processor.py b/lib/lp/buildmaster/interfaces/processor.py
index f80b5bc..a77e665 100644
--- a/lib/lp/buildmaster/interfaces/processor.py
+++ b/lib/lp/buildmaster/interfaces/processor.py
@@ -3,8 +3,6 @@
"""Processor interfaces."""
-__metaclass__ = type
-
__all__ = [
'IProcessor',
'IProcessorSet',
diff --git a/lib/lp/buildmaster/manager.py b/lib/lp/buildmaster/manager.py
index 039d215..f893d85 100644
--- a/lib/lp/buildmaster/manager.py
+++ b/lib/lp/buildmaster/manager.py
@@ -3,8 +3,6 @@
"""Soyuz buildd slave manager logic."""
-__metaclass__ = type
-
__all__ = [
'BuilddManager',
'BUILDD_MANAGER_LOG_NAME',
diff --git a/lib/lp/buildmaster/model/builder.py b/lib/lp/buildmaster/model/builder.py
index a5f23bd..d340659 100644
--- a/lib/lp/buildmaster/model/builder.py
+++ b/lib/lp/buildmaster/model/builder.py
@@ -1,8 +1,6 @@
# Copyright 2009-2020 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = [
'Builder',
'BuilderProcessor',
diff --git a/lib/lp/buildmaster/model/buildfarmjob.py b/lib/lp/buildmaster/model/buildfarmjob.py
index 51e90af..86ff563 100644
--- a/lib/lp/buildmaster/model/buildfarmjob.py
+++ b/lib/lp/buildmaster/model/buildfarmjob.py
@@ -2,7 +2,6 @@
# the GNU Affero General Public License version 3 (see the file
# LICENSE).
-__metaclass__ = type
__all__ = [
'BuildFarmJob',
'BuildFarmJobMixin',
diff --git a/lib/lp/buildmaster/model/buildfarmjobbehaviour.py b/lib/lp/buildmaster/model/buildfarmjobbehaviour.py
index 0572cda..9cac6e9 100644
--- a/lib/lp/buildmaster/model/buildfarmjobbehaviour.py
+++ b/lib/lp/buildmaster/model/buildfarmjobbehaviour.py
@@ -3,8 +3,6 @@
"""Base and idle BuildFarmJobBehaviour classes."""
-__metaclass__ = type
-
__all__ = [
'BuildFarmJobBehaviourBase',
]
diff --git a/lib/lp/buildmaster/model/buildqueue.py b/lib/lp/buildmaster/model/buildqueue.py
index decd388..ac1ece2 100644
--- a/lib/lp/buildmaster/model/buildqueue.py
+++ b/lib/lp/buildmaster/model/buildqueue.py
@@ -1,8 +1,6 @@
# Copyright 2009-2021 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = [
'BuildQueue',
'BuildQueueSet',
diff --git a/lib/lp/buildmaster/model/packagebuild.py b/lib/lp/buildmaster/model/packagebuild.py
index 9b84aee..b257289 100644
--- a/lib/lp/buildmaster/model/packagebuild.py
+++ b/lib/lp/buildmaster/model/packagebuild.py
@@ -1,7 +1,6 @@
# Copyright 2010-2018 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'PackageBuildMixin',
]
diff --git a/lib/lp/buildmaster/model/processor.py b/lib/lp/buildmaster/model/processor.py
index ecf3042..68d9581 100644
--- a/lib/lp/buildmaster/model/processor.py
+++ b/lib/lp/buildmaster/model/processor.py
@@ -1,7 +1,6 @@
# Copyright 2009-2013 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'Processor',
'ProcessorSet',
diff --git a/lib/lp/buildmaster/queuedepth.py b/lib/lp/buildmaster/queuedepth.py
index c49a3ff..c4612fa 100644
--- a/lib/lp/buildmaster/queuedepth.py
+++ b/lib/lp/buildmaster/queuedepth.py
@@ -1,8 +1,6 @@
# Copyright 2009-2013 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = [
'estimate_job_start_time',
]
diff --git a/lib/lp/buildmaster/security.py b/lib/lp/buildmaster/security.py
index cf2a92e..abd59af 100644
--- a/lib/lp/buildmaster/security.py
+++ b/lib/lp/buildmaster/security.py
@@ -3,7 +3,6 @@
"""Security adapters for the buildmaster package."""
-__metaclass__ = type
__all__ = [
'ViewBuilder',
'ViewProcessor',
diff --git a/lib/lp/buildmaster/tests/builderproxy.py b/lib/lp/buildmaster/tests/builderproxy.py
index 96a6a4b..12944e5 100644
--- a/lib/lp/buildmaster/tests/builderproxy.py
+++ b/lib/lp/buildmaster/tests/builderproxy.py
@@ -3,8 +3,6 @@
"""Fixtures for dealing with the build time HTTP proxy."""
-__metaclass__ = type
-
from datetime import datetime
import json
from textwrap import dedent
diff --git a/lib/lp/buildmaster/tests/harness.py b/lib/lp/buildmaster/tests/harness.py
index 0c55b81..d8a1617 100644
--- a/lib/lp/buildmaster/tests/harness.py
+++ b/lib/lp/buildmaster/tests/harness.py
@@ -3,8 +3,6 @@
"""TacHandler for `buildd-manager` daemon."""
-__metaclass__ = type
-
__all__ = [
'BuilddManagerTestSetup',
]
diff --git a/lib/lp/buildmaster/tests/mock_slaves.py b/lib/lp/buildmaster/tests/mock_slaves.py
index f419b25..df9d0fb 100644
--- a/lib/lp/buildmaster/tests/mock_slaves.py
+++ b/lib/lp/buildmaster/tests/mock_slaves.py
@@ -3,8 +3,6 @@
"""Mock Build objects for tests soyuz buildd-system."""
-__metaclass__ = type
-
__all__ = [
'AbortingSlave',
'BrokenSlave',
diff --git a/lib/lp/buildmaster/tests/test_buildfarmjob.py b/lib/lp/buildmaster/tests/test_buildfarmjob.py
index 85a49a9..ae26830 100644
--- a/lib/lp/buildmaster/tests/test_buildfarmjob.py
+++ b/lib/lp/buildmaster/tests/test_buildfarmjob.py
@@ -3,8 +3,6 @@
"""Tests for `IBuildFarmJob`."""
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/buildmaster/tests/test_buildfarmjobbehaviour.py b/lib/lp/buildmaster/tests/test_buildfarmjobbehaviour.py
index 2c6106e..3d09daa 100644
--- a/lib/lp/buildmaster/tests/test_buildfarmjobbehaviour.py
+++ b/lib/lp/buildmaster/tests/test_buildfarmjobbehaviour.py
@@ -3,8 +3,6 @@
"""Unit tests for BuildFarmJobBehaviourBase."""
-__metaclass__ = type
-
from collections import OrderedDict
from datetime import datetime
import hashlib
diff --git a/lib/lp/buildmaster/tests/test_packagebuild.py b/lib/lp/buildmaster/tests/test_packagebuild.py
index ea171f8..6a57f6b 100644
--- a/lib/lp/buildmaster/tests/test_packagebuild.py
+++ b/lib/lp/buildmaster/tests/test_packagebuild.py
@@ -3,8 +3,6 @@
"""Tests for `IPackageBuild`."""
-__metaclass__ = type
-
import hashlib
from storm.store import Store
diff --git a/lib/lp/buildmaster/tests/test_webservice.py b/lib/lp/buildmaster/tests/test_webservice.py
index 36a6350..34aeb90 100644
--- a/lib/lp/buildmaster/tests/test_webservice.py
+++ b/lib/lp/buildmaster/tests/test_webservice.py
@@ -3,8 +3,6 @@
"""Tests for the builders webservice ."""
-__metaclass__ = type
-
from json import dumps
from testtools.matchers import Equals
diff --git a/lib/lp/buildmaster/vocabularies.py b/lib/lp/buildmaster/vocabularies.py
index cc4177e..2752b44 100644
--- a/lib/lp/buildmaster/vocabularies.py
+++ b/lib/lp/buildmaster/vocabularies.py
@@ -3,8 +3,6 @@
"""Soyuz vocabularies."""
-__metaclass__ = type
-
__all__ = [
'ProcessorVocabulary',
]
diff --git a/lib/lp/charms/adapters/buildarch.py b/lib/lp/charms/adapters/buildarch.py
index d6f96fd..d0c8c8e 100644
--- a/lib/lp/charms/adapters/buildarch.py
+++ b/lib/lp/charms/adapters/buildarch.py
@@ -1,7 +1,6 @@
# Copyright 2021 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
"determine_instances_to_build",
]
diff --git a/lib/lp/charms/adapters/tests/test_buildarch.py b/lib/lp/charms/adapters/tests/test_buildarch.py
index 0ba3aa3..6281def 100644
--- a/lib/lp/charms/adapters/tests/test_buildarch.py
+++ b/lib/lp/charms/adapters/tests/test_buildarch.py
@@ -1,8 +1,6 @@
# Copyright 2021 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from functools import partial
from testscenarios import (
diff --git a/lib/lp/charms/browser/charmrecipe.py b/lib/lp/charms/browser/charmrecipe.py
index 5bb2a59..b09b778 100644
--- a/lib/lp/charms/browser/charmrecipe.py
+++ b/lib/lp/charms/browser/charmrecipe.py
@@ -3,7 +3,6 @@
"""Charm recipe views."""
-__metaclass__ = type
__all__ = [
"CharmRecipeAddView",
"CharmRecipeAdminView",
diff --git a/lib/lp/charms/browser/charmrecipebuild.py b/lib/lp/charms/browser/charmrecipebuild.py
index 518d8c3..971bd6b 100644
--- a/lib/lp/charms/browser/charmrecipebuild.py
+++ b/lib/lp/charms/browser/charmrecipebuild.py
@@ -3,7 +3,6 @@
"""Charm recipe build views."""
-__metaclass__ = type
__all__ = [
"CharmRecipeBuildContextMenu",
"CharmRecipeBuildNavigation",
diff --git a/lib/lp/charms/browser/charmrecipelisting.py b/lib/lp/charms/browser/charmrecipelisting.py
index 4105419..d51008c 100644
--- a/lib/lp/charms/browser/charmrecipelisting.py
+++ b/lib/lp/charms/browser/charmrecipelisting.py
@@ -3,8 +3,6 @@
"""Base class view for charm recipe listings."""
-__metaclass__ = type
-
__all__ = [
"GitCharmRecipeListingView",
"PersonCharmRecipeListingView",
diff --git a/lib/lp/charms/browser/hascharmrecipes.py b/lib/lp/charms/browser/hascharmrecipes.py
index 7243201..b73f866 100644
--- a/lib/lp/charms/browser/hascharmrecipes.py
+++ b/lib/lp/charms/browser/hascharmrecipes.py
@@ -3,7 +3,6 @@
"""Mixins for browser classes for objects that have charm recipes."""
-__metaclass__ = type
__all__ = [
"HasCharmRecipesMenuMixin",
"HasCharmRecipesViewMixin",
diff --git a/lib/lp/charms/browser/tests/test_charmrecipe.py b/lib/lp/charms/browser/tests/test_charmrecipe.py
index b665f96..1439306 100644
--- a/lib/lp/charms/browser/tests/test_charmrecipe.py
+++ b/lib/lp/charms/browser/tests/test_charmrecipe.py
@@ -3,8 +3,6 @@
"""Test charm recipe views."""
-__metaclass__ = type
-
import base64
from datetime import (
datetime,
diff --git a/lib/lp/charms/browser/tests/test_charmrecipebuild.py b/lib/lp/charms/browser/tests/test_charmrecipebuild.py
index 0abb77b..588eae8 100644
--- a/lib/lp/charms/browser/tests/test_charmrecipebuild.py
+++ b/lib/lp/charms/browser/tests/test_charmrecipebuild.py
@@ -3,8 +3,6 @@
"""Test charm recipe build views."""
-__metaclass__ = type
-
import re
from fixtures import FakeLogger
diff --git a/lib/lp/charms/browser/tests/test_charmrecipelisting.py b/lib/lp/charms/browser/tests/test_charmrecipelisting.py
index 792ca1f..ceba165 100644
--- a/lib/lp/charms/browser/tests/test_charmrecipelisting.py
+++ b/lib/lp/charms/browser/tests/test_charmrecipelisting.py
@@ -3,8 +3,6 @@
"""Test charm recipe listings."""
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/charms/browser/tests/test_hascharmrecipes.py b/lib/lp/charms/browser/tests/test_hascharmrecipes.py
index ff00c6e..f53aa6b 100644
--- a/lib/lp/charms/browser/tests/test_hascharmrecipes.py
+++ b/lib/lp/charms/browser/tests/test_hascharmrecipes.py
@@ -3,8 +3,6 @@
"""Test views for objects that have charm recipes."""
-__metaclass__ = type
-
import soupmatchers
from testscenarios import (
load_tests_apply_scenarios,
diff --git a/lib/lp/charms/browser/widgets/charmrecipebuildchannels.py b/lib/lp/charms/browser/widgets/charmrecipebuildchannels.py
index 616293e..e1b59cc 100644
--- a/lib/lp/charms/browser/widgets/charmrecipebuildchannels.py
+++ b/lib/lp/charms/browser/widgets/charmrecipebuildchannels.py
@@ -3,7 +3,6 @@
"""A widget for selecting source snap channels for charm recipe builds."""
-__metaclass__ = type
__all__ = [
"CharmRecipeBuildChannelsWidget",
]
diff --git a/lib/lp/charms/browser/widgets/tests/test_charmrecipebuildchannelswidget.py b/lib/lp/charms/browser/widgets/tests/test_charmrecipebuildchannelswidget.py
index ed1653c..834c801 100644
--- a/lib/lp/charms/browser/widgets/tests/test_charmrecipebuildchannelswidget.py
+++ b/lib/lp/charms/browser/widgets/tests/test_charmrecipebuildchannelswidget.py
@@ -1,8 +1,6 @@
# Copyright 2021 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
import re
from zope.formlib.interfaces import (
diff --git a/lib/lp/charms/interfaces/charmrecipe.py b/lib/lp/charms/interfaces/charmrecipe.py
index 4fb1b66..b48495e 100644
--- a/lib/lp/charms/interfaces/charmrecipe.py
+++ b/lib/lp/charms/interfaces/charmrecipe.py
@@ -3,7 +3,6 @@
"""Charm recipe interfaces."""
-__metaclass__ = type
__all__ = [
"BadCharmRecipeSource",
"BadCharmRecipeSearchContext",
diff --git a/lib/lp/charms/interfaces/charmrecipebuild.py b/lib/lp/charms/interfaces/charmrecipebuild.py
index c4de03d..4a33e19 100644
--- a/lib/lp/charms/interfaces/charmrecipebuild.py
+++ b/lib/lp/charms/interfaces/charmrecipebuild.py
@@ -3,7 +3,6 @@
"""Charm recipe build interfaces."""
-__metaclass__ = type
__all__ = [
"CannotScheduleStoreUpload",
"CharmRecipeBuildStoreUploadStatus",
diff --git a/lib/lp/charms/interfaces/charmrecipebuildjob.py b/lib/lp/charms/interfaces/charmrecipebuildjob.py
index 2ae320d..40e0ece 100644
--- a/lib/lp/charms/interfaces/charmrecipebuildjob.py
+++ b/lib/lp/charms/interfaces/charmrecipebuildjob.py
@@ -3,7 +3,6 @@
"""Charm recipe build job interfaces."""
-__metaclass__ = type
__all__ = [
'ICharmRecipeBuildJob',
'ICharmhubUploadJob',
diff --git a/lib/lp/charms/interfaces/charmrecipejob.py b/lib/lp/charms/interfaces/charmrecipejob.py
index 554b231..d353bb6 100644
--- a/lib/lp/charms/interfaces/charmrecipejob.py
+++ b/lib/lp/charms/interfaces/charmrecipejob.py
@@ -3,7 +3,6 @@
"""Charm recipe job interfaces."""
-__metaclass__ = type
__all__ = [
"ICharmRecipeJob",
"ICharmRecipeRequestBuildsJob",
diff --git a/lib/lp/charms/mail/charmrecipebuild.py b/lib/lp/charms/mail/charmrecipebuild.py
index 6b4de1a..ca10eac 100644
--- a/lib/lp/charms/mail/charmrecipebuild.py
+++ b/lib/lp/charms/mail/charmrecipebuild.py
@@ -1,7 +1,6 @@
# Copyright 2021 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
"CharmRecipeBuildMailer",
]
diff --git a/lib/lp/charms/model/charmrecipe.py b/lib/lp/charms/model/charmrecipe.py
index 2410e94..97c17d8 100644
--- a/lib/lp/charms/model/charmrecipe.py
+++ b/lib/lp/charms/model/charmrecipe.py
@@ -3,7 +3,6 @@
"""Charm recipes."""
-__metaclass__ = type
__all__ = [
"CharmRecipe",
"get_charm_recipe_privacy_filter",
diff --git a/lib/lp/charms/model/charmrecipebuild.py b/lib/lp/charms/model/charmrecipebuild.py
index e3c37e8..666942e 100644
--- a/lib/lp/charms/model/charmrecipebuild.py
+++ b/lib/lp/charms/model/charmrecipebuild.py
@@ -3,7 +3,6 @@
"""Charm recipe builds."""
-__metaclass__ = type
__all__ = [
"CharmFile",
"CharmRecipeBuild",
diff --git a/lib/lp/charms/model/charmrecipebuildbehaviour.py b/lib/lp/charms/model/charmrecipebuildbehaviour.py
index f5cc34d..99538dc 100644
--- a/lib/lp/charms/model/charmrecipebuildbehaviour.py
+++ b/lib/lp/charms/model/charmrecipebuildbehaviour.py
@@ -6,7 +6,6 @@
Dispatches charm recipe build jobs to build-farm slaves.
"""
-__metaclass__ = type
__all__ = [
"CharmRecipeBuildBehaviour",
]
diff --git a/lib/lp/charms/model/charmrecipejob.py b/lib/lp/charms/model/charmrecipejob.py
index 354ce54..a610e58 100644
--- a/lib/lp/charms/model/charmrecipejob.py
+++ b/lib/lp/charms/model/charmrecipejob.py
@@ -3,7 +3,6 @@
"""Charm recipe jobs."""
-__metaclass__ = type
__all__ = [
"CharmRecipeJob",
"CharmRecipeJobType",
diff --git a/lib/lp/charms/subscribers/charmrecipebuild.py b/lib/lp/charms/subscribers/charmrecipebuild.py
index 2eb5534..a0272a3 100644
--- a/lib/lp/charms/subscribers/charmrecipebuild.py
+++ b/lib/lp/charms/subscribers/charmrecipebuild.py
@@ -3,8 +3,6 @@
"""Event subscribers for charm recipe builds."""
-__metaclass__ = type
-
from zope.component import getUtility
from lp.buildmaster.enums import BuildStatus
diff --git a/lib/lp/charms/tests/test_charmrecipe.py b/lib/lp/charms/tests/test_charmrecipe.py
index 64b4386..280936e 100644
--- a/lib/lp/charms/tests/test_charmrecipe.py
+++ b/lib/lp/charms/tests/test_charmrecipe.py
@@ -3,8 +3,6 @@
"""Test charm recipes."""
-__metaclass__ = type
-
import base64
from datetime import (
datetime,
diff --git a/lib/lp/charms/tests/test_charmrecipebuild.py b/lib/lp/charms/tests/test_charmrecipebuild.py
index 4262531..d06dfe0 100644
--- a/lib/lp/charms/tests/test_charmrecipebuild.py
+++ b/lib/lp/charms/tests/test_charmrecipebuild.py
@@ -3,8 +3,6 @@
"""Test charm package build features."""
-__metaclass__ = type
-
import base64
from datetime import (
datetime,
diff --git a/lib/lp/charms/tests/test_charmrecipebuildbehaviour.py b/lib/lp/charms/tests/test_charmrecipebuildbehaviour.py
index ea310a1..097fb0d 100644
--- a/lib/lp/charms/tests/test_charmrecipebuildbehaviour.py
+++ b/lib/lp/charms/tests/test_charmrecipebuildbehaviour.py
@@ -3,8 +3,6 @@
"""Test charm recipe build behaviour."""
-__metaclass__ = type
-
import base64
from datetime import datetime
import os.path
diff --git a/lib/lp/charms/tests/test_charmrecipebuildjob.py b/lib/lp/charms/tests/test_charmrecipebuildjob.py
index 69865b1..9ee2db9 100644
--- a/lib/lp/charms/tests/test_charmrecipebuildjob.py
+++ b/lib/lp/charms/tests/test_charmrecipebuildjob.py
@@ -3,8 +3,6 @@
"""Tests for charm recipe build jobs."""
-__metaclass__ = type
-
from datetime import timedelta
from fixtures import FakeLogger
diff --git a/lib/lp/charms/tests/test_charmrecipejob.py b/lib/lp/charms/tests/test_charmrecipejob.py
index ff93436..67bac9a 100644
--- a/lib/lp/charms/tests/test_charmrecipejob.py
+++ b/lib/lp/charms/tests/test_charmrecipejob.py
@@ -3,8 +3,6 @@
"""Tests for charm recipe jobs."""
-__metaclass__ = type
-
from textwrap import dedent
import six
diff --git a/lib/lp/code/adapters/branch.py b/lib/lp/code/adapters/branch.py
index c4f4404..614eb2d 100644
--- a/lib/lp/code/adapters/branch.py
+++ b/lib/lp/code/adapters/branch.py
@@ -3,7 +3,6 @@
"""Components related to branches."""
-__metaclass__ = type
__all__ = [
"BranchDelta",
"BranchMergeProposalDelta",
diff --git a/lib/lp/code/adapters/branchcollection.py b/lib/lp/code/adapters/branchcollection.py
index c64146f..cfc4d89 100644
--- a/lib/lp/code/adapters/branchcollection.py
+++ b/lib/lp/code/adapters/branchcollection.py
@@ -3,7 +3,6 @@
"""Adapters for different objects to branch collections."""
-__metaclass__ = type
__all__ = [
'branch_collection_for_distribution',
'branch_collection_for_distro_series',
diff --git a/lib/lp/code/adapters/gitcollection.py b/lib/lp/code/adapters/gitcollection.py
index 41282b2..0a7b1ab 100644
--- a/lib/lp/code/adapters/gitcollection.py
+++ b/lib/lp/code/adapters/gitcollection.py
@@ -3,7 +3,6 @@
"""Adapters for different objects to Git repository collections."""
-__metaclass__ = type
__all__ = [
'git_collection_for_distribution',
'git_collection_for_distro_source_package',
diff --git a/lib/lp/code/adapters/gitrepository.py b/lib/lp/code/adapters/gitrepository.py
index d265ca9..085d51a 100644
--- a/lib/lp/code/adapters/gitrepository.py
+++ b/lib/lp/code/adapters/gitrepository.py
@@ -3,7 +3,6 @@
"""Components and adapters related to Git repositories."""
-__metaclass__ = type
__all__ = [
"GitRepositoryDelta",
]
diff --git a/lib/lp/code/adapters/revisioncache.py b/lib/lp/code/adapters/revisioncache.py
index 69dc856..6cd8c08 100644
--- a/lib/lp/code/adapters/revisioncache.py
+++ b/lib/lp/code/adapters/revisioncache.py
@@ -3,7 +3,6 @@
"""Adapters for different objects to a revision cache."""
-__metaclass__ = type
__all__ = [
'revision_cache_for_distribution',
'revision_cache_for_distro_series',
diff --git a/lib/lp/code/adapters/tests/test_branchcollection.py b/lib/lp/code/adapters/tests/test_branchcollection.py
index 9aca640..ed66a77 100644
--- a/lib/lp/code/adapters/tests/test_branchcollection.py
+++ b/lib/lp/code/adapters/tests/test_branchcollection.py
@@ -3,9 +3,6 @@
"""Functional tests for BranchCollection adapters."""
-__metaclass__ = type
-
-
from lp.code.interfaces.branchcollection import IBranchCollection
from lp.registry.model.personproduct import PersonProduct
from lp.testing import TestCaseWithFactory
diff --git a/lib/lp/code/browser/bazaar.py b/lib/lp/code/browser/bazaar.py
index 85829af..3c98b5f 100644
--- a/lib/lp/code/browser/bazaar.py
+++ b/lib/lp/code/browser/bazaar.py
@@ -3,8 +3,6 @@
"""View support classes for the bazaar application."""
-__metaclass__ = type
-
__all__ = [
'BazaarApplicationView',
'BazaarProductView',
diff --git a/lib/lp/code/browser/branch.py b/lib/lp/code/browser/branch.py
index cbd4a37..87b43b2 100644
--- a/lib/lp/code/browser/branch.py
+++ b/lib/lp/code/browser/branch.py
@@ -3,8 +3,6 @@
"""Branch views."""
-__metaclass__ = type
-
__all__ = [
'BranchBreadcrumb',
'BranchContextMenu',
diff --git a/lib/lp/code/browser/branchlisting.py b/lib/lp/code/browser/branchlisting.py
index 23a1e9c..64355b2 100644
--- a/lib/lp/code/browser/branchlisting.py
+++ b/lib/lp/code/browser/branchlisting.py
@@ -3,8 +3,6 @@
"""Base class view for branch listings."""
-__metaclass__ = type
-
__all__ = [
'BranchBadges',
'BranchListingView',
diff --git a/lib/lp/code/browser/branchmergeproposal.py b/lib/lp/code/browser/branchmergeproposal.py
index f08c03f..96b22d8 100644
--- a/lib/lp/code/browser/branchmergeproposal.py
+++ b/lib/lp/code/browser/branchmergeproposal.py
@@ -3,7 +3,6 @@
"""Views, navigation and actions for BranchMergeProposals."""
-__metaclass__ = type
__all__ = [
'BranchMergeCandidateView',
'BranchMergeProposalActionNavigationMenu',
diff --git a/lib/lp/code/browser/branchmergeproposallisting.py b/lib/lp/code/browser/branchmergeproposallisting.py
index be4d5c5..7d88ec0 100644
--- a/lib/lp/code/browser/branchmergeproposallisting.py
+++ b/lib/lp/code/browser/branchmergeproposallisting.py
@@ -3,8 +3,6 @@
"""Base class view for branch merge proposal listings."""
-__metaclass__ = type
-
__all__ = [
'ActiveReviewsView',
'BranchActiveReviewsView',
diff --git a/lib/lp/code/browser/branchref.py b/lib/lp/code/browser/branchref.py
index 0631102..f26fba8 100644
--- a/lib/lp/code/browser/branchref.py
+++ b/lib/lp/code/browser/branchref.py
@@ -3,7 +3,6 @@
"""Browser code used to implement virtual '.bzr' directories."""
-__metaclass__ = type
__all__ = [
'BranchRef'
]
diff --git a/lib/lp/code/browser/branchsubscription.py b/lib/lp/code/browser/branchsubscription.py
index 7e19479..8fcb708 100644
--- a/lib/lp/code/browser/branchsubscription.py
+++ b/lib/lp/code/browser/branchsubscription.py
@@ -1,8 +1,6 @@
# Copyright 2009-2021 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = [
'BranchPortletSubscribersContent',
'BranchSubscriptionAddOtherView',
diff --git a/lib/lp/code/browser/codeimport.py b/lib/lp/code/browser/codeimport.py
index 49c3b3f..394531c 100644
--- a/lib/lp/code/browser/codeimport.py
+++ b/lib/lp/code/browser/codeimport.py
@@ -3,8 +3,6 @@
"""Browser views for CodeImports."""
-__metaclass__ = type
-
__all__ = [
'CodeImportEditView',
'CodeImportMachineView',
diff --git a/lib/lp/code/browser/codeimportmachine.py b/lib/lp/code/browser/codeimportmachine.py
index 1bcb25f..6e4e868 100644
--- a/lib/lp/code/browser/codeimportmachine.py
+++ b/lib/lp/code/browser/codeimportmachine.py
@@ -3,8 +3,6 @@
"""Browser views for CodeImportMachines."""
-__metaclass__ = type
-
__all__ = [
'CodeImportMachineBreadcrumb',
'CodeImportMachineSetBreadcrumb',
diff --git a/lib/lp/code/browser/codereviewcomment.py b/lib/lp/code/browser/codereviewcomment.py
index 5891c6f..54d83aa 100644
--- a/lib/lp/code/browser/codereviewcomment.py
+++ b/lib/lp/code/browser/codereviewcomment.py
@@ -1,8 +1,6 @@
# Copyright 2009-2021 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = [
'CodeReviewCommentAddView',
'CodeReviewCommentContextMenu',
diff --git a/lib/lp/code/browser/codereviewvote.py b/lib/lp/code/browser/codereviewvote.py
index fb27a49..3d3d9c2 100644
--- a/lib/lp/code/browser/codereviewvote.py
+++ b/lib/lp/code/browser/codereviewvote.py
@@ -3,9 +3,6 @@
"""Views, navigation and actions for CodeReviewVotes."""
-__metaclass__ = type
-
-
from zope.interface import Interface
from lp import _
diff --git a/lib/lp/code/browser/decorations.py b/lib/lp/code/browser/decorations.py
index c4b0ae7..60bd781 100644
--- a/lib/lp/code/browser/decorations.py
+++ b/lib/lp/code/browser/decorations.py
@@ -3,7 +3,6 @@
"""Decorated model objects used in the browser code."""
-__metaclass__ = type
__all__ = [
'DecoratedBranch',
]
diff --git a/lib/lp/code/browser/diff.py b/lib/lp/code/browser/diff.py
index 882ebfc..d97ff97 100644
--- a/lib/lp/code/browser/diff.py
+++ b/lib/lp/code/browser/diff.py
@@ -3,7 +3,6 @@
"""Display classes relating to diff objects of one sort or another."""
-__metaclass__ = type
__all__ = [
'PreviewDiffFormatterAPI',
]
diff --git a/lib/lp/code/browser/gitlisting.py b/lib/lp/code/browser/gitlisting.py
index 96044e5..e3ed8b6 100644
--- a/lib/lp/code/browser/gitlisting.py
+++ b/lib/lp/code/browser/gitlisting.py
@@ -3,8 +3,6 @@
"""View classes for Git repository listings."""
-__metaclass__ = type
-
__all__ = [
'PersonTargetGitListingView',
'TargetGitListingView',
diff --git a/lib/lp/code/browser/gitref.py b/lib/lp/code/browser/gitref.py
index 95abbd9..b28f1d9 100644
--- a/lib/lp/code/browser/gitref.py
+++ b/lib/lp/code/browser/gitref.py
@@ -3,8 +3,6 @@
"""Git reference views."""
-__metaclass__ = type
-
__all__ = [
'GitRefContextMenu',
'GitRefRegisterMergeProposalView',
diff --git a/lib/lp/code/browser/gitrepository.py b/lib/lp/code/browser/gitrepository.py
index 4214e3f..92a1b14 100644
--- a/lib/lp/code/browser/gitrepository.py
+++ b/lib/lp/code/browser/gitrepository.py
@@ -3,8 +3,6 @@
"""Git repository views."""
-__metaclass__ = type
-
__all__ = [
'GitRefBatchNavigator',
'GitRepositoriesBreadcrumb',
diff --git a/lib/lp/code/browser/gitsubscription.py b/lib/lp/code/browser/gitsubscription.py
index f0b693a..25a6ecc 100644
--- a/lib/lp/code/browser/gitsubscription.py
+++ b/lib/lp/code/browser/gitsubscription.py
@@ -1,8 +1,6 @@
# Copyright 2015-2021 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = [
'GitRepositoryPortletSubscribersContent',
'GitSubscriptionAddOtherView',
diff --git a/lib/lp/code/browser/sourcepackagerecipe.py b/lib/lp/code/browser/sourcepackagerecipe.py
index 5ae3eee..1097ac7 100644
--- a/lib/lp/code/browser/sourcepackagerecipe.py
+++ b/lib/lp/code/browser/sourcepackagerecipe.py
@@ -3,8 +3,6 @@
"""SourcePackageRecipe views."""
-__metaclass__ = type
-
__all__ = [
'SourcePackageRecipeAddView',
'SourcePackageRecipeContextMenu',
diff --git a/lib/lp/code/browser/sourcepackagerecipebuild.py b/lib/lp/code/browser/sourcepackagerecipebuild.py
index 185f1e8..d92c092 100644
--- a/lib/lp/code/browser/sourcepackagerecipebuild.py
+++ b/lib/lp/code/browser/sourcepackagerecipebuild.py
@@ -3,8 +3,6 @@
"""SourcePackageRecipeBuild views."""
-__metaclass__ = type
-
__all__ = [
'SourcePackageRecipeBuildContextMenu',
'SourcePackageRecipeBuildNavigation',
diff --git a/lib/lp/code/browser/sourcepackagerecipelisting.py b/lib/lp/code/browser/sourcepackagerecipelisting.py
index 8abc522..319a49c 100644
--- a/lib/lp/code/browser/sourcepackagerecipelisting.py
+++ b/lib/lp/code/browser/sourcepackagerecipelisting.py
@@ -3,8 +3,6 @@
"""Base class view for sourcepackagerecipe listings."""
-__metaclass__ = type
-
__all__ = [
'BranchRecipeListingView',
'HasRecipesMenuMixin',
diff --git a/lib/lp/code/browser/summary.py b/lib/lp/code/browser/summary.py
index d3c318e..fdfb1e1 100644
--- a/lib/lp/code/browser/summary.py
+++ b/lib/lp/code/browser/summary.py
@@ -3,7 +3,6 @@
"""View classes for branch summaries."""
-__metaclass__ = type
__all__ = [
'BranchCountSummaryView',
]
diff --git a/lib/lp/code/browser/tests/test_bazaar.py b/lib/lp/code/browser/tests/test_bazaar.py
index 42209d4..e6d67d5 100644
--- a/lib/lp/code/browser/tests/test_bazaar.py
+++ b/lib/lp/code/browser/tests/test_bazaar.py
@@ -3,8 +3,6 @@
"""Tests for classes in the lp.code.browser.bazaar module."""
-__metaclass__ = type
-
from zope.security.proxy import removeSecurityProxy
from lp.app.enums import InformationType
diff --git a/lib/lp/code/browser/tests/test_branch.py b/lib/lp/code/browser/tests/test_branch.py
index e5f41fb..6236544 100644
--- a/lib/lp/code/browser/tests/test_branch.py
+++ b/lib/lp/code/browser/tests/test_branch.py
@@ -3,8 +3,6 @@
"""Unit tests for BranchView."""
-__metaclass__ = type
-
from datetime import datetime
from textwrap import dedent
diff --git a/lib/lp/code/browser/tests/test_branchlisting.py b/lib/lp/code/browser/tests/test_branchlisting.py
index 04afdc2..1c4ad36 100644
--- a/lib/lp/code/browser/tests/test_branchlisting.py
+++ b/lib/lp/code/browser/tests/test_branchlisting.py
@@ -3,8 +3,6 @@
"""Tests for branch listing."""
-__metaclass__ = type
-
from datetime import timedelta
import os
from pprint import pformat
diff --git a/lib/lp/code/browser/tests/test_branchmergeproposal.py b/lib/lp/code/browser/tests/test_branchmergeproposal.py
index 5f21254..18bd572 100644
--- a/lib/lp/code/browser/tests/test_branchmergeproposal.py
+++ b/lib/lp/code/browser/tests/test_branchmergeproposal.py
@@ -7,8 +7,6 @@
"""Unit tests for BranchMergeProposals."""
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/code/browser/tests/test_branchmergeproposallisting.py b/lib/lp/code/browser/tests/test_branchmergeproposallisting.py
index c1346c3..7570612 100644
--- a/lib/lp/code/browser/tests/test_branchmergeproposallisting.py
+++ b/lib/lp/code/browser/tests/test_branchmergeproposallisting.py
@@ -3,8 +3,6 @@
"""Unit tests for BranchMergeProposal listing views."""
-__metaclass__ = type
-
from datetime import datetime
import pytz
diff --git a/lib/lp/code/browser/tests/test_branchsubscription.py b/lib/lp/code/browser/tests/test_branchsubscription.py
index e901130..fc5142c 100644
--- a/lib/lp/code/browser/tests/test_branchsubscription.py
+++ b/lib/lp/code/browser/tests/test_branchsubscription.py
@@ -3,8 +3,6 @@
"""Unit tests for BranchSubscriptions."""
-__metaclass__ = type
-
from lp.app.enums import InformationType
from lp.testing import (
person_logged_in,
diff --git a/lib/lp/code/browser/tests/test_breadcrumbs.py b/lib/lp/code/browser/tests/test_breadcrumbs.py
index 494ea67..e8273ed 100644
--- a/lib/lp/code/browser/tests/test_breadcrumbs.py
+++ b/lib/lp/code/browser/tests/test_breadcrumbs.py
@@ -1,8 +1,6 @@
# Copyright 2010-2017 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from lp.testing.breadcrumbs import BaseBreadcrumbTestCase
diff --git a/lib/lp/code/browser/tests/test_codeimport.py b/lib/lp/code/browser/tests/test_codeimport.py
index 0dd76c6..835b477 100644
--- a/lib/lp/code/browser/tests/test_codeimport.py
+++ b/lib/lp/code/browser/tests/test_codeimport.py
@@ -3,8 +3,6 @@
"""Tests for the code import browser code."""
-__metaclass__ = type
-
import re
from testtools.matchers import StartsWith
diff --git a/lib/lp/code/browser/tests/test_codereviewcomment.py b/lib/lp/code/browser/tests/test_codereviewcomment.py
index fb38ae1..a70d0ad 100644
--- a/lib/lp/code/browser/tests/test_codereviewcomment.py
+++ b/lib/lp/code/browser/tests/test_codereviewcomment.py
@@ -3,8 +3,6 @@
"""Unit tests for CodeReviewComments."""
-__metaclass__ = type
-
import re
import six
diff --git a/lib/lp/code/browser/tests/test_codereviewvote.py b/lib/lp/code/browser/tests/test_codereviewvote.py
index f1cc64e..a7fcc21 100644
--- a/lib/lp/code/browser/tests/test_codereviewvote.py
+++ b/lib/lp/code/browser/tests/test_codereviewvote.py
@@ -3,8 +3,6 @@
"""Unit tests for CodeReviewVoteReferences."""
-__metaclass__ = type
-
from lp.services.webapp import canonical_url
from lp.testing import (
person_logged_in,
diff --git a/lib/lp/code/browser/tests/test_gitlisting.py b/lib/lp/code/browser/tests/test_gitlisting.py
index 7856dd0..4bed9f8 100644
--- a/lib/lp/code/browser/tests/test_gitlisting.py
+++ b/lib/lp/code/browser/tests/test_gitlisting.py
@@ -3,8 +3,6 @@
"""Unit tests for Git listing views."""
-__metaclass__ = type
-
from zope.component import getUtility
from lp.app.enums import InformationType
diff --git a/lib/lp/code/browser/tests/test_gitref.py b/lib/lp/code/browser/tests/test_gitref.py
index 59120fd..e8f5b25 100644
--- a/lib/lp/code/browser/tests/test_gitref.py
+++ b/lib/lp/code/browser/tests/test_gitref.py
@@ -3,8 +3,6 @@
"""Unit tests for GitRefView."""
-__metaclass__ = type
-
from datetime import datetime
import hashlib
import re
diff --git a/lib/lp/code/browser/tests/test_gitrepository.py b/lib/lp/code/browser/tests/test_gitrepository.py
index accb4b6..367c2c0 100644
--- a/lib/lp/code/browser/tests/test_gitrepository.py
+++ b/lib/lp/code/browser/tests/test_gitrepository.py
@@ -3,8 +3,6 @@
"""Unit tests for GitRepositoryView."""
-__metaclass__ = type
-
import base64
from datetime import datetime
import doctest
diff --git a/lib/lp/code/browser/tests/test_gitsubscription.py b/lib/lp/code/browser/tests/test_gitsubscription.py
index 54283c5..1fb5fb7 100644
--- a/lib/lp/code/browser/tests/test_gitsubscription.py
+++ b/lib/lp/code/browser/tests/test_gitsubscription.py
@@ -3,8 +3,6 @@
"""Unit tests for GitSubscriptions."""
-__metaclass__ = type
-
from fixtures import FakeLogger
from six.moves.urllib.parse import urlencode
from testtools.matchers import MatchesStructure
diff --git a/lib/lp/code/browser/tests/test_product.py b/lib/lp/code/browser/tests/test_product.py
index 32c6549..4f9dfcc 100644
--- a/lib/lp/code/browser/tests/test_product.py
+++ b/lib/lp/code/browser/tests/test_product.py
@@ -3,8 +3,6 @@
"""Tests for the product view classes and templates."""
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/code/browser/tests/test_revisionauthor.py b/lib/lp/code/browser/tests/test_revisionauthor.py
index 7321e4c..3e7bd63 100644
--- a/lib/lp/code/browser/tests/test_revisionauthor.py
+++ b/lib/lp/code/browser/tests/test_revisionauthor.py
@@ -3,8 +3,6 @@
"""Tests related to `RevisionAuthor`."""
-__metaclass__ = type
-
from lp.app.browser.tales import (
PersonFormatterAPI,
RevisionAuthorFormatterAPI,
diff --git a/lib/lp/code/browser/tests/test_sourcepackagerecipe.py b/lib/lp/code/browser/tests/test_sourcepackagerecipe.py
index 4dbe2be..3f12008 100644
--- a/lib/lp/code/browser/tests/test_sourcepackagerecipe.py
+++ b/lib/lp/code/browser/tests/test_sourcepackagerecipe.py
@@ -3,8 +3,6 @@
"""Tests for the source package recipe view classes and templates."""
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/code/browser/tests/test_sourcepackagerecipebuild.py b/lib/lp/code/browser/tests/test_sourcepackagerecipebuild.py
index 8bb1345..9e0bbd7 100644
--- a/lib/lp/code/browser/tests/test_sourcepackagerecipebuild.py
+++ b/lib/lp/code/browser/tests/test_sourcepackagerecipebuild.py
@@ -3,8 +3,6 @@
"""Tests for the source package recipe view classes and templates."""
-__metaclass__ = type
-
from fixtures import FakeLogger
from storm.locals import Store
from testtools.matchers import StartsWith
diff --git a/lib/lp/code/browser/tests/test_sourcepackagerecipelisting.py b/lib/lp/code/browser/tests/test_sourcepackagerecipelisting.py
index 63c623b..3365231 100644
--- a/lib/lp/code/browser/tests/test_sourcepackagerecipelisting.py
+++ b/lib/lp/code/browser/tests/test_sourcepackagerecipelisting.py
@@ -3,8 +3,6 @@
"""Tests for sourcepackagerecipe listings."""
-__metaclass__ = type
-
from lp.testing import (
BrowserTestCase,
person_logged_in,
diff --git a/lib/lp/code/browser/tests/test_tales.py b/lib/lp/code/browser/tests/test_tales.py
index fc55ea3..8452d35 100644
--- a/lib/lp/code/browser/tests/test_tales.py
+++ b/lib/lp/code/browser/tests/test_tales.py
@@ -3,8 +3,6 @@
"""Tests for the tales formatters."""
-__metaclass__ = type
-
from difflib import unified_diff
from storm.store import Store
diff --git a/lib/lp/code/browser/tests/test_vcslisting.py b/lib/lp/code/browser/tests/test_vcslisting.py
index d636010..64f203b 100644
--- a/lib/lp/code/browser/tests/test_vcslisting.py
+++ b/lib/lp/code/browser/tests/test_vcslisting.py
@@ -3,8 +3,6 @@
"""Tests for the product view classes and templates."""
-__metaclass__ = type
-
from zope.publisher.interfaces import NotFound
from lp.code.browser.branchlisting import (
diff --git a/lib/lp/code/browser/vcslisting.py b/lib/lp/code/browser/vcslisting.py
index 5291234..3d2aea7 100644
--- a/lib/lp/code/browser/vcslisting.py
+++ b/lib/lp/code/browser/vcslisting.py
@@ -3,8 +3,6 @@
"""VCS-agnostic view aliases that show the default VCS."""
-__metaclass__ = type
-
from zope.component import queryMultiAdapter
from lp.registry.enums import VCSType
diff --git a/lib/lp/code/browser/widgets/branchtarget.py b/lib/lp/code/browser/widgets/branchtarget.py
index 9eb06f1..55b5c95 100644
--- a/lib/lp/code/browser/widgets/branchtarget.py
+++ b/lib/lp/code/browser/widgets/branchtarget.py
@@ -1,8 +1,6 @@
# Copyright 2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = [
'BranchTargetWidget',
]
diff --git a/lib/lp/code/browser/widgets/gitgrantee.py b/lib/lp/code/browser/widgets/gitgrantee.py
index c4913dd..0b1b8f4 100644
--- a/lib/lp/code/browser/widgets/gitgrantee.py
+++ b/lib/lp/code/browser/widgets/gitgrantee.py
@@ -1,7 +1,6 @@
# Copyright 2018 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'GitGranteeDisplayWidget',
'GitGranteeField',
diff --git a/lib/lp/code/browser/widgets/gitref.py b/lib/lp/code/browser/widgets/gitref.py
index 64f27c5..036f46b 100644
--- a/lib/lp/code/browser/widgets/gitref.py
+++ b/lib/lp/code/browser/widgets/gitref.py
@@ -1,8 +1,6 @@
# Copyright 2015-2016 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = [
'GitRefWidget',
]
diff --git a/lib/lp/code/browser/widgets/gitrepositorytarget.py b/lib/lp/code/browser/widgets/gitrepositorytarget.py
index 52c7461..50f964a 100644
--- a/lib/lp/code/browser/widgets/gitrepositorytarget.py
+++ b/lib/lp/code/browser/widgets/gitrepositorytarget.py
@@ -1,8 +1,6 @@
# Copyright 2015-2016 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = [
'GitRepositoryTargetDisplayWidget',
'GitRepositoryTargetWidget',
diff --git a/lib/lp/code/browser/widgets/tests/test_branchtargetwidget.py b/lib/lp/code/browser/widgets/tests/test_branchtargetwidget.py
index e9f871b..5c65934 100644
--- a/lib/lp/code/browser/widgets/tests/test_branchtargetwidget.py
+++ b/lib/lp/code/browser/widgets/tests/test_branchtargetwidget.py
@@ -1,8 +1,6 @@
# Copyright 2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
import re
from lazr.restful.fields import Reference
diff --git a/lib/lp/code/browser/widgets/tests/test_gitgrantee.py b/lib/lp/code/browser/widgets/tests/test_gitgrantee.py
index 6d9bf55..23553ea 100644
--- a/lib/lp/code/browser/widgets/tests/test_gitgrantee.py
+++ b/lib/lp/code/browser/widgets/tests/test_gitgrantee.py
@@ -1,8 +1,6 @@
# Copyright 2018 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
import re
from zope.formlib.interfaces import (
diff --git a/lib/lp/code/browser/widgets/tests/test_gitrefwidget.py b/lib/lp/code/browser/widgets/tests/test_gitrefwidget.py
index cf61a8f..a238266 100644
--- a/lib/lp/code/browser/widgets/tests/test_gitrefwidget.py
+++ b/lib/lp/code/browser/widgets/tests/test_gitrefwidget.py
@@ -1,8 +1,6 @@
# Copyright 2015-2016 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from lazr.restful.fields import Reference
from testscenarios import (
load_tests_apply_scenarios,
diff --git a/lib/lp/code/browser/widgets/tests/test_gitrepositorytargetwidget.py b/lib/lp/code/browser/widgets/tests/test_gitrepositorytargetwidget.py
index bcae3fd..745b42f 100644
--- a/lib/lp/code/browser/widgets/tests/test_gitrepositorytargetwidget.py
+++ b/lib/lp/code/browser/widgets/tests/test_gitrepositorytargetwidget.py
@@ -1,8 +1,6 @@
# Copyright 2015-2020 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
import re
from lazr.restful.fields import Reference
diff --git a/lib/lp/code/bzr.py b/lib/lp/code/bzr.py
index d1ed973..3144885 100644
--- a/lib/lp/code/bzr.py
+++ b/lib/lp/code/bzr.py
@@ -3,7 +3,6 @@
"""Enumerations relating to Bazaar formats."""
-__metaclass__ = type
__all__ = [
'branch_changed',
'BranchFormat',
diff --git a/lib/lp/code/enums.py b/lib/lp/code/enums.py
index f950d5e..3765754 100644
--- a/lib/lp/code/enums.py
+++ b/lib/lp/code/enums.py
@@ -3,7 +3,6 @@
"""Enumerations used in the lp/code modules."""
-__metaclass__ = type
__all__ = [
'BranchLifecycleStatus',
'BranchLifecycleStatusFilter',
diff --git a/lib/lp/code/errors.py b/lib/lp/code/errors.py
index c00d115..9a17370 100644
--- a/lib/lp/code/errors.py
+++ b/lib/lp/code/errors.py
@@ -3,7 +3,6 @@
"""Errors used in the lp/code modules."""
-__metaclass__ = type
__all__ = [
'AlreadyLatestFormat',
'BadBranchMergeProposalSearchContext',
diff --git a/lib/lp/code/event/branchmergeproposal.py b/lib/lp/code/event/branchmergeproposal.py
index 46fe50c..6dac768 100644
--- a/lib/lp/code/event/branchmergeproposal.py
+++ b/lib/lp/code/event/branchmergeproposal.py
@@ -3,7 +3,6 @@
"""Event implementation classes for branch merge proposal events."""
-__metaclass__ = type
__all__ = [
'BranchMergeProposalNeedsReviewEvent',
'ReviewerNominatedEvent',
diff --git a/lib/lp/code/event/git.py b/lib/lp/code/event/git.py
index 6575203..ae2d3fc 100644
--- a/lib/lp/code/event/git.py
+++ b/lib/lp/code/event/git.py
@@ -3,7 +3,6 @@
"""Events related to Git repositories."""
-__metaclass__ = type
__all__ = [
'GitRefsUpdatedEvent',
]
diff --git a/lib/lp/code/feed/branch.py b/lib/lp/code/feed/branch.py
index 45a5077..3339134 100644
--- a/lib/lp/code/feed/branch.py
+++ b/lib/lp/code/feed/branch.py
@@ -3,8 +3,6 @@
"""Branch feed (syndication) views."""
-__metaclass__ = type
-
__all__ = [
'BranchFeed',
'PersonBranchFeed',
diff --git a/lib/lp/code/feed/tests/test_revision.py b/lib/lp/code/feed/tests/test_revision.py
index 5662c71..f183a08 100644
--- a/lib/lp/code/feed/tests/test_revision.py
+++ b/lib/lp/code/feed/tests/test_revision.py
@@ -3,8 +3,6 @@
"""Tests for the revision feeds."""
-__metaclass__ = type
-
from datetime import datetime
from pytz import UTC
diff --git a/lib/lp/code/interfaces/branch.py b/lib/lp/code/interfaces/branch.py
index b8d52e5..f1c53f5 100644
--- a/lib/lp/code/interfaces/branch.py
+++ b/lib/lp/code/interfaces/branch.py
@@ -3,8 +3,6 @@
"""Branch interfaces."""
-__metaclass__ = type
-
__all__ = [
'BRANCH_NAME_VALIDATION_ERROR_MESSAGE',
'branch_name_validator',
diff --git a/lib/lp/code/interfaces/branchcollection.py b/lib/lp/code/interfaces/branchcollection.py
index 6303f12..d33e6c2 100644
--- a/lib/lp/code/interfaces/branchcollection.py
+++ b/lib/lp/code/interfaces/branchcollection.py
@@ -6,7 +6,6 @@
See `IBranchCollection` for more details.
"""
-__metaclass__ = type
__all__ = [
'IAllBranches',
'IBranchCollection',
diff --git a/lib/lp/code/interfaces/branchhosting.py b/lib/lp/code/interfaces/branchhosting.py
index 68b8b87..f4a7e39 100644
--- a/lib/lp/code/interfaces/branchhosting.py
+++ b/lib/lp/code/interfaces/branchhosting.py
@@ -3,7 +3,6 @@
"""Interface for communication with the Loggerhead API."""
-__metaclass__ = type
__all__ = [
'IBranchHostingClient',
]
diff --git a/lib/lp/code/interfaces/branchjob.py b/lib/lp/code/interfaces/branchjob.py
index ce43eb3..6ab861e 100644
--- a/lib/lp/code/interfaces/branchjob.py
+++ b/lib/lp/code/interfaces/branchjob.py
@@ -3,10 +3,6 @@
"""BranchJob interfaces."""
-
-__metaclass__ = type
-
-
__all__ = [
'IBranchJob',
'IBranchModifiedMailJob',
diff --git a/lib/lp/code/interfaces/branchlink.py b/lib/lp/code/interfaces/branchlink.py
index 93b2f16..9ad1aed 100644
--- a/lib/lp/code/interfaces/branchlink.py
+++ b/lib/lp/code/interfaces/branchlink.py
@@ -3,8 +3,6 @@
"""Interfaces for linking Specifications and Branches."""
-__metaclass__ = type
-
__all__ = [
"IHasLinkedBranches",
]
diff --git a/lib/lp/code/interfaces/branchlookup.py b/lib/lp/code/interfaces/branchlookup.py
index c364e8e..3e91b69 100644
--- a/lib/lp/code/interfaces/branchlookup.py
+++ b/lib/lp/code/interfaces/branchlookup.py
@@ -3,7 +3,6 @@
"""Utility for looking up branches by name."""
-__metaclass__ = type
__all__ = [
'get_first_path_result',
'IBranchLookup',
diff --git a/lib/lp/code/interfaces/branchmergeproposal.py b/lib/lp/code/interfaces/branchmergeproposal.py
index 7265218..4fe1f4e 100644
--- a/lib/lp/code/interfaces/branchmergeproposal.py
+++ b/lib/lp/code/interfaces/branchmergeproposal.py
@@ -3,7 +3,6 @@
"""The interface for branch merge proposals."""
-__metaclass__ = type
__all__ = [
'BRANCH_MERGE_PROPOSAL_FINAL_STATES',
'BRANCH_MERGE_PROPOSAL_OBSOLETE_STATES',
diff --git a/lib/lp/code/interfaces/branchnamespace.py b/lib/lp/code/interfaces/branchnamespace.py
index 06b42c3..1fcb36b 100644
--- a/lib/lp/code/interfaces/branchnamespace.py
+++ b/lib/lp/code/interfaces/branchnamespace.py
@@ -3,7 +3,6 @@
"""Interface for a branch namespace."""
-__metaclass__ = type
__all__ = [
'get_branch_namespace',
'IBranchNamespace',
diff --git a/lib/lp/code/interfaces/branchpuller.py b/lib/lp/code/interfaces/branchpuller.py
index cfc0dab..81c56dd 100644
--- a/lib/lp/code/interfaces/branchpuller.py
+++ b/lib/lp/code/interfaces/branchpuller.py
@@ -3,7 +3,6 @@
"""The public interface to the model of the branch puller."""
-__metaclass__ = type
__all__ = [
'IBranchPuller',
]
diff --git a/lib/lp/code/interfaces/branchref.py b/lib/lp/code/interfaces/branchref.py
index 3c80a78..597d8e6 100644
--- a/lib/lp/code/interfaces/branchref.py
+++ b/lib/lp/code/interfaces/branchref.py
@@ -1,7 +1,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'IBranchRef',
]
diff --git a/lib/lp/code/interfaces/branchrevision.py b/lib/lp/code/interfaces/branchrevision.py
index 6963d74..d400fd5 100644
--- a/lib/lp/code/interfaces/branchrevision.py
+++ b/lib/lp/code/interfaces/branchrevision.py
@@ -3,7 +3,6 @@
"""BranchRevision interfaces."""
-__metaclass__ = type
__all__ = [
'IBranchRevision',
]
diff --git a/lib/lp/code/interfaces/branchsubscription.py b/lib/lp/code/interfaces/branchsubscription.py
index d3536fb..0ada7b2 100644
--- a/lib/lp/code/interfaces/branchsubscription.py
+++ b/lib/lp/code/interfaces/branchsubscription.py
@@ -3,8 +3,6 @@
"""Bazaar branch subscription interfaces."""
-__metaclass__ = type
-
__all__ = [
'IBranchSubscription',
]
diff --git a/lib/lp/code/interfaces/branchtarget.py b/lib/lp/code/interfaces/branchtarget.py
index 28835c4..6156152 100644
--- a/lib/lp/code/interfaces/branchtarget.py
+++ b/lib/lp/code/interfaces/branchtarget.py
@@ -9,7 +9,6 @@ package branches. A branch target is the product or package that a branch is
on. If the branch is a junk branch, then the target is the branch owner.
"""
-__metaclass__ = type
__all__ = [
'check_default_stacked_on',
'IBranchTarget',
diff --git a/lib/lp/code/interfaces/codehosting.py b/lib/lp/code/interfaces/codehosting.py
index e23822e..91bce70 100644
--- a/lib/lp/code/interfaces/codehosting.py
+++ b/lib/lp/code/interfaces/codehosting.py
@@ -3,7 +3,6 @@
"""Internal Codehosting API interfaces."""
-__metaclass__ = type
__all__ = [
'BRANCH_ALIAS_PREFIX',
'branch_id_alias',
diff --git a/lib/lp/code/interfaces/codeimport.py b/lib/lp/code/interfaces/codeimport.py
index 3e4113e..36f2fd7 100644
--- a/lib/lp/code/interfaces/codeimport.py
+++ b/lib/lp/code/interfaces/codeimport.py
@@ -3,8 +3,6 @@
"""Code import interfaces."""
-__metaclass__ = type
-
__all__ = [
'ICodeImport',
'ICodeImportSet',
diff --git a/lib/lp/code/interfaces/codeimportevent.py b/lib/lp/code/interfaces/codeimportevent.py
index d9597b3..4a88bd7 100644
--- a/lib/lp/code/interfaces/codeimportevent.py
+++ b/lib/lp/code/interfaces/codeimportevent.py
@@ -3,7 +3,6 @@
"""Code import audit trail interfaces."""
-__metaclass__ = type
__all__ = [
'ICodeImportEvent',
'ICodeImportEventSet',
diff --git a/lib/lp/code/interfaces/codeimportjob.py b/lib/lp/code/interfaces/codeimportjob.py
index 2a99a81..02e9b5f 100644
--- a/lib/lp/code/interfaces/codeimportjob.py
+++ b/lib/lp/code/interfaces/codeimportjob.py
@@ -6,7 +6,6 @@
CodeImportJobs represent pending and running updates of a code import.
"""
-__metaclass__ = type
__all__ = [
'ICodeImportJob',
'ICodeImportJobSet',
diff --git a/lib/lp/code/interfaces/codeimportmachine.py b/lib/lp/code/interfaces/codeimportmachine.py
index b31e6e5..ee50971 100644
--- a/lib/lp/code/interfaces/codeimportmachine.py
+++ b/lib/lp/code/interfaces/codeimportmachine.py
@@ -3,8 +3,6 @@
"""Code import machine interfaces."""
-__metaclass__ = type
-
__all__ = [
'ICodeImportMachine',
'ICodeImportMachineSet',
diff --git a/lib/lp/code/interfaces/codeimportresult.py b/lib/lp/code/interfaces/codeimportresult.py
index 1f1fd65..21ea838 100644
--- a/lib/lp/code/interfaces/codeimportresult.py
+++ b/lib/lp/code/interfaces/codeimportresult.py
@@ -3,7 +3,6 @@
"""Interface classes for CodeImportResult, i.e. completed code import jobs."""
-__metaclass__ = type
__all__ = [
'ICodeImportResult',
'ICodeImportResultSet',
diff --git a/lib/lp/code/interfaces/codeimportscheduler.py b/lib/lp/code/interfaces/codeimportscheduler.py
index e0d646e..34e16d8 100644
--- a/lib/lp/code/interfaces/codeimportscheduler.py
+++ b/lib/lp/code/interfaces/codeimportscheduler.py
@@ -3,7 +3,6 @@
"""Code import scheduler interfaces."""
-__metaclass__ = type
__all__ = [
'ICodeImportScheduler',
'ICodeImportSchedulerApplication',
diff --git a/lib/lp/code/interfaces/codereviewcomment.py b/lib/lp/code/interfaces/codereviewcomment.py
index d32fcdd..8c4a0e4 100644
--- a/lib/lp/code/interfaces/codereviewcomment.py
+++ b/lib/lp/code/interfaces/codereviewcomment.py
@@ -3,7 +3,6 @@
"""CodeReviewComment interfaces."""
-__metaclass__ = type
__all__ = [
'ICodeReviewComment',
'ICodeReviewCommentDeletion',
diff --git a/lib/lp/code/interfaces/codereviewinlinecomment.py b/lib/lp/code/interfaces/codereviewinlinecomment.py
index 08cfd07..498b6a6 100644
--- a/lib/lp/code/interfaces/codereviewinlinecomment.py
+++ b/lib/lp/code/interfaces/codereviewinlinecomment.py
@@ -3,7 +3,6 @@
"""Interfaces for inline comments with preview diffs."""
-__metaclass__ = type
__all__ = [
'ICodeReviewInlineComment',
'ICodeReviewInlineCommentSet',
diff --git a/lib/lp/code/interfaces/codereviewvote.py b/lib/lp/code/interfaces/codereviewvote.py
index bcd870c..b2c75c9 100644
--- a/lib/lp/code/interfaces/codereviewvote.py
+++ b/lib/lp/code/interfaces/codereviewvote.py
@@ -3,7 +3,6 @@
"""CodeReviewVoteReference interface."""
-__metaclass__ = type
__all__ = [
'ICodeReviewVoteReference',
]
diff --git a/lib/lp/code/interfaces/defaultgit.py b/lib/lp/code/interfaces/defaultgit.py
index cbdabb7..2e07b51 100644
--- a/lib/lp/code/interfaces/defaultgit.py
+++ b/lib/lp/code/interfaces/defaultgit.py
@@ -9,7 +9,6 @@ combination of one of those with an owner to represent that owner's default
repository for that target.
"""
-__metaclass__ = type
__all__ = [
'ICanHasDefaultGitRepository',
]
diff --git a/lib/lp/code/interfaces/diff.py b/lib/lp/code/interfaces/diff.py
index 9e0e27c..adeb12a 100644
--- a/lib/lp/code/interfaces/diff.py
+++ b/lib/lp/code/interfaces/diff.py
@@ -3,8 +3,6 @@
"""Interfaces including and related to IDiff."""
-__metaclass__ = type
-
__all__ = [
'IDiff',
'IIncrementalDiff',
diff --git a/lib/lp/code/interfaces/event.py b/lib/lp/code/interfaces/event.py
index 34e166d..fbe60e2 100644
--- a/lib/lp/code/interfaces/event.py
+++ b/lib/lp/code/interfaces/event.py
@@ -3,7 +3,6 @@
"""Interfaces for events used in the launchpad code application."""
-__metaclass__ = type
__all__ = [
'IBranchMergeProposalNeedsReviewEvent',
'IGitRefsUpdatedEvent',
diff --git a/lib/lp/code/interfaces/gitactivity.py b/lib/lp/code/interfaces/gitactivity.py
index ae1217c..a70e833 100644
--- a/lib/lp/code/interfaces/gitactivity.py
+++ b/lib/lp/code/interfaces/gitactivity.py
@@ -3,7 +3,6 @@
"""Git repository activity logs."""
-__metaclass__ = type
__all__ = [
'IGitActivity',
'IGitActivitySet',
diff --git a/lib/lp/code/interfaces/gitapi.py b/lib/lp/code/interfaces/gitapi.py
index 5aa75cc..5b664ef 100644
--- a/lib/lp/code/interfaces/gitapi.py
+++ b/lib/lp/code/interfaces/gitapi.py
@@ -3,7 +3,6 @@
"""Interfaces for internal Git APIs."""
-__metaclass__ = type
__all__ = [
'IGitAPI',
'IGitApplication',
diff --git a/lib/lp/code/interfaces/gitcollection.py b/lib/lp/code/interfaces/gitcollection.py
index b6a8d0a..a4ba892 100644
--- a/lib/lp/code/interfaces/gitcollection.py
+++ b/lib/lp/code/interfaces/gitcollection.py
@@ -6,7 +6,6 @@
See `IGitCollection` for more details.
"""
-__metaclass__ = type
__all__ = [
'IAllGitRepositories',
'IGitCollection',
diff --git a/lib/lp/code/interfaces/githosting.py b/lib/lp/code/interfaces/githosting.py
index 11e18eb..cfed027 100644
--- a/lib/lp/code/interfaces/githosting.py
+++ b/lib/lp/code/interfaces/githosting.py
@@ -3,7 +3,6 @@
"""Interface for communication with the Git hosting service."""
-__metaclass__ = type
__all__ = [
'IGitHostingClient',
]
diff --git a/lib/lp/code/interfaces/gitjob.py b/lib/lp/code/interfaces/gitjob.py
index 4f31b19..902cf05 100644
--- a/lib/lp/code/interfaces/gitjob.py
+++ b/lib/lp/code/interfaces/gitjob.py
@@ -3,8 +3,6 @@
"""GitJob interfaces."""
-__metaclass__ = type
-
__all__ = [
'IGitJob',
'IGitRefScanJob',
diff --git a/lib/lp/code/interfaces/gitlookup.py b/lib/lp/code/interfaces/gitlookup.py
index fd54561..81e6355 100644
--- a/lib/lp/code/interfaces/gitlookup.py
+++ b/lib/lp/code/interfaces/gitlookup.py
@@ -3,7 +3,6 @@
"""Utility for looking up Git repositories by name."""
-__metaclass__ = type
__all__ = [
'IGitLookup',
'IGitTraversable',
diff --git a/lib/lp/code/interfaces/gitnamespace.py b/lib/lp/code/interfaces/gitnamespace.py
index 0e17f08..0292349 100644
--- a/lib/lp/code/interfaces/gitnamespace.py
+++ b/lib/lp/code/interfaces/gitnamespace.py
@@ -3,7 +3,6 @@
"""Interface for a Git repository namespace."""
-__metaclass__ = type
__all__ = [
'get_git_namespace',
'IGitNamespace',
diff --git a/lib/lp/code/interfaces/gitref.py b/lib/lp/code/interfaces/gitref.py
index 222bf8e..a5782d2 100644
--- a/lib/lp/code/interfaces/gitref.py
+++ b/lib/lp/code/interfaces/gitref.py
@@ -3,8 +3,6 @@
"""Git reference ("ref") interfaces."""
-__metaclass__ = type
-
__all__ = [
'IGitRef',
'IGitRefBatchNavigator',
diff --git a/lib/lp/code/interfaces/gitrepository.py b/lib/lp/code/interfaces/gitrepository.py
index 44395a7..dec0bf6 100644
--- a/lib/lp/code/interfaces/gitrepository.py
+++ b/lib/lp/code/interfaces/gitrepository.py
@@ -3,8 +3,6 @@
"""Git repository interfaces."""
-__metaclass__ = type
-
__all__ = [
'ContributorGitIdentity',
'GitIdentityMixin',
diff --git a/lib/lp/code/interfaces/gitrule.py b/lib/lp/code/interfaces/gitrule.py
index 61ea290..e39f5bc 100644
--- a/lib/lp/code/interfaces/gitrule.py
+++ b/lib/lp/code/interfaces/gitrule.py
@@ -3,7 +3,6 @@
"""Git repository access rules."""
-__metaclass__ = type
__all__ = [
'describe_git_permissions',
'IGitNascentRule',
diff --git a/lib/lp/code/interfaces/gitsubscription.py b/lib/lp/code/interfaces/gitsubscription.py
index ea015c0..06d71f2 100644
--- a/lib/lp/code/interfaces/gitsubscription.py
+++ b/lib/lp/code/interfaces/gitsubscription.py
@@ -3,8 +3,6 @@
"""Git repository subscription interfaces."""
-__metaclass__ = type
-
__all__ = [
'IGitSubscription',
]
diff --git a/lib/lp/code/interfaces/hasbranches.py b/lib/lp/code/interfaces/hasbranches.py
index 1e86073..64dc4a5 100644
--- a/lib/lp/code/interfaces/hasbranches.py
+++ b/lib/lp/code/interfaces/hasbranches.py
@@ -3,7 +3,6 @@
"""Interface definitions for IHas<code related bits>."""
-__metaclass__ = type
__all__ = [
'IHasBranches',
'IHasCodeImports',
diff --git a/lib/lp/code/interfaces/hasgitrepositories.py b/lib/lp/code/interfaces/hasgitrepositories.py
index 89bc4c0..77407f1 100644
--- a/lib/lp/code/interfaces/hasgitrepositories.py
+++ b/lib/lp/code/interfaces/hasgitrepositories.py
@@ -3,8 +3,6 @@
"""Interfaces relating to targets of Git repositories."""
-__metaclass__ = type
-
__all__ = [
'IHasGitRepositories',
]
diff --git a/lib/lp/code/interfaces/hasrecipes.py b/lib/lp/code/interfaces/hasrecipes.py
index 2fe8cf3..cddc455 100644
--- a/lib/lp/code/interfaces/hasrecipes.py
+++ b/lib/lp/code/interfaces/hasrecipes.py
@@ -3,7 +3,6 @@
"""Interface definitions for IHasRecipes."""
-__metaclass__ = type
__all__ = [
'IHasRecipes',
]
diff --git a/lib/lp/code/interfaces/linkedbranch.py b/lib/lp/code/interfaces/linkedbranch.py
index af4f41b..d0d44f6 100644
--- a/lib/lp/code/interfaces/linkedbranch.py
+++ b/lib/lp/code/interfaces/linkedbranch.py
@@ -8,7 +8,6 @@ might be the main branch of a series, the trunk branch of a project, the
backports branch for a source package or something else.
"""
-__metaclass__ = type
__all__ = [
'get_linked_to_branch',
'ICanHasLinkedBranch',
diff --git a/lib/lp/code/interfaces/revision.py b/lib/lp/code/interfaces/revision.py
index 7ab308f..116e2f8 100644
--- a/lib/lp/code/interfaces/revision.py
+++ b/lib/lp/code/interfaces/revision.py
@@ -3,7 +3,6 @@
"""Revision interfaces."""
-__metaclass__ = type
__all__ = [
'IRevision', 'IRevisionAuthor', 'IRevisionParent', 'IRevisionProperty',
'IRevisionSet']
diff --git a/lib/lp/code/interfaces/revisioncache.py b/lib/lp/code/interfaces/revisioncache.py
index f09094c..664ba9d 100644
--- a/lib/lp/code/interfaces/revisioncache.py
+++ b/lib/lp/code/interfaces/revisioncache.py
@@ -6,7 +6,6 @@
See `IRevisionCollection` for more details.
"""
-__metaclass__ = type
__all__ = [
'IRevisionCache',
'IRevisionCollection',
diff --git a/lib/lp/code/interfaces/seriessourcepackagebranch.py b/lib/lp/code/interfaces/seriessourcepackagebranch.py
index e6d7d8b..0ca7b7d 100644
--- a/lib/lp/code/interfaces/seriessourcepackagebranch.py
+++ b/lib/lp/code/interfaces/seriessourcepackagebranch.py
@@ -3,7 +3,6 @@
"""Interface for linking source packages in distroseries to branches."""
-__metaclass__ = type
__all__ = [
'IFindOfficialBranchLinks',
'ISeriesSourcePackageBranch',
diff --git a/lib/lp/code/interfaces/sourcepackagerecipe.py b/lib/lp/code/interfaces/sourcepackagerecipe.py
index 3d9d3ab..f954618 100644
--- a/lib/lp/code/interfaces/sourcepackagerecipe.py
+++ b/lib/lp/code/interfaces/sourcepackagerecipe.py
@@ -3,10 +3,6 @@
"""Interface of the `SourcePackageRecipe` content type."""
-
-__metaclass__ = type
-
-
__all__ = [
'IRecipeBranchSource',
'ISourcePackageRecipe',
diff --git a/lib/lp/code/interfaces/sourcepackagerecipebuild.py b/lib/lp/code/interfaces/sourcepackagerecipebuild.py
index a4fc9b0..82375f7 100644
--- a/lib/lp/code/interfaces/sourcepackagerecipebuild.py
+++ b/lib/lp/code/interfaces/sourcepackagerecipebuild.py
@@ -3,7 +3,6 @@
"""Interfaces for source package builds."""
-__metaclass__ = type
__all__ = [
'ISourcePackageRecipeBuild',
'ISourcePackageRecipeBuildSource',
diff --git a/lib/lp/code/interfaces/tests/test_branch.py b/lib/lp/code/interfaces/tests/test_branch.py
index eed7c15..b2c987a 100644
--- a/lib/lp/code/interfaces/tests/test_branch.py
+++ b/lib/lp/code/interfaces/tests/test_branch.py
@@ -3,8 +3,6 @@
"""Tests of the branch interface."""
-__metaclass__ = type
-
from breezy.branch import format_registry as branch_format_registry
from breezy.bzr import BzrProber
from breezy.repository import format_registry as repo_format_registry
diff --git a/lib/lp/code/mail/branch.py b/lib/lp/code/mail/branch.py
index 8a82d49..c36a8b7 100644
--- a/lib/lp/code/mail/branch.py
+++ b/lib/lp/code/mail/branch.py
@@ -3,8 +3,6 @@
"""Email notifications related to branches."""
-__metaclass__ = type
-
from zope.component import (
getAdapter,
getUtility,
diff --git a/lib/lp/code/mail/branchmergeproposal.py b/lib/lp/code/mail/branchmergeproposal.py
index d876ad5..8571c07 100644
--- a/lib/lp/code/mail/branchmergeproposal.py
+++ b/lib/lp/code/mail/branchmergeproposal.py
@@ -3,9 +3,6 @@
"""Email notifications related to branch merge proposals."""
-__metaclass__ = type
-
-
from lp.code.enums import CodeReviewNotificationLevel
from lp.code.mail.branch import BranchMailer
from lp.services.mail.basemailer import BaseMailer
diff --git a/lib/lp/code/mail/codehandler.py b/lib/lp/code/mail/codehandler.py
index fb44573..f149d8b 100644
--- a/lib/lp/code/mail/codehandler.py
+++ b/lib/lp/code/mail/codehandler.py
@@ -1,9 +1,6 @@
# Copyright 2009-2015 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
-
import operator
import os
import re
diff --git a/lib/lp/code/mail/codeimport.py b/lib/lp/code/mail/codeimport.py
index a013719..c6cd42a 100644
--- a/lib/lp/code/mail/codeimport.py
+++ b/lib/lp/code/mail/codeimport.py
@@ -3,8 +3,6 @@
"""Email notifications related to code imports."""
-__metaclass__ = type
-
import textwrap
from zope.authentication.interfaces import IUnauthenticatedPrincipal
diff --git a/lib/lp/code/mail/codereviewcomment.py b/lib/lp/code/mail/codereviewcomment.py
index f9e882f..5cd14ab 100644
--- a/lib/lp/code/mail/codereviewcomment.py
+++ b/lib/lp/code/mail/codereviewcomment.py
@@ -3,8 +3,6 @@
"""Email notifications for code review comments."""
-
-__metaclass__ = type
__all__ = [
'build_inline_comments_section',
'CodeReviewCommentMailer',
diff --git a/lib/lp/code/mail/sourcepackagerecipebuild.py b/lib/lp/code/mail/sourcepackagerecipebuild.py
index 13a33cc..5b81714 100644
--- a/lib/lp/code/mail/sourcepackagerecipebuild.py
+++ b/lib/lp/code/mail/sourcepackagerecipebuild.py
@@ -1,8 +1,6 @@
# Copyright 2010-2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = [
'SourcePackageRecipeBuildMailer',
]
diff --git a/lib/lp/code/mail/tests/test_codehandler.py b/lib/lp/code/mail/tests/test_codehandler.py
index 3ab963d..21f8256 100644
--- a/lib/lp/code/mail/tests/test_codehandler.py
+++ b/lib/lp/code/mail/tests/test_codehandler.py
@@ -3,8 +3,6 @@
"""Testing the CodeHandler."""
-__metaclass__ = type
-
from textwrap import dedent
from lazr.lifecycle.event import (
diff --git a/lib/lp/code/mail/tests/test_sourcepackagerecipebuild.py b/lib/lp/code/mail/tests/test_sourcepackagerecipebuild.py
index ac49d32..b0f8f25 100644
--- a/lib/lp/code/mail/tests/test_sourcepackagerecipebuild.py
+++ b/lib/lp/code/mail/tests/test_sourcepackagerecipebuild.py
@@ -1,10 +1,6 @@
# Copyright 2010-2015 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-
-__metaclass__ = type
-
-
from datetime import timedelta
from storm.locals import Store
diff --git a/lib/lp/code/model/branch.py b/lib/lp/code/model/branch.py
index 2ff7823..f0dd019 100644
--- a/lib/lp/code/model/branch.py
+++ b/lib/lp/code/model/branch.py
@@ -1,7 +1,6 @@
# Copyright 2009-2021 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'Branch',
'BranchSet',
diff --git a/lib/lp/code/model/branchcloud.py b/lib/lp/code/model/branchcloud.py
index 4fb377c..e6969f3 100644
--- a/lib/lp/code/model/branchcloud.py
+++ b/lib/lp/code/model/branchcloud.py
@@ -3,7 +3,6 @@
"""The implementation of the branch cloud."""
-__metaclass__ = type
__all__ = [
'BranchCloud',
]
diff --git a/lib/lp/code/model/branchcollection.py b/lib/lp/code/model/branchcollection.py
index 98a43b7..524fa69 100644
--- a/lib/lp/code/model/branchcollection.py
+++ b/lib/lp/code/model/branchcollection.py
@@ -3,7 +3,6 @@
"""Implementations of `IBranchCollection`."""
-__metaclass__ = type
__all__ = [
'GenericBranchCollection',
]
diff --git a/lib/lp/code/model/branchhosting.py b/lib/lp/code/model/branchhosting.py
index 79f1e49..58594e3 100644
--- a/lib/lp/code/model/branchhosting.py
+++ b/lib/lp/code/model/branchhosting.py
@@ -3,7 +3,6 @@
"""Communication with the Loggerhead API for Bazaar code hosting."""
-__metaclass__ = type
__all__ = [
'BranchHostingClient',
]
diff --git a/lib/lp/code/model/branchlistingqueryoptimiser.py b/lib/lp/code/model/branchlistingqueryoptimiser.py
index a2d1b92..8837921 100644
--- a/lib/lp/code/model/branchlistingqueryoptimiser.py
+++ b/lib/lp/code/model/branchlistingqueryoptimiser.py
@@ -3,7 +3,6 @@
"""Implementation of the BranchListingQueryOptimiser utility."""
-__metaclass__ = type
__all__ = [
'BranchListingQueryOptimiser',
]
diff --git a/lib/lp/code/model/branchlookup.py b/lib/lp/code/model/branchlookup.py
index b0012e7..b63d2eb 100644
--- a/lib/lp/code/model/branchlookup.py
+++ b/lib/lp/code/model/branchlookup.py
@@ -3,7 +3,6 @@
"""Database implementation of the branch lookup utility."""
-__metaclass__ = type
# This module doesn't export anything. If you want to lookup branches by name,
# then get the IBranchLookup utility.
__all__ = []
diff --git a/lib/lp/code/model/branchmergeproposal.py b/lib/lp/code/model/branchmergeproposal.py
index a178017..3755b55 100644
--- a/lib/lp/code/model/branchmergeproposal.py
+++ b/lib/lp/code/model/branchmergeproposal.py
@@ -3,7 +3,6 @@
"""Database class for branch merge proposals."""
-__metaclass__ = type
__all__ = [
'BranchMergeProposal',
'BranchMergeProposalGetter',
diff --git a/lib/lp/code/model/branchmergeproposaljob.py b/lib/lp/code/model/branchmergeproposaljob.py
index 76bcb69..c7b0467 100644
--- a/lib/lp/code/model/branchmergeproposaljob.py
+++ b/lib/lp/code/model/branchmergeproposaljob.py
@@ -7,8 +7,6 @@ This includes both jobs for the proposals themselves, or jobs that are
creating proposals, or diffs relating to the proposals.
"""
-__metaclass__ = type
-
__all__ = [
'BranchMergeProposalJob',
'BranchMergeProposalJobSource',
diff --git a/lib/lp/code/model/branchnamespace.py b/lib/lp/code/model/branchnamespace.py
index 624c7d4..326d1d4 100644
--- a/lib/lp/code/model/branchnamespace.py
+++ b/lib/lp/code/model/branchnamespace.py
@@ -3,7 +3,6 @@
"""Implementations of `IBranchNamespace`."""
-__metaclass__ = type
__all__ = [
'BranchNamespaceSet',
'BRANCH_POLICY_ALLOWED_TYPES',
diff --git a/lib/lp/code/model/branchpuller.py b/lib/lp/code/model/branchpuller.py
index eff799a..34f4872 100644
--- a/lib/lp/code/model/branchpuller.py
+++ b/lib/lp/code/model/branchpuller.py
@@ -3,7 +3,6 @@
"""The way the branch puller talks to the database."""
-__metaclass__ = type
# Export nothing. This code should be obtained via utilities.
__all__ = []
diff --git a/lib/lp/code/model/branchrevision.py b/lib/lp/code/model/branchrevision.py
index a35a77c..cb9a977 100644
--- a/lib/lp/code/model/branchrevision.py
+++ b/lib/lp/code/model/branchrevision.py
@@ -1,7 +1,6 @@
# Copyright 2009-2010 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'BranchRevision',
]
diff --git a/lib/lp/code/model/branchsubscription.py b/lib/lp/code/model/branchsubscription.py
index 070e62f..c9b10a8 100644
--- a/lib/lp/code/model/branchsubscription.py
+++ b/lib/lp/code/model/branchsubscription.py
@@ -1,7 +1,6 @@
# Copyright 2009-2020 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = ['BranchSubscription']
from storm.locals import (
diff --git a/lib/lp/code/model/branchtarget.py b/lib/lp/code/model/branchtarget.py
index 2b84a8f..9100558 100644
--- a/lib/lp/code/model/branchtarget.py
+++ b/lib/lp/code/model/branchtarget.py
@@ -3,7 +3,6 @@
"""Branch targets."""
-__metaclass__ = type
__all__ = [
'PackageBranchTarget',
'PersonBranchTarget',
diff --git a/lib/lp/code/model/codeimport.py b/lib/lp/code/model/codeimport.py
index 57dcb2f..b8d0da8 100644
--- a/lib/lp/code/model/codeimport.py
+++ b/lib/lp/code/model/codeimport.py
@@ -3,8 +3,6 @@
"""Database classes including and related to CodeImport."""
-__metaclass__ = type
-
__all__ = [
'CodeImport',
'CodeImportSet',
diff --git a/lib/lp/code/model/codeimportevent.py b/lib/lp/code/model/codeimportevent.py
index fef2ab8..eb399d1 100644
--- a/lib/lp/code/model/codeimportevent.py
+++ b/lib/lp/code/model/codeimportevent.py
@@ -3,7 +3,6 @@
"""Database classes related to and including CodeImportEvent."""
-__metaclass__ = type
__all__ = [
'CodeImportEvent',
'CodeImportEventSet',
diff --git a/lib/lp/code/model/codeimportjob.py b/lib/lp/code/model/codeimportjob.py
index 989bc73..a7839a3 100644
--- a/lib/lp/code/model/codeimportjob.py
+++ b/lib/lp/code/model/codeimportjob.py
@@ -3,7 +3,6 @@
"""Database classes for the CodeImportJob table."""
-__metaclass__ = type
__all__ = [
'CodeImportJob',
'CodeImportJobSet',
diff --git a/lib/lp/code/model/codeimportmachine.py b/lib/lp/code/model/codeimportmachine.py
index eb66f0a..084f8ca 100644
--- a/lib/lp/code/model/codeimportmachine.py
+++ b/lib/lp/code/model/codeimportmachine.py
@@ -3,8 +3,6 @@
"""Database classes including and related to CodeImportMachine."""
-__metaclass__ = type
-
__all__ = [
'CodeImportMachine',
'CodeImportMachineSet',
diff --git a/lib/lp/code/model/codeimportresult.py b/lib/lp/code/model/codeimportresult.py
index d50928f..84fb963 100644
--- a/lib/lp/code/model/codeimportresult.py
+++ b/lib/lp/code/model/codeimportresult.py
@@ -3,7 +3,6 @@
"""Database classes for the CodeImportResult table."""
-__metaclass__ = type
__all__ = ['CodeImportResult', 'CodeImportResultSet']
import pytz
diff --git a/lib/lp/code/model/codereviewcomment.py b/lib/lp/code/model/codereviewcomment.py
index 53e8a84..be85747 100644
--- a/lib/lp/code/model/codereviewcomment.py
+++ b/lib/lp/code/model/codereviewcomment.py
@@ -3,7 +3,6 @@
"""The database implementation class for CodeReviewComment."""
-__metaclass__ = type
__all__ = [
'CodeReviewComment',
]
diff --git a/lib/lp/code/model/codereviewinlinecomment.py b/lib/lp/code/model/codereviewinlinecomment.py
index 727c4d8..a6dc6da 100644
--- a/lib/lp/code/model/codereviewinlinecomment.py
+++ b/lib/lp/code/model/codereviewinlinecomment.py
@@ -3,7 +3,6 @@
"""Model classes for inline comments for preview diffs."""
-__metaclass__ = type
__all__ = [
'CodeReviewInlineComment',
'CodeReviewInlineCommentDraft',
diff --git a/lib/lp/code/model/codereviewvote.py b/lib/lp/code/model/codereviewvote.py
index b695ebe..a3bfd32 100644
--- a/lib/lp/code/model/codereviewvote.py
+++ b/lib/lp/code/model/codereviewvote.py
@@ -3,7 +3,6 @@
"""CodeReviewVoteReference database class."""
-__metaclass__ = type
__all__ = [
'CodeReviewVoteReference',
]
diff --git a/lib/lp/code/model/defaultgit.py b/lib/lp/code/model/defaultgit.py
index a170c7d..b5c92f3 100644
--- a/lib/lp/code/model/defaultgit.py
+++ b/lib/lp/code/model/defaultgit.py
@@ -3,7 +3,6 @@
"""Implementation of `ICanHasDefaultGitRepository`."""
-__metaclass__ = type
# Don't export anything -- anything you need from this module you can get by
# adapting another object.
__all__ = []
diff --git a/lib/lp/code/model/diff.py b/lib/lp/code/model/diff.py
index 4cabfe9..6041c26 100644
--- a/lib/lp/code/model/diff.py
+++ b/lib/lp/code/model/diff.py
@@ -3,7 +3,6 @@
"""Implementation classes for IDiff, etc."""
-__metaclass__ = type
__all__ = [
'Diff',
'IncrementalDiff',
diff --git a/lib/lp/code/model/directbranchcommit.py b/lib/lp/code/model/directbranchcommit.py
index 17f0e8d..dca1b05 100644
--- a/lib/lp/code/model/directbranchcommit.py
+++ b/lib/lp/code/model/directbranchcommit.py
@@ -3,7 +3,6 @@
"""Commit files straight to bzr branch."""
-__metaclass__ = type
__all__ = [
'ConcurrentUpdateError',
'DirectBranchCommit',
diff --git a/lib/lp/code/model/gitactivity.py b/lib/lp/code/model/gitactivity.py
index 9ac33c6..7fe0dee 100644
--- a/lib/lp/code/model/gitactivity.py
+++ b/lib/lp/code/model/gitactivity.py
@@ -3,7 +3,6 @@
"""Git repository activity logs."""
-__metaclass__ = type
__all__ = [
'GitActivity',
]
diff --git a/lib/lp/code/model/gitcollection.py b/lib/lp/code/model/gitcollection.py
index 37cf78d..444a8eb 100644
--- a/lib/lp/code/model/gitcollection.py
+++ b/lib/lp/code/model/gitcollection.py
@@ -3,7 +3,6 @@
"""Implementations of `IGitCollection`."""
-__metaclass__ = type
__all__ = [
'GenericGitCollection',
]
diff --git a/lib/lp/code/model/githosting.py b/lib/lp/code/model/githosting.py
index 57b5ee5..6494390 100644
--- a/lib/lp/code/model/githosting.py
+++ b/lib/lp/code/model/githosting.py
@@ -3,7 +3,6 @@
"""Communication with the Git hosting service."""
-__metaclass__ = type
__all__ = [
'GitHostingClient',
'RefCopyOperation',
diff --git a/lib/lp/code/model/gitjob.py b/lib/lp/code/model/gitjob.py
index 2bec89f..69667f1 100644
--- a/lib/lp/code/model/gitjob.py
+++ b/lib/lp/code/model/gitjob.py
@@ -1,8 +1,6 @@
# Copyright 2015-2020 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = [
'describe_repository_delta',
'GitJob',
diff --git a/lib/lp/code/model/gitlookup.py b/lib/lp/code/model/gitlookup.py
index 5608f78..03b5a43 100644
--- a/lib/lp/code/model/gitlookup.py
+++ b/lib/lp/code/model/gitlookup.py
@@ -3,7 +3,6 @@
"""Database implementation of the Git repository lookup utility."""
-__metaclass__ = type
# This module doesn't export anything. If you want to look up Git
# repositories by name, then get the IGitLookup utility.
__all__ = []
diff --git a/lib/lp/code/model/gitnamespace.py b/lib/lp/code/model/gitnamespace.py
index 3c2078f..7ba9a13 100644
--- a/lib/lp/code/model/gitnamespace.py
+++ b/lib/lp/code/model/gitnamespace.py
@@ -3,7 +3,6 @@
"""Implementations of `IGitNamespace`."""
-__metaclass__ = type
__all__ = [
'GitNamespaceSet',
'OCIProjectGitNamespace',
diff --git a/lib/lp/code/model/gitref.py b/lib/lp/code/model/gitref.py
index efaf6ac..ca4c05b 100644
--- a/lib/lp/code/model/gitref.py
+++ b/lib/lp/code/model/gitref.py
@@ -1,7 +1,6 @@
# Copyright 2015-2021 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'GitRef',
'GitRefDefault',
diff --git a/lib/lp/code/model/gitrepository.py b/lib/lp/code/model/gitrepository.py
index c4f69f0..8fb7cda 100644
--- a/lib/lp/code/model/gitrepository.py
+++ b/lib/lp/code/model/gitrepository.py
@@ -1,7 +1,6 @@
# Copyright 2015-2021 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'get_git_repository_privacy_filter',
'GitRepository',
diff --git a/lib/lp/code/model/gitrule.py b/lib/lp/code/model/gitrule.py
index 16b4b26..5d416b7 100644
--- a/lib/lp/code/model/gitrule.py
+++ b/lib/lp/code/model/gitrule.py
@@ -3,7 +3,6 @@
"""Git repository access rules."""
-__metaclass__ = type
__all__ = [
'GitRule',
'GitRuleGrant',
diff --git a/lib/lp/code/model/gitsubscription.py b/lib/lp/code/model/gitsubscription.py
index fe3a254..a1d2b49 100644
--- a/lib/lp/code/model/gitsubscription.py
+++ b/lib/lp/code/model/gitsubscription.py
@@ -1,7 +1,6 @@
# Copyright 2015 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'GitSubscription',
]
diff --git a/lib/lp/code/model/hasbranches.py b/lib/lp/code/model/hasbranches.py
index 4fee0d0..9be8a25 100644
--- a/lib/lp/code/model/hasbranches.py
+++ b/lib/lp/code/model/hasbranches.py
@@ -3,7 +3,6 @@
"""Mixin classes to implement methods for IHas<code related bits>."""
-__metaclass__ = type
__all__ = [
'HasBranchesMixin',
'HasCodeImportsMixin',
diff --git a/lib/lp/code/model/linkedbranch.py b/lib/lp/code/model/linkedbranch.py
index cfed972..45b7e87 100644
--- a/lib/lp/code/model/linkedbranch.py
+++ b/lib/lp/code/model/linkedbranch.py
@@ -3,7 +3,6 @@
"""Implementation of `ICanHasLinkedBranch`."""
-__metaclass__ = type
# Don't export anything -- anything you need from this module you can get by
# adapting another object.
__all__ = []
diff --git a/lib/lp/code/model/recipebuilder.py b/lib/lp/code/model/recipebuilder.py
index dd88550..a40ba2c 100644
--- a/lib/lp/code/model/recipebuilder.py
+++ b/lib/lp/code/model/recipebuilder.py
@@ -3,7 +3,6 @@
"""Code to build recipes on the buildfarm."""
-__metaclass__ = type
__all__ = [
'RecipeBuildBehaviour',
]
diff --git a/lib/lp/code/model/revision.py b/lib/lp/code/model/revision.py
index 807676a..27a292e 100644
--- a/lib/lp/code/model/revision.py
+++ b/lib/lp/code/model/revision.py
@@ -1,7 +1,6 @@
# Copyright 2009-2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'Revision',
'RevisionAuthor',
diff --git a/lib/lp/code/model/revisioncache.py b/lib/lp/code/model/revisioncache.py
index cdd35dd..d43096c 100644
--- a/lib/lp/code/model/revisioncache.py
+++ b/lib/lp/code/model/revisioncache.py
@@ -3,7 +3,6 @@
"""Implementation for the IRevisionCache and IRevisionCollection."""
-__metaclass__ = type
__all__ = [
'GenericRevisionCollection',
]
diff --git a/lib/lp/code/model/seriessourcepackagebranch.py b/lib/lp/code/model/seriessourcepackagebranch.py
index 25706ca..5aa7d7d 100644
--- a/lib/lp/code/model/seriessourcepackagebranch.py
+++ b/lib/lp/code/model/seriessourcepackagebranch.py
@@ -3,7 +3,6 @@
"""The content classes for links from source packages to branches.."""
-__metaclass__ = type
__all__ = [
'SeriesSourcePackageBranch',
'SeriesSourcePackageBranchSet',
diff --git a/lib/lp/code/model/sourcepackagerecipe.py b/lib/lp/code/model/sourcepackagerecipe.py
index a98f839..28d45d5 100644
--- a/lib/lp/code/model/sourcepackagerecipe.py
+++ b/lib/lp/code/model/sourcepackagerecipe.py
@@ -3,7 +3,6 @@
"""Implementation of the `SourcePackageRecipe` content type."""
-__metaclass__ = type
__all__ = [
'SourcePackageRecipe',
]
diff --git a/lib/lp/code/model/sourcepackagerecipebuild.py b/lib/lp/code/model/sourcepackagerecipebuild.py
index aac5a0f..3a4f0ba 100644
--- a/lib/lp/code/model/sourcepackagerecipebuild.py
+++ b/lib/lp/code/model/sourcepackagerecipebuild.py
@@ -3,7 +3,6 @@
"""Implementation code for source package builds."""
-__metaclass__ = type
__all__ = [
'SourcePackageRecipeBuild',
]
diff --git a/lib/lp/code/model/sourcepackagerecipedata.py b/lib/lp/code/model/sourcepackagerecipedata.py
index 67be2e3..c67fbf0 100644
--- a/lib/lp/code/model/sourcepackagerecipedata.py
+++ b/lib/lp/code/model/sourcepackagerecipedata.py
@@ -8,7 +8,6 @@ SourcePackageRecipeBuild.manifest, the classes in this file have no public
interfaces.
"""
-__metaclass__ = type
__all__ = ['SourcePackageRecipeData']
import re
diff --git a/lib/lp/code/model/tests/test_branch.py b/lib/lp/code/model/tests/test_branch.py
index 37299d9..b3bc7de 100644
--- a/lib/lp/code/model/tests/test_branch.py
+++ b/lib/lp/code/model/tests/test_branch.py
@@ -3,8 +3,6 @@
"""Tests for Branches."""
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/code/model/tests/test_branchcloud.py b/lib/lp/code/model/tests/test_branchcloud.py
index 5406e1c..4fb7143 100644
--- a/lib/lp/code/model/tests/test_branchcloud.py
+++ b/lib/lp/code/model/tests/test_branchcloud.py
@@ -3,8 +3,6 @@
"""Tests for IBranchCloud provider."""
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/code/model/tests/test_branchcollection.py b/lib/lp/code/model/tests/test_branchcollection.py
index bba26b9..e66b16b 100644
--- a/lib/lp/code/model/tests/test_branchcollection.py
+++ b/lib/lp/code/model/tests/test_branchcollection.py
@@ -3,8 +3,6 @@
"""Tests for branch collections."""
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/code/model/tests/test_branchhosting.py b/lib/lp/code/model/tests/test_branchhosting.py
index 56e0f1c..1e1f874 100644
--- a/lib/lp/code/model/tests/test_branchhosting.py
+++ b/lib/lp/code/model/tests/test_branchhosting.py
@@ -7,8 +7,6 @@ We don't currently do integration testing against a real hosting service,
but we at least check that we're sending the right requests.
"""
-__metaclass__ = type
-
from contextlib import contextmanager
import re
diff --git a/lib/lp/code/model/tests/test_branchjob.py b/lib/lp/code/model/tests/test_branchjob.py
index f8e8ca0..8db2ac7 100644
--- a/lib/lp/code/model/tests/test_branchjob.py
+++ b/lib/lp/code/model/tests/test_branchjob.py
@@ -3,8 +3,6 @@
"""Tests for BranchJobs."""
-__metaclass__ = type
-
import datetime
import os
import shutil
diff --git a/lib/lp/code/model/tests/test_branchlistingqueryoptimiser.py b/lib/lp/code/model/tests/test_branchlistingqueryoptimiser.py
index 64ad1b9..386bb4b 100644
--- a/lib/lp/code/model/tests/test_branchlistingqueryoptimiser.py
+++ b/lib/lp/code/model/tests/test_branchlistingqueryoptimiser.py
@@ -3,8 +3,6 @@
"""Tests for the branch listing query optimiser."""
-__metaclass__ = type
-
from storm.store import Store
from zope.component import getUtility
diff --git a/lib/lp/code/model/tests/test_branchlookup.py b/lib/lp/code/model/tests/test_branchlookup.py
index 7c8903e..67a41a8 100644
--- a/lib/lp/code/model/tests/test_branchlookup.py
+++ b/lib/lp/code/model/tests/test_branchlookup.py
@@ -3,8 +3,6 @@
"""Tests for the IBranchLookup implementation."""
-__metaclass__ = type
-
from lazr.uri import URI
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
diff --git a/lib/lp/code/model/tests/test_branchmergeproposal.py b/lib/lp/code/model/tests/test_branchmergeproposal.py
index 945e28d..fcb6083 100644
--- a/lib/lp/code/model/tests/test_branchmergeproposal.py
+++ b/lib/lp/code/model/tests/test_branchmergeproposal.py
@@ -3,8 +3,6 @@
"""Tests for BranchMergeProposals."""
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/code/model/tests/test_branchmergeproposaljobs.py b/lib/lp/code/model/tests/test_branchmergeproposaljobs.py
index 49d84c1..8ea42a1 100644
--- a/lib/lp/code/model/tests/test_branchmergeproposaljobs.py
+++ b/lib/lp/code/model/tests/test_branchmergeproposaljobs.py
@@ -3,8 +3,6 @@
"""Tests for branch merge proposal jobs."""
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/code/model/tests/test_branchnamespace.py b/lib/lp/code/model/tests/test_branchnamespace.py
index 7eb53bb..1c10d07 100644
--- a/lib/lp/code/model/tests/test_branchnamespace.py
+++ b/lib/lp/code/model/tests/test_branchnamespace.py
@@ -3,8 +3,6 @@
"""Tests for `IBranchNamespace` implementations."""
-__metaclass__ = type
-
import six
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
diff --git a/lib/lp/code/model/tests/test_branchpuller.py b/lib/lp/code/model/tests/test_branchpuller.py
index 9e0ab5d..454fc23 100644
--- a/lib/lp/code/model/tests/test_branchpuller.py
+++ b/lib/lp/code/model/tests/test_branchpuller.py
@@ -3,8 +3,6 @@
"""Tests for the branch puller model code."""
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/code/model/tests/test_branchset.py b/lib/lp/code/model/tests/test_branchset.py
index e79e43d..7f9ede2 100644
--- a/lib/lp/code/model/tests/test_branchset.py
+++ b/lib/lp/code/model/tests/test_branchset.py
@@ -3,8 +3,6 @@
"""Tests for BranchSet."""
-__metaclass__ = type
-
from datetime import datetime
import pytz
diff --git a/lib/lp/code/model/tests/test_branchsubscription.py b/lib/lp/code/model/tests/test_branchsubscription.py
index 955aaf3..c80273c 100644
--- a/lib/lp/code/model/tests/test_branchsubscription.py
+++ b/lib/lp/code/model/tests/test_branchsubscription.py
@@ -3,8 +3,6 @@
"""Tests for the BranchSubscription model object."""
-__metaclass__ = type
-
from zope.component import getUtility
from lp.app.enums import InformationType
diff --git a/lib/lp/code/model/tests/test_branchtarget.py b/lib/lp/code/model/tests/test_branchtarget.py
index 76fcc35..96d74c1 100644
--- a/lib/lp/code/model/tests/test_branchtarget.py
+++ b/lib/lp/code/model/tests/test_branchtarget.py
@@ -3,8 +3,6 @@
"""Tests for branch contexts."""
-__metaclass__ = type
-
from zope.security.proxy import removeSecurityProxy
from lp.app.enums import InformationType
diff --git a/lib/lp/code/model/tests/test_branchvisibility.py b/lib/lp/code/model/tests/test_branchvisibility.py
index 2170c7c..c574af5 100644
--- a/lib/lp/code/model/tests/test_branchvisibility.py
+++ b/lib/lp/code/model/tests/test_branchvisibility.py
@@ -10,8 +10,6 @@ Some branches are also considered "private". These are branches that
are only visible to the owner of the branch, and the subscribers.
"""
-__metaclass__ = type
-
from zope.component import (
getAdapter,
getUtility,
diff --git a/lib/lp/code/model/tests/test_codeimportjob.py b/lib/lp/code/model/tests/test_codeimportjob.py
index 83b0091..4ff9155 100644
--- a/lib/lp/code/model/tests/test_codeimportjob.py
+++ b/lib/lp/code/model/tests/test_codeimportjob.py
@@ -3,8 +3,6 @@
"""Unit tests for CodeImportJob and CodeImportJobWorkflow."""
-__metaclass__ = type
-
__all__ = [
'NewEvents',
]
diff --git a/lib/lp/code/model/tests/test_codeimportresult.py b/lib/lp/code/model/tests/test_codeimportresult.py
index a717bb4..d34f379 100644
--- a/lib/lp/code/model/tests/test_codeimportresult.py
+++ b/lib/lp/code/model/tests/test_codeimportresult.py
@@ -3,8 +3,6 @@
"""Tests for CodeImportResult."""
-__metaclass__ = type
-
from datetime import datetime
from pytz import UTC
diff --git a/lib/lp/code/model/tests/test_codereviewinlinecomment.py b/lib/lp/code/model/tests/test_codereviewinlinecomment.py
index 27f8caa..00111e9 100644
--- a/lib/lp/code/model/tests/test_codereviewinlinecomment.py
+++ b/lib/lp/code/model/tests/test_codereviewinlinecomment.py
@@ -3,8 +3,6 @@
"""Tests for CodeReviewInlineComment{,Draft,Set}"""
-__metaclass__ = type
-
from datetime import datetime
from pytz import UTC
diff --git a/lib/lp/code/model/tests/test_codereviewkarma.py b/lib/lp/code/model/tests/test_codereviewkarma.py
index 0db1b76..5b3027b 100644
--- a/lib/lp/code/model/tests/test_codereviewkarma.py
+++ b/lib/lp/code/model/tests/test_codereviewkarma.py
@@ -3,8 +3,6 @@
"""Tests for karma allocated for code reviews."""
-__metaclass__ = type
-
from lp.code.adapters.branch import BranchMergeProposalNoPreviewDiffDelta
from lp.registry.interfaces.karma import IKarmaAssignedEvent
from lp.registry.interfaces.person import IPerson
diff --git a/lib/lp/code/model/tests/test_diff.py b/lib/lp/code/model/tests/test_diff.py
index 1c1827f..9675214 100644
--- a/lib/lp/code/model/tests/test_diff.py
+++ b/lib/lp/code/model/tests/test_diff.py
@@ -3,8 +3,6 @@
"""Tests for Diff, etc."""
-__metaclass__ = type
-
from difflib import unified_diff
from io import BytesIO
import logging
diff --git a/lib/lp/code/model/tests/test_gitactivity.py b/lib/lp/code/model/tests/test_gitactivity.py
index c71394c..748888c 100644
--- a/lib/lp/code/model/tests/test_gitactivity.py
+++ b/lib/lp/code/model/tests/test_gitactivity.py
@@ -3,8 +3,6 @@
"""Tests for Git repository activity logs."""
-__metaclass__ = type
-
from storm.store import Store
from testtools.matchers import MatchesStructure
diff --git a/lib/lp/code/model/tests/test_gitcollection.py b/lib/lp/code/model/tests/test_gitcollection.py
index d78ecf8..b3250f7 100644
--- a/lib/lp/code/model/tests/test_gitcollection.py
+++ b/lib/lp/code/model/tests/test_gitcollection.py
@@ -3,8 +3,6 @@
"""Tests for Git repository collections."""
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/code/model/tests/test_githosting.py b/lib/lp/code/model/tests/test_githosting.py
index 242552a..b1a52b7 100644
--- a/lib/lp/code/model/tests/test_githosting.py
+++ b/lib/lp/code/model/tests/test_githosting.py
@@ -11,8 +11,6 @@ We don't currently do integration testing against a real hosting service,
but we at least check that we're sending the right requests.
"""
-__metaclass__ = type
-
import base64
from contextlib import contextmanager
import json
diff --git a/lib/lp/code/model/tests/test_gitjob.py b/lib/lp/code/model/tests/test_gitjob.py
index ce11ee2..b216a5e 100644
--- a/lib/lp/code/model/tests/test_gitjob.py
+++ b/lib/lp/code/model/tests/test_gitjob.py
@@ -3,8 +3,6 @@
"""Tests for `GitJob`s."""
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/code/model/tests/test_gitlookup.py b/lib/lp/code/model/tests/test_gitlookup.py
index 1aa7c39..0f8b8fe 100644
--- a/lib/lp/code/model/tests/test_gitlookup.py
+++ b/lib/lp/code/model/tests/test_gitlookup.py
@@ -3,8 +3,6 @@
"""Tests for the IGitLookup implementation."""
-__metaclass__ = type
-
from lazr.uri import URI
from zope.component import getUtility
diff --git a/lib/lp/code/model/tests/test_gitref.py b/lib/lp/code/model/tests/test_gitref.py
index e2eac23..b97e345 100644
--- a/lib/lp/code/model/tests/test_gitref.py
+++ b/lib/lp/code/model/tests/test_gitref.py
@@ -3,8 +3,6 @@
"""Tests for Git references."""
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/code/model/tests/test_gitrepository.py b/lib/lp/code/model/tests/test_gitrepository.py
index 6edeb1e..78c3353 100644
--- a/lib/lp/code/model/tests/test_gitrepository.py
+++ b/lib/lp/code/model/tests/test_gitrepository.py
@@ -7,8 +7,6 @@
"""Tests for Git repositories."""
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/code/model/tests/test_gitrule.py b/lib/lp/code/model/tests/test_gitrule.py
index 82b6b1a..211014e 100644
--- a/lib/lp/code/model/tests/test_gitrule.py
+++ b/lib/lp/code/model/tests/test_gitrule.py
@@ -3,8 +3,6 @@
"""Tests for Git repository access rules."""
-__metaclass__ = type
-
from storm.store import Store
from testtools.matchers import (
Equals,
diff --git a/lib/lp/code/model/tests/test_gitsubscription.py b/lib/lp/code/model/tests/test_gitsubscription.py
index 489a556..fbc559c 100644
--- a/lib/lp/code/model/tests/test_gitsubscription.py
+++ b/lib/lp/code/model/tests/test_gitsubscription.py
@@ -3,8 +3,6 @@
"""Tests for the GitSubscription model object."""
-__metaclass__ = type
-
from lp.app.enums import InformationType
from lp.app.errors import (
SubscriptionPrivacyViolation,
diff --git a/lib/lp/code/model/tests/test_hasbranches.py b/lib/lp/code/model/tests/test_hasbranches.py
index dd9d596..80ce270 100644
--- a/lib/lp/code/model/tests/test_hasbranches.py
+++ b/lib/lp/code/model/tests/test_hasbranches.py
@@ -3,8 +3,6 @@
"""Tests for classes that implement IHasBranches."""
-__metaclass__ = type
-
from functools import partial
from lp.app.enums import InformationType
diff --git a/lib/lp/code/model/tests/test_hasgitrepositories.py b/lib/lp/code/model/tests/test_hasgitrepositories.py
index 4f34bb0..37415b6 100644
--- a/lib/lp/code/model/tests/test_hasgitrepositories.py
+++ b/lib/lp/code/model/tests/test_hasgitrepositories.py
@@ -3,8 +3,6 @@
"""Tests for classes that implement IHasGitRepositories."""
-__metaclass__ = type
-
from lp.code.interfaces.hasgitrepositories import IHasGitRepositories
from lp.testing import (
TestCaseWithFactory,
diff --git a/lib/lp/code/model/tests/test_hasmergeproposals.py b/lib/lp/code/model/tests/test_hasmergeproposals.py
index 42e7fcf..532410a 100644
--- a/lib/lp/code/model/tests/test_hasmergeproposals.py
+++ b/lib/lp/code/model/tests/test_hasmergeproposals.py
@@ -3,8 +3,6 @@
"""Tests for classes that implement IHasMergeProposals."""
-__metaclass__ = type
-
from zope.interface.verify import verifyObject
from lp.code.interfaces.hasbranches import IHasMergeProposals
diff --git a/lib/lp/code/model/tests/test_hasrecipes.py b/lib/lp/code/model/tests/test_hasrecipes.py
index d24b8d7..402b8e2 100644
--- a/lib/lp/code/model/tests/test_hasrecipes.py
+++ b/lib/lp/code/model/tests/test_hasrecipes.py
@@ -3,8 +3,6 @@
"""Tests for classes that implement IHasRecipes."""
-__metaclass__ = type
-
from lp.code.interfaces.hasrecipes import IHasRecipes
from lp.testing import TestCaseWithFactory
from lp.testing.layers import DatabaseFunctionalLayer
diff --git a/lib/lp/code/model/tests/test_linkedbranch.py b/lib/lp/code/model/tests/test_linkedbranch.py
index 87b1ef8..e282fd2 100644
--- a/lib/lp/code/model/tests/test_linkedbranch.py
+++ b/lib/lp/code/model/tests/test_linkedbranch.py
@@ -3,8 +3,6 @@
"""Tests for linked branch implementations."""
-__metaclass__ = type
-
from zope.security.proxy import removeSecurityProxy
from lp.code.interfaces.linkedbranch import (
diff --git a/lib/lp/code/model/tests/test_recipebuilder.py b/lib/lp/code/model/tests/test_recipebuilder.py
index 3a97747..add7e6e 100644
--- a/lib/lp/code/model/tests/test_recipebuilder.py
+++ b/lib/lp/code/model/tests/test_recipebuilder.py
@@ -3,8 +3,6 @@
"""Test RecipeBuildBehaviour."""
-__metaclass__ = type
-
import os.path
import shutil
import tempfile
diff --git a/lib/lp/code/model/tests/test_revision.py b/lib/lp/code/model/tests/test_revision.py
index 43c1fe5..376a32f 100644
--- a/lib/lp/code/model/tests/test_revision.py
+++ b/lib/lp/code/model/tests/test_revision.py
@@ -3,8 +3,6 @@
"""Tests for Revisions."""
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/code/model/tests/test_revisionauthor.py b/lib/lp/code/model/tests/test_revisionauthor.py
index e7fe785..4953571 100644
--- a/lib/lp/code/model/tests/test_revisionauthor.py
+++ b/lib/lp/code/model/tests/test_revisionauthor.py
@@ -3,8 +3,6 @@
"""Tests for RevisionAuthors."""
-__metaclass__ = type
-
import transaction
from zope.component import getUtility
diff --git a/lib/lp/code/model/tests/test_revisioncache.py b/lib/lp/code/model/tests/test_revisioncache.py
index 3de1d53..3276bc2 100644
--- a/lib/lp/code/model/tests/test_revisioncache.py
+++ b/lib/lp/code/model/tests/test_revisioncache.py
@@ -3,8 +3,6 @@
"""Tests relating to the revision cache."""
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/code/model/tests/test_seriessourcepackagebranch.py b/lib/lp/code/model/tests/test_seriessourcepackagebranch.py
index 0e9d4a3..aba829a 100644
--- a/lib/lp/code/model/tests/test_seriessourcepackagebranch.py
+++ b/lib/lp/code/model/tests/test_seriessourcepackagebranch.py
@@ -3,8 +3,6 @@
"""Model tests for distro series source package branch links."""
-__metaclass__ = type
-
from lp.code.model.seriessourcepackagebranch import (
SeriesSourcePackageBranchSet,
)
diff --git a/lib/lp/code/model/tests/test_sourcepackagerecipe.py b/lib/lp/code/model/tests/test_sourcepackagerecipe.py
index 51b463c..274b1d9 100644
--- a/lib/lp/code/model/tests/test_sourcepackagerecipe.py
+++ b/lib/lp/code/model/tests/test_sourcepackagerecipe.py
@@ -3,8 +3,6 @@
"""Tests for the SourcePackageRecipe content type."""
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/code/model/tests/test_sourcepackagerecipebuild.py b/lib/lp/code/model/tests/test_sourcepackagerecipebuild.py
index 98447ed..657fb81 100644
--- a/lib/lp/code/model/tests/test_sourcepackagerecipebuild.py
+++ b/lib/lp/code/model/tests/test_sourcepackagerecipebuild.py
@@ -3,8 +3,6 @@
"""Tests for source package builds."""
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/code/publisher.py b/lib/lp/code/publisher.py
index 2758b90..8048f8f 100644
--- a/lib/lp/code/publisher.py
+++ b/lib/lp/code/publisher.py
@@ -3,7 +3,6 @@
"""Code's custom publication."""
-__metaclass__ = type
__all__ = [
'BranchesFacet',
'CodeBrowserRequest',
diff --git a/lib/lp/code/scripts/repackgitrepository.py b/lib/lp/code/scripts/repackgitrepository.py
index 2cd07a5..9a202a4 100644
--- a/lib/lp/code/scripts/repackgitrepository.py
+++ b/lib/lp/code/scripts/repackgitrepository.py
@@ -3,8 +3,6 @@
"""Functions used with the repack Git repositories script."""
-__metaclass__ = type
-
from datetime import timedelta
from psycopg2.extensions import TransactionRollbackError
diff --git a/lib/lp/code/scripts/revisionkarma.py b/lib/lp/code/scripts/revisionkarma.py
index 4043c67..9167280 100644
--- a/lib/lp/code/scripts/revisionkarma.py
+++ b/lib/lp/code/scripts/revisionkarma.py
@@ -3,7 +3,6 @@
"""The actual script class to allocate revisions."""
-__metaclass__ = type
__all__ = ['RevisionKarmaAllocator']
import transaction
diff --git a/lib/lp/code/scripts/tests/test_revisionkarma.py b/lib/lp/code/scripts/tests/test_revisionkarma.py
index 9838c4e..96f22bf 100644
--- a/lib/lp/code/scripts/tests/test_revisionkarma.py
+++ b/lib/lp/code/scripts/tests/test_revisionkarma.py
@@ -3,8 +3,6 @@
"""Tests for the cron script that updates revision karma."""
-__metaclass__ = type
-
from storm.store import Store
import transaction
diff --git a/lib/lp/code/security.py b/lib/lp/code/security.py
index 980a468..bbf28ff 100644
--- a/lib/lp/code/security.py
+++ b/lib/lp/code/security.py
@@ -3,7 +3,6 @@
"""Security adapters for the code module."""
-__metaclass__ = type
__all__ = [
'BranchSubscriptionEdit',
'BranchSubscriptionView',
diff --git a/lib/lp/code/subscribers/branchmergeproposal.py b/lib/lp/code/subscribers/branchmergeproposal.py
index a214c8f..6b810a4 100644
--- a/lib/lp/code/subscribers/branchmergeproposal.py
+++ b/lib/lp/code/subscribers/branchmergeproposal.py
@@ -3,8 +3,6 @@
"""Event subscribers for branch merge proposals."""
-__metaclass__ = type
-
from zope.component import getUtility
from zope.principalregistry.principalregistry import UnauthenticatedPrincipal
diff --git a/lib/lp/code/subscribers/git.py b/lib/lp/code/subscribers/git.py
index 6ac986b..5a4ad04 100644
--- a/lib/lp/code/subscribers/git.py
+++ b/lib/lp/code/subscribers/git.py
@@ -3,9 +3,6 @@
"""Event subscribers for Git repositories."""
-__metaclass__ = type
-
-
def refs_updated(repository, event):
"""Some references in a Git repository have been updated."""
repository.updateMergeCommitIDs(event.paths)
diff --git a/lib/lp/code/tests/branch_helper.py b/lib/lp/code/tests/branch_helper.py
index 0bc5495..cc49b25 100644
--- a/lib/lp/code/tests/branch_helper.py
+++ b/lib/lp/code/tests/branch_helper.py
@@ -3,7 +3,6 @@
"""Helper methods for branch tests and pagetest."""
-__metaclass__ = type
__all__ = [
'reset_all_branch_last_modified',
]
diff --git a/lib/lp/code/tests/codeimporthelpers.py b/lib/lp/code/tests/codeimporthelpers.py
index 15431d8..6ba3b12 100644
--- a/lib/lp/code/tests/codeimporthelpers.py
+++ b/lib/lp/code/tests/codeimporthelpers.py
@@ -3,7 +3,6 @@
"""Helpers for Code Import page tests."""
-__metaclass__ = type
__all__ = [
'get_import_for_branch_name',
'make_finished_import',
diff --git a/lib/lp/code/tests/helpers.py b/lib/lp/code/tests/helpers.py
index e479b87..a240ab4 100644
--- a/lib/lp/code/tests/helpers.py
+++ b/lib/lp/code/tests/helpers.py
@@ -3,7 +3,6 @@
"""Helper functions for code testing live here."""
-__metaclass__ = type
__all__ = [
'add_revision_to_branch',
'BranchHostingFixture',
diff --git a/lib/lp/code/tests/test_branch_access_policy_triggers.py b/lib/lp/code/tests/test_branch_access_policy_triggers.py
index 5476d81..3fff6a8 100644
--- a/lib/lp/code/tests/test_branch_access_policy_triggers.py
+++ b/lib/lp/code/tests/test_branch_access_policy_triggers.py
@@ -1,8 +1,6 @@
# Copyright 2012-2017 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
diff --git a/lib/lp/code/tests/test_branch_webservice.py b/lib/lp/code/tests/test_branch_webservice.py
index ae44516..653ea5c 100644
--- a/lib/lp/code/tests/test_branch_webservice.py
+++ b/lib/lp/code/tests/test_branch_webservice.py
@@ -1,8 +1,6 @@
# Copyright 2011-2017 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from lazr.restfulclient.errors import BadRequest
from testtools.matchers import LessThan
from zope.component import getUtility
diff --git a/lib/lp/code/tests/test_branchurifield.py b/lib/lp/code/tests/test_branchurifield.py
index 08f2243..e1aff29 100644
--- a/lib/lp/code/tests/test_branchurifield.py
+++ b/lib/lp/code/tests/test_branchurifield.py
@@ -3,8 +3,6 @@
"""Tests for BranchURIField."""
-__metaclass__ = type
-
from lp.app.validators import LaunchpadValidationError
from lp.code.interfaces.branch import (
BranchURIField,
diff --git a/lib/lp/code/tests/test_bzr.py b/lib/lp/code/tests/test_bzr.py
index 36b29a4..24ccead 100644
--- a/lib/lp/code/tests/test_bzr.py
+++ b/lib/lp/code/tests/test_bzr.py
@@ -3,8 +3,6 @@
"""Tests for lp.code.bzr."""
-__metaclass__ = type
-
from breezy.errors import NoSuchRevision
from breezy.revision import NULL_REVISION
from breezy.tests import (
diff --git a/lib/lp/code/tests/test_directbranchcommit.py b/lib/lp/code/tests/test_directbranchcommit.py
index e39b755..977d855 100644
--- a/lib/lp/code/tests/test_directbranchcommit.py
+++ b/lib/lp/code/tests/test_directbranchcommit.py
@@ -3,8 +3,6 @@
"""Tests for `DirectBranchCommit`."""
-__metaclass__ = type
-
import six
from testtools.testcase import ExpectedException
from zope.security.proxy import removeSecurityProxy
diff --git a/lib/lp/code/tests/test_helpers.py b/lib/lp/code/tests/test_helpers.py
index df86fb7..03dd92e 100644
--- a/lib/lp/code/tests/test_helpers.py
+++ b/lib/lp/code/tests/test_helpers.py
@@ -3,8 +3,6 @@
"""Test the code test helpers found in helpers.py."""
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/code/tests/test_project.py b/lib/lp/code/tests/test_project.py
index 61dd965..d765060 100644
--- a/lib/lp/code/tests/test_project.py
+++ b/lib/lp/code/tests/test_project.py
@@ -3,8 +3,6 @@
"""Tests for product views."""
-__metaclass__ = type
-
from lp.testing import TestCaseWithFactory
from lp.testing.layers import DatabaseFunctionalLayer
diff --git a/lib/lp/code/tests/test_publisher.py b/lib/lp/code/tests/test_publisher.py
index fedded0..152aa24 100644
--- a/lib/lp/code/tests/test_publisher.py
+++ b/lib/lp/code/tests/test_publisher.py
@@ -3,8 +3,6 @@
"""Tests for code's custom publications."""
-__metaclass__ = type
-
from lp.code.publisher import CodeLayer
from lp.layers import WebServiceLayer
from lp.services.config import config
diff --git a/lib/lp/code/tests/test_seriessourcepackagebranch.py b/lib/lp/code/tests/test_seriessourcepackagebranch.py
index 45e8dbf..67bd7df 100644
--- a/lib/lp/code/tests/test_seriessourcepackagebranch.py
+++ b/lib/lp/code/tests/test_seriessourcepackagebranch.py
@@ -3,8 +3,6 @@
"""Tests for ISeriesSourcePackageBranch."""
-__metaclass__ = type
-
from datetime import datetime
import pytz
diff --git a/lib/lp/code/tests/test_yuitests.py b/lib/lp/code/tests/test_yuitests.py
index 4e9ad9c..a38301b 100644
--- a/lib/lp/code/tests/test_yuitests.py
+++ b/lib/lp/code/tests/test_yuitests.py
@@ -3,7 +3,6 @@
"""Run YUI.test tests."""
-__metaclass__ = type
__all__ = []
from lp.testing import (
diff --git a/lib/lp/code/vocabularies/branch.py b/lib/lp/code/vocabularies/branch.py
index db4a39e..b165edc 100644
--- a/lib/lp/code/vocabularies/branch.py
+++ b/lib/lp/code/vocabularies/branch.py
@@ -3,8 +3,6 @@
"""Vocabularies that contain branches."""
-__metaclass__ = type
-
__all__ = [
'BranchRestrictedOnProductVocabulary',
'BranchVocabulary',
diff --git a/lib/lp/code/vocabularies/gitref.py b/lib/lp/code/vocabularies/gitref.py
index 865bc3e..de842d1 100644
--- a/lib/lp/code/vocabularies/gitref.py
+++ b/lib/lp/code/vocabularies/gitref.py
@@ -3,7 +3,6 @@
"""Vocabularies that contain Git references."""
-__metaclass__ = type
__all__ = [
"GitBranchVocabulary",
"GitRefVocabulary",
diff --git a/lib/lp/code/vocabularies/gitrepository.py b/lib/lp/code/vocabularies/gitrepository.py
index 0fc86d0..4f6f9df 100644
--- a/lib/lp/code/vocabularies/gitrepository.py
+++ b/lib/lp/code/vocabularies/gitrepository.py
@@ -3,8 +3,6 @@
"""Vocabularies that contain Git repositories."""
-__metaclass__ = type
-
__all__ = [
'GitRepositoryRestrictedOnProductVocabulary',
'GitRepositoryVocabulary',
diff --git a/lib/lp/code/vocabularies/gitrule.py b/lib/lp/code/vocabularies/gitrule.py
index 3758228..4b6284b 100644
--- a/lib/lp/code/vocabularies/gitrule.py
+++ b/lib/lp/code/vocabularies/gitrule.py
@@ -3,7 +3,6 @@
"""Vocabularies related to Git access rules."""
-__metaclass__ = type
__all__ = [
'GitPermissionsVocabulary',
]
diff --git a/lib/lp/code/vocabularies/sourcepackagerecipe.py b/lib/lp/code/vocabularies/sourcepackagerecipe.py
index 31cf4bc..e57a607 100644
--- a/lib/lp/code/vocabularies/sourcepackagerecipe.py
+++ b/lib/lp/code/vocabularies/sourcepackagerecipe.py
@@ -3,7 +3,6 @@
"""Source Package Recipe vocabularies used in the lp/code modules."""
-__metaclass__ = type
__all__ = [
'BuildableDistroSeries',
'target_ppas_vocabulary',
diff --git a/lib/lp/code/vocabularies/tests/test_branch_vocabularies.py b/lib/lp/code/vocabularies/tests/test_branch_vocabularies.py
index 3c0b54e..8e0cef4 100644
--- a/lib/lp/code/vocabularies/tests/test_branch_vocabularies.py
+++ b/lib/lp/code/vocabularies/tests/test_branch_vocabularies.py
@@ -3,9 +3,6 @@
"""Test the branch vocabularies."""
-__metaclass__ = type
-
-
from zope.component import getUtility
from lp.code.interfaces.branchlookup import IBranchLookup
diff --git a/lib/lp/code/vocabularies/tests/test_gitref_vocabularies.py b/lib/lp/code/vocabularies/tests/test_gitref_vocabularies.py
index 971ad7d..13d68c0 100644
--- a/lib/lp/code/vocabularies/tests/test_gitref_vocabularies.py
+++ b/lib/lp/code/vocabularies/tests/test_gitref_vocabularies.py
@@ -3,8 +3,6 @@
"""Test the Git reference vocabularies."""
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/code/vocabularies/tests/test_gitrepository_vocabularies.py b/lib/lp/code/vocabularies/tests/test_gitrepository_vocabularies.py
index 58f13cc..9d76025 100644
--- a/lib/lp/code/vocabularies/tests/test_gitrepository_vocabularies.py
+++ b/lib/lp/code/vocabularies/tests/test_gitrepository_vocabularies.py
@@ -3,8 +3,6 @@
"""Test the Git repository vocabularies."""
-__metaclass__ = type
-
from zope.component import getUtility
from lp.code.vocabularies.gitrepository import (
diff --git a/lib/lp/code/vocabularies/tests/test_gitrule_vocabularies.py b/lib/lp/code/vocabularies/tests/test_gitrule_vocabularies.py
index 8782768..cc02bd0 100644
--- a/lib/lp/code/vocabularies/tests/test_gitrule_vocabularies.py
+++ b/lib/lp/code/vocabularies/tests/test_gitrule_vocabularies.py
@@ -3,8 +3,6 @@
"""Test vocabularies related to Git access rules."""
-__metaclass__ = type
-
from lp.code.enums import GitPermissionType
from lp.code.vocabularies.gitrule import GitPermissionsVocabulary
from lp.testing import TestCaseWithFactory
diff --git a/lib/lp/code/xmlrpc/branch.py b/lib/lp/code/xmlrpc/branch.py
index 0c1861d..235e23e 100644
--- a/lib/lp/code/xmlrpc/branch.py
+++ b/lib/lp/code/xmlrpc/branch.py
@@ -3,7 +3,6 @@
"""Branch XMLRPC API."""
-__metaclass__ = type
__all__ = [
'IPublicCodehostingAPI',
'PublicCodehostingAPI',
diff --git a/lib/lp/code/xmlrpc/codehosting.py b/lib/lp/code/xmlrpc/codehosting.py
index 9e018ee..c32d69f 100644
--- a/lib/lp/code/xmlrpc/codehosting.py
+++ b/lib/lp/code/xmlrpc/codehosting.py
@@ -3,7 +3,6 @@
"""Implementations of the XML-RPC APIs for codehosting."""
-__metaclass__ = type
__all__ = [
'CodehostingAPI',
'datetime_from_tuple',
diff --git a/lib/lp/code/xmlrpc/codeimportscheduler.py b/lib/lp/code/xmlrpc/codeimportscheduler.py
index 6e58bd8..0641af4 100644
--- a/lib/lp/code/xmlrpc/codeimportscheduler.py
+++ b/lib/lp/code/xmlrpc/codeimportscheduler.py
@@ -3,7 +3,6 @@
"""The code import scheduler XML-RPC API."""
-__metaclass__ = type
__all__ = [
'CodeImportSchedulerAPI',
]
diff --git a/lib/lp/code/xmlrpc/git.py b/lib/lp/code/xmlrpc/git.py
index e890605..b73df08 100644
--- a/lib/lp/code/xmlrpc/git.py
+++ b/lib/lp/code/xmlrpc/git.py
@@ -3,7 +3,6 @@
"""Implementations of the XML-RPC APIs for Git."""
-__metaclass__ = type
__all__ = [
'GitAPI',
]
diff --git a/lib/lp/code/xmlrpc/tests/test_branch.py b/lib/lp/code/xmlrpc/tests/test_branch.py
index 2affa3a..898ebd6 100644
--- a/lib/lp/code/xmlrpc/tests/test_branch.py
+++ b/lib/lp/code/xmlrpc/tests/test_branch.py
@@ -3,8 +3,6 @@
"""Unit tests for the public codehosting API."""
-__metaclass__ = type
-
import os
from breezy import urlutils
diff --git a/lib/lp/code/xmlrpc/tests/test_codehosting.py b/lib/lp/code/xmlrpc/tests/test_codehosting.py
index 9277370..e72e46b 100644
--- a/lib/lp/code/xmlrpc/tests/test_codehosting.py
+++ b/lib/lp/code/xmlrpc/tests/test_codehosting.py
@@ -3,8 +3,6 @@
"""Tests for the internal codehosting API."""
-__metaclass__ = type
-
import datetime
import os
diff --git a/lib/lp/code/xmlrpc/tests/test_codeimportscheduler.py b/lib/lp/code/xmlrpc/tests/test_codeimportscheduler.py
index 49f2e44..8a77f5b 100644
--- a/lib/lp/code/xmlrpc/tests/test_codeimportscheduler.py
+++ b/lib/lp/code/xmlrpc/tests/test_codeimportscheduler.py
@@ -3,8 +3,6 @@
"""Test for the methods of `ICodeImportScheduler`."""
-__metaclass__ = type
-
from six.moves import xmlrpc_client
import transaction
from zope.component import getUtility
diff --git a/lib/lp/code/xmlrpc/tests/test_git.py b/lib/lp/code/xmlrpc/tests/test_git.py
index 8a032b5..6726db0 100644
--- a/lib/lp/code/xmlrpc/tests/test_git.py
+++ b/lib/lp/code/xmlrpc/tests/test_git.py
@@ -3,8 +3,6 @@
"""Tests for the internal Git API."""
-__metaclass__ = type
-
from datetime import datetime
import hashlib
import uuid
diff --git a/lib/lp/codehosting/__init__.py b/lib/lp/codehosting/__init__.py
index 0221031..96c4788 100644
--- a/lib/lp/codehosting/__init__.py
+++ b/lib/lp/codehosting/__init__.py
@@ -7,7 +7,6 @@ NOTE: Importing this package will load any system Breezy plugins, as well as
all plugins in the brzplugins/ directory underneath the rocketfuel checkout.
"""
-__metaclass__ = type
__all__ = [
'get_brz_path',
]
diff --git a/lib/lp/codehosting/bzrutils.py b/lib/lp/codehosting/bzrutils.py
index f255792..f9fddaf 100644
--- a/lib/lp/codehosting/bzrutils.py
+++ b/lib/lp/codehosting/bzrutils.py
@@ -7,7 +7,6 @@ Much of the code in here should be submitted upstream. The rest is code that
integrates between Breezy's infrastructure and Launchpad's infrastructure.
"""
-__metaclass__ = type
__all__ = [
'add_exception_logging_hook',
'DenyingServer',
diff --git a/lib/lp/codehosting/inmemory.py b/lib/lp/codehosting/inmemory.py
index 6da751f..f23c4e5 100644
--- a/lib/lp/codehosting/inmemory.py
+++ b/lib/lp/codehosting/inmemory.py
@@ -3,7 +3,6 @@
"""In-memory doubles of core codehosting objects."""
-__metaclass__ = type
__all__ = [
'InMemoryFrontend',
'XMLRPCWrapper',
diff --git a/lib/lp/codehosting/puller/__init__.py b/lib/lp/codehosting/puller/__init__.py
index f301313..0cf3449 100644
--- a/lib/lp/codehosting/puller/__init__.py
+++ b/lib/lp/codehosting/puller/__init__.py
@@ -1,7 +1,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = ['get_lock_id_for_branch_id', 'mirror']
diff --git a/lib/lp/codehosting/puller/scheduler.py b/lib/lp/codehosting/puller/scheduler.py
index 90442cb..1c828a2 100644
--- a/lib/lp/codehosting/puller/scheduler.py
+++ b/lib/lp/codehosting/puller/scheduler.py
@@ -1,7 +1,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'BadMessage',
'JobScheduler',
diff --git a/lib/lp/codehosting/puller/tests/__init__.py b/lib/lp/codehosting/puller/tests/__init__.py
index 2d5b0ae..6a32406 100644
--- a/lib/lp/codehosting/puller/tests/__init__.py
+++ b/lib/lp/codehosting/puller/tests/__init__.py
@@ -3,8 +3,6 @@
"""Common code for the puller tests."""
-__metaclass__ = type
-
import io
import os
import shutil
diff --git a/lib/lp/codehosting/puller/tests/test_acceptance.py b/lib/lp/codehosting/puller/tests/test_acceptance.py
index 1f59b12..621bcc8 100644
--- a/lib/lp/codehosting/puller/tests/test_acceptance.py
+++ b/lib/lp/codehosting/puller/tests/test_acceptance.py
@@ -3,7 +3,6 @@
"""End-to-end tests for the branch puller."""
-__metaclass__ = type
__all__ = []
diff --git a/lib/lp/codehosting/puller/tests/test_errors.py b/lib/lp/codehosting/puller/tests/test_errors.py
index 18ae10e..b6a66e3 100644
--- a/lib/lp/codehosting/puller/tests/test_errors.py
+++ b/lib/lp/codehosting/puller/tests/test_errors.py
@@ -3,8 +3,6 @@
"""Unit tests for the error presentation in worker.py."""
-__metaclass__ = type
-
import os
import socket
import tempfile
diff --git a/lib/lp/codehosting/puller/tests/test_scheduler.py b/lib/lp/codehosting/puller/tests/test_scheduler.py
index f2a3f0a..3205446 100644
--- a/lib/lp/codehosting/puller/tests/test_scheduler.py
+++ b/lib/lp/codehosting/puller/tests/test_scheduler.py
@@ -1,8 +1,6 @@
# Copyright 2009-2020 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
import logging
import os
import textwrap
diff --git a/lib/lp/codehosting/puller/tests/test_worker.py b/lib/lp/codehosting/puller/tests/test_worker.py
index bdef0a4..e412ba5 100644
--- a/lib/lp/codehosting/puller/tests/test_worker.py
+++ b/lib/lp/codehosting/puller/tests/test_worker.py
@@ -3,8 +3,6 @@
"""Unit tests for worker.py."""
-__metaclass__ = type
-
import gc
import io
diff --git a/lib/lp/codehosting/puller/tests/test_worker_formats.py b/lib/lp/codehosting/puller/tests/test_worker_formats.py
index 6996659..bbcf331 100644
--- a/lib/lp/codehosting/puller/tests/test_worker_formats.py
+++ b/lib/lp/codehosting/puller/tests/test_worker_formats.py
@@ -3,8 +3,6 @@
"""Tests for the puller's support for various Bazaar formats."""
-__metaclass__ = type
-
from breezy.branch import Branch
from breezy.bzr.bzrdir import BzrDirMetaFormat1
from breezy.bzr.knitpack_repo import RepositoryFormatKnitPack5
diff --git a/lib/lp/codehosting/puller/worker.py b/lib/lp/codehosting/puller/worker.py
index b789294..4ed9b9b 100644
--- a/lib/lp/codehosting/puller/worker.py
+++ b/lib/lp/codehosting/puller/worker.py
@@ -1,8 +1,6 @@
# Copyright 2009-2020 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
import socket
import sys
diff --git a/lib/lp/codehosting/scanner/buglinks.py b/lib/lp/codehosting/scanner/buglinks.py
index 116fb90..8b93ccd 100644
--- a/lib/lp/codehosting/scanner/buglinks.py
+++ b/lib/lp/codehosting/scanner/buglinks.py
@@ -3,7 +3,6 @@
"""Bugs support for the scanner."""
-__metaclass__ = type
__all__ = [
'BugBranchLinker',
]
diff --git a/lib/lp/codehosting/scanner/bzrsync.py b/lib/lp/codehosting/scanner/bzrsync.py
index 158f222..e4298ad 100755
--- a/lib/lp/codehosting/scanner/bzrsync.py
+++ b/lib/lp/codehosting/scanner/bzrsync.py
@@ -5,8 +5,6 @@
"""Import version control metadata from a Bazaar branch into the database."""
-__metaclass__ = type
-
__all__ = [
"BzrSync",
'schedule_diff_updates',
diff --git a/lib/lp/codehosting/scanner/email.py b/lib/lp/codehosting/scanner/email.py
index 7a184b4..01b1ea6 100644
--- a/lib/lp/codehosting/scanner/email.py
+++ b/lib/lp/codehosting/scanner/email.py
@@ -3,7 +3,6 @@
"""Email code for the branch scanner."""
-__metaclass__ = type
__all__ = [
'send_removed_revision_emails',
'queue_tip_changed_email_jobs',
diff --git a/lib/lp/codehosting/scanner/events.py b/lib/lp/codehosting/scanner/events.py
index 5687c33..0ac4f35 100644
--- a/lib/lp/codehosting/scanner/events.py
+++ b/lib/lp/codehosting/scanner/events.py
@@ -3,7 +3,6 @@
"""Events generated by the scanner."""
-__metaclass__ = type
__all__ = [
'NewMainlineRevisions',
'RevisionsRemoved',
diff --git a/lib/lp/codehosting/scanner/mergedetection.py b/lib/lp/codehosting/scanner/mergedetection.py
index 135b64f..121d2d9 100644
--- a/lib/lp/codehosting/scanner/mergedetection.py
+++ b/lib/lp/codehosting/scanner/mergedetection.py
@@ -3,7 +3,6 @@
"""The way the branch scanner handles merges."""
-__metaclass__ = type
__all__ = [
'auto_merge_branches',
'auto_merge_proposals',
diff --git a/lib/lp/codehosting/scanner/tests/test_buglinks.py b/lib/lp/codehosting/scanner/tests/test_buglinks.py
index bc78cc5..17cdd5f 100644
--- a/lib/lp/codehosting/scanner/tests/test_buglinks.py
+++ b/lib/lp/codehosting/scanner/tests/test_buglinks.py
@@ -3,8 +3,6 @@
"""Tests for creating BugBranch items based on Breezy revisions."""
-__metaclass__ = type
-
from breezy.revision import Revision
from zope.component import getUtility
from zope.event import notify
diff --git a/lib/lp/codehosting/scanner/tests/test_email.py b/lib/lp/codehosting/scanner/tests/test_email.py
index 34af406..01a512e 100644
--- a/lib/lp/codehosting/scanner/tests/test_email.py
+++ b/lib/lp/codehosting/scanner/tests/test_email.py
@@ -3,8 +3,6 @@
"""Tests for the scanner's email generation."""
-__metaclass__ = type
-
import email
import os
diff --git a/lib/lp/codehosting/scanner/tests/test_mergedetection.py b/lib/lp/codehosting/scanner/tests/test_mergedetection.py
index a70678b..66c3521 100644
--- a/lib/lp/codehosting/scanner/tests/test_mergedetection.py
+++ b/lib/lp/codehosting/scanner/tests/test_mergedetection.py
@@ -3,8 +3,6 @@
"""Tests for the scanner's merge detection."""
-__metaclass__ = type
-
import logging
from breezy.revision import NULL_REVISION
diff --git a/lib/lp/codehosting/scripts/modifiedbranches.py b/lib/lp/codehosting/scripts/modifiedbranches.py
index 93acf1a..8f4a0c1 100644
--- a/lib/lp/codehosting/scripts/modifiedbranches.py
+++ b/lib/lp/codehosting/scripts/modifiedbranches.py
@@ -3,7 +3,6 @@
"""Implementation of the Launchpad script to list modified branches."""
-__metaclass__ = type
__all__ = ['ModifiedBranchesScript']
diff --git a/lib/lp/codehosting/scripts/sync_branches.py b/lib/lp/codehosting/scripts/sync_branches.py
index c094760..7e22476 100644
--- a/lib/lp/codehosting/scripts/sync_branches.py
+++ b/lib/lp/codehosting/scripts/sync_branches.py
@@ -3,7 +3,6 @@
"""Sync branches from production to a staging environment."""
-__metaclass__ = type
__all__ = ['SyncBranchesScript']
import os.path
diff --git a/lib/lp/codehosting/scripts/tests/test_modifiedbranches.py b/lib/lp/codehosting/scripts/tests/test_modifiedbranches.py
index a42696f..2d72544 100644
--- a/lib/lp/codehosting/scripts/tests/test_modifiedbranches.py
+++ b/lib/lp/codehosting/scripts/tests/test_modifiedbranches.py
@@ -3,8 +3,6 @@
"""Test the modified branches script."""
-__metaclass__ = type
-
from datetime import datetime
import os
diff --git a/lib/lp/codehosting/scripts/tests/test_sync_branches.py b/lib/lp/codehosting/scripts/tests/test_sync_branches.py
index 899ce67..938b73f 100644
--- a/lib/lp/codehosting/scripts/tests/test_sync_branches.py
+++ b/lib/lp/codehosting/scripts/tests/test_sync_branches.py
@@ -3,8 +3,6 @@
"""Test syncing branches from production to a staging environment."""
-__metaclass__ = type
-
import os.path
import subprocess
from textwrap import dedent
diff --git a/lib/lp/codehosting/scripts/tests/test_upgrade_all_branches.py b/lib/lp/codehosting/scripts/tests/test_upgrade_all_branches.py
index 5f9443f..b8c5578 100644
--- a/lib/lp/codehosting/scripts/tests/test_upgrade_all_branches.py
+++ b/lib/lp/codehosting/scripts/tests/test_upgrade_all_branches.py
@@ -1,9 +1,6 @@
# Copyright 2011-2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
-
import logging
import os
from os.path import dirname
diff --git a/lib/lp/codehosting/sftp.py b/lib/lp/codehosting/sftp.py
index d103ace..4242a14 100644
--- a/lib/lp/codehosting/sftp.py
+++ b/lib/lp/codehosting/sftp.py
@@ -12,7 +12,6 @@ The Bazaar Transport is special in two ways:
We call such a transport a "Twisted Transport".
"""
-__metaclass__ = type
__all__ = [
'avatar_to_sftp_server',
'TransportSFTPServer',
diff --git a/lib/lp/codehosting/sshserver/daemon.py b/lib/lp/codehosting/sshserver/daemon.py
index 83d7114..657e608 100644
--- a/lib/lp/codehosting/sshserver/daemon.py
+++ b/lib/lp/codehosting/sshserver/daemon.py
@@ -3,7 +3,6 @@
"""Glues the codehosting SSH daemon together."""
-__metaclass__ = type
__all__ = [
'ACCESS_LOG_NAME',
'CodehostingAvatar',
diff --git a/lib/lp/codehosting/sshserver/session.py b/lib/lp/codehosting/sshserver/session.py
index b7debe4..88d8836 100644
--- a/lib/lp/codehosting/sshserver/session.py
+++ b/lib/lp/codehosting/sshserver/session.py
@@ -3,7 +3,6 @@
"""SSH session implementations for the codehosting SSH server."""
-__metaclass__ = type
__all__ = [
'launch_smart_server',
]
diff --git a/lib/lp/codehosting/sshserver/tests/test_daemon.py b/lib/lp/codehosting/sshserver/tests/test_daemon.py
index f906c57..0c2aef0 100644
--- a/lib/lp/codehosting/sshserver/tests/test_daemon.py
+++ b/lib/lp/codehosting/sshserver/tests/test_daemon.py
@@ -3,8 +3,6 @@
"""Tests for the codehosting SSH server glue."""
-__metaclass__ = type
-
from lazr.sshserver.auth import (
NoSuchPersonWithName,
SSHUserAuthServer,
diff --git a/lib/lp/codehosting/sshserver/tests/test_session.py b/lib/lp/codehosting/sshserver/tests/test_session.py
index 83dc1c6..3184dd7 100644
--- a/lib/lp/codehosting/sshserver/tests/test_session.py
+++ b/lib/lp/codehosting/sshserver/tests/test_session.py
@@ -3,8 +3,6 @@
"""Tests for SSH session support on the codehosting SSH server."""
-__metaclass__ = type
-
from twisted.conch.interfaces import ISession
from twisted.conch.ssh import connection
from twisted.internet.process import ProcessExitedAlready
diff --git a/lib/lp/codehosting/tests/helpers.py b/lib/lp/codehosting/tests/helpers.py
index b5094df..8c581b1 100644
--- a/lib/lp/codehosting/tests/helpers.py
+++ b/lib/lp/codehosting/tests/helpers.py
@@ -3,7 +3,6 @@
"""Common helpers for codehosting tests."""
-__metaclass__ = type
__all__ = [
'AvatarTestCase',
'create_branch_with_one_revision',
diff --git a/lib/lp/codehosting/tests/servers.py b/lib/lp/codehosting/tests/servers.py
index 68c4a73..fd9ead3 100644
--- a/lib/lp/codehosting/tests/servers.py
+++ b/lib/lp/codehosting/tests/servers.py
@@ -3,8 +3,6 @@
"""Server used in codehosting acceptance tests."""
-__metaclass__ = type
-
__all__ = [
'CodeHostingTac',
'SSHCodeHostingServer',
diff --git a/lib/lp/codehosting/tests/test_acceptance.py b/lib/lp/codehosting/tests/test_acceptance.py
index df60291..1bf9d70 100644
--- a/lib/lp/codehosting/tests/test_acceptance.py
+++ b/lib/lp/codehosting/tests/test_acceptance.py
@@ -3,8 +3,6 @@
"""Acceptance tests for the codehosting server."""
-__metaclass__ = type
-
import os
import re
diff --git a/lib/lp/codehosting/tests/test_breezy.py b/lib/lp/codehosting/tests/test_breezy.py
index 7d87efc..9219f29 100644
--- a/lib/lp/codehosting/tests/test_breezy.py
+++ b/lib/lp/codehosting/tests/test_breezy.py
@@ -3,8 +3,6 @@
"""Launchpad-specific tests of Breezy behaviour."""
-__metaclass__ = type
-
from lp.testing import TestCase
diff --git a/lib/lp/codehosting/tests/test_bzrutils.py b/lib/lp/codehosting/tests/test_bzrutils.py
index 0beeb72..b4cba97 100644
--- a/lib/lp/codehosting/tests/test_bzrutils.py
+++ b/lib/lp/codehosting/tests/test_bzrutils.py
@@ -3,8 +3,6 @@
"""Tests for bzrutils."""
-__metaclass__ = type
-
import gc
import sys
diff --git a/lib/lp/codehosting/tests/test_format_comparison.py b/lib/lp/codehosting/tests/test_format_comparison.py
index de06e64..f713b21 100644
--- a/lib/lp/codehosting/tests/test_format_comparison.py
+++ b/lib/lp/codehosting/tests/test_format_comparison.py
@@ -3,8 +3,6 @@
"""Unit tests for comparing Bazaar formats."""
-__metaclass__ = type
-
import unittest
from lp.codehosting.bzrutils import identical_formats
diff --git a/lib/lp/codehosting/tests/test_lpserve.py b/lib/lp/codehosting/tests/test_lpserve.py
index 6b615d4..7470f31 100644
--- a/lib/lp/codehosting/tests/test_lpserve.py
+++ b/lib/lp/codehosting/tests/test_lpserve.py
@@ -3,8 +3,6 @@
"""Tests for the lp-serve plugin."""
-__metaclass__ = type
-
from breezy import errors
from breezy.bzr.smart import medium
from breezy.plugins.lpserve.test_lpserve import TestCaseWithSubprocess
diff --git a/lib/lp/codehosting/tests/test_rewrite.py b/lib/lp/codehosting/tests/test_rewrite.py
index 7f97deb..047715b 100644
--- a/lib/lp/codehosting/tests/test_rewrite.py
+++ b/lib/lp/codehosting/tests/test_rewrite.py
@@ -3,8 +3,6 @@
"""Tests for the dynamic RewriteMap used to serve branches over HTTP."""
-__metaclass__ = type
-
import os
import re
import signal
diff --git a/lib/lp/codehosting/tests/test_upgrade.py b/lib/lp/codehosting/tests/test_upgrade.py
index 1f2843a..7f23cd5 100644
--- a/lib/lp/codehosting/tests/test_upgrade.py
+++ b/lib/lp/codehosting/tests/test_upgrade.py
@@ -1,9 +1,6 @@
# Copyright 2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
-
import logging
from os.path import dirname
diff --git a/lib/lp/codehosting/upgrade.py b/lib/lp/codehosting/upgrade.py
index 54112b2..d558b87 100755
--- a/lib/lp/codehosting/upgrade.py
+++ b/lib/lp/codehosting/upgrade.py
@@ -10,8 +10,6 @@ Repositories that have no tree references are always upgraded to the standard
actually have tree references are converted to RepositoryFormat2aSubtree.
"""
-__metaclass__ = type
-
__all__ = ['Upgrader']
import os
diff --git a/lib/lp/codehosting/vfs/branchfs.py b/lib/lp/codehosting/vfs/branchfs.py
index b1c9849..02cf0e0 100644
--- a/lib/lp/codehosting/vfs/branchfs.py
+++ b/lib/lp/codehosting/vfs/branchfs.py
@@ -40,7 +40,6 @@ hooks into operations like `mkdir` and ask the `LaunchpadServer` to make a
branch if appropriate.
"""
-__metaclass__ = type
__all__ = [
'AsyncLaunchpadTransport',
'branch_id_to_path',
diff --git a/lib/lp/codehosting/vfs/branchfsclient.py b/lib/lp/codehosting/vfs/branchfsclient.py
index 3307830..e35c003 100644
--- a/lib/lp/codehosting/vfs/branchfsclient.py
+++ b/lib/lp/codehosting/vfs/branchfsclient.py
@@ -6,7 +6,6 @@
This code talks to the internal XML-RPC server for the branch filesystem.
"""
-__metaclass__ = type
__all__ = [
'BranchFileSystemClient',
'NotInCache',
diff --git a/lib/lp/codehosting/vfs/hooks.py b/lib/lp/codehosting/vfs/hooks.py
index f0dc274..e1573c2 100644
--- a/lib/lp/codehosting/vfs/hooks.py
+++ b/lib/lp/codehosting/vfs/hooks.py
@@ -4,7 +4,6 @@
"""Implementations for the `seen_new_branch_hook` of `BranchFileSystemClient`.
"""
-__metaclass__ = type
__all__ = ['SetProcTitleHook']
import setproctitle
diff --git a/lib/lp/codehosting/vfs/tests/test_branchfs.py b/lib/lp/codehosting/vfs/tests/test_branchfs.py
index 72b3677..057c231 100644
--- a/lib/lp/codehosting/vfs/tests/test_branchfs.py
+++ b/lib/lp/codehosting/vfs/tests/test_branchfs.py
@@ -3,8 +3,6 @@
"""Tests for the branch filesystem."""
-__metaclass__ = type
-
import os
import re
import sys
diff --git a/lib/lp/codehosting/vfs/tests/test_branchfsclient.py b/lib/lp/codehosting/vfs/tests/test_branchfsclient.py
index 3417608..e15432f 100644
--- a/lib/lp/codehosting/vfs/tests/test_branchfsclient.py
+++ b/lib/lp/codehosting/vfs/tests/test_branchfsclient.py
@@ -3,8 +3,6 @@
"""Tests for branchfsclient."""
-__metaclass__ = type
-
from testtools.twistedsupport import AsynchronousDeferredRunTest
from twisted.internet import defer
diff --git a/lib/lp/codehosting/vfs/tests/test_filesystem.py b/lib/lp/codehosting/vfs/tests/test_filesystem.py
index 8101f1b..c0554d0 100644
--- a/lib/lp/codehosting/vfs/tests/test_filesystem.py
+++ b/lib/lp/codehosting/vfs/tests/test_filesystem.py
@@ -3,8 +3,6 @@
"""Tests for the virtual filesystem presented by Launchpad codehosting."""
-__metaclass__ = type
-
import stat
from breezy import errors
diff --git a/lib/lp/codehosting/vfs/tests/test_hooks.py b/lib/lp/codehosting/vfs/tests/test_hooks.py
index c6ad986..dbd50a3 100644
--- a/lib/lp/codehosting/vfs/tests/test_hooks.py
+++ b/lib/lp/codehosting/vfs/tests/test_hooks.py
@@ -3,8 +3,6 @@
"""Tests for the hooks in lp.codehosting.vfs.hooks."""
-__metaclass__ = type
-
from lp.codehosting.vfs.hooks import SetProcTitleHook
from lp.testing import TestCase
diff --git a/lib/lp/codehosting/vfs/tests/test_transport.py b/lib/lp/codehosting/vfs/tests/test_transport.py
index 45c155a..1ce47f3 100644
--- a/lib/lp/codehosting/vfs/tests/test_transport.py
+++ b/lib/lp/codehosting/vfs/tests/test_transport.py
@@ -3,8 +3,6 @@
"""Tests for the Launchpad code hosting Bazaar transport."""
-__metaclass__ = type
-
from breezy.tests import per_transport
from breezy.transport import (
chroot,
diff --git a/lib/lp/codehosting/vfs/tests/test_transport_extensions.py b/lib/lp/codehosting/vfs/tests/test_transport_extensions.py
index 56b587f..d0226cf 100644
--- a/lib/lp/codehosting/vfs/tests/test_transport_extensions.py
+++ b/lib/lp/codehosting/vfs/tests/test_transport_extensions.py
@@ -3,8 +3,6 @@
"""Tests for extensions in codehosting.vfs.transport."""
-__metaclass__ = type
-
from breezy.transport.memory import MemoryTransport
from lp.codehosting.vfs.transport import get_readonly_transport
diff --git a/lib/lp/codehosting/vfs/transport.py b/lib/lp/codehosting/vfs/transport.py
index f4248f7..af3313d 100644
--- a/lib/lp/codehosting/vfs/transport.py
+++ b/lib/lp/codehosting/vfs/transport.py
@@ -8,7 +8,6 @@ module contains utilities for implementing virtual filesystems using
breezy.transport classes.
"""
-__metaclass__ = type
__all__ = [
'AsyncVirtualServer',
'AsyncVirtualTransport',
diff --git a/lib/lp/coop/answersbugs/browser.py b/lib/lp/coop/answersbugs/browser.py
index 51a00cd..87e7f2a 100644
--- a/lib/lp/coop/answersbugs/browser.py
+++ b/lib/lp/coop/answersbugs/browser.py
@@ -3,7 +3,6 @@
"""Views for linking bugs and questions."""
-__metaclass__ = type
__all__ = []
from lp import _
diff --git a/lib/lp/coop/answersbugs/subscribers.py b/lib/lp/coop/answersbugs/subscribers.py
index 3bb38bf..70e075f 100644
--- a/lib/lp/coop/answersbugs/subscribers.py
+++ b/lib/lp/coop/answersbugs/subscribers.py
@@ -3,7 +3,6 @@
"""Notifications related to linking bugs and questions."""
-__metaclass__ = type
__all__ = []
from lazr.lifecycle.interfaces import IObjectModifiedEvent
diff --git a/lib/lp/coop/answersbugs/visibility.py b/lib/lp/coop/answersbugs/visibility.py
index 02cbb89..b167ef2 100644
--- a/lib/lp/coop/answersbugs/visibility.py
+++ b/lib/lp/coop/answersbugs/visibility.py
@@ -3,8 +3,6 @@
"""Provides mixins for visibility tests in messages."""
-__metaclass__ = type
-
__all__ = [
'TestHideMessageControlMixin',
'TestMessageVisibilityMixin',
diff --git a/lib/lp/layers.py b/lib/lp/layers.py
index 6706961..8066614 100644
--- a/lib/lp/layers.py
+++ b/lib/lp/layers.py
@@ -6,8 +6,6 @@
Also define utilities that manipulate layers.
"""
-__metaclass__ = type
-
from lazr.restful.interfaces import IWebServiceLayer
from zope.interface import (
alsoProvides,
diff --git a/lib/lp/oci/browser/hasocirecipes.py b/lib/lp/oci/browser/hasocirecipes.py
index 3fc01e6..a32ff79 100644
--- a/lib/lp/oci/browser/hasocirecipes.py
+++ b/lib/lp/oci/browser/hasocirecipes.py
@@ -3,7 +3,6 @@
"""Mixins for browser classes for objects related to OCI recipe."""
-__metaclass__ = type
__all__ = [
'HasOCIRecipesMenuMixin',
]
diff --git a/lib/lp/oci/browser/ocirecipe.py b/lib/lp/oci/browser/ocirecipe.py
index 46a4db1..3b12dff 100644
--- a/lib/lp/oci/browser/ocirecipe.py
+++ b/lib/lp/oci/browser/ocirecipe.py
@@ -3,7 +3,6 @@
"""OCI recipe views."""
-__metaclass__ = type
__all__ = [
'OCIRecipeAddView',
'OCIRecipeAdminView',
diff --git a/lib/lp/oci/browser/ocirecipebuild.py b/lib/lp/oci/browser/ocirecipebuild.py
index 893212a..bdc63ad 100644
--- a/lib/lp/oci/browser/ocirecipebuild.py
+++ b/lib/lp/oci/browser/ocirecipebuild.py
@@ -3,7 +3,6 @@
"""OCI recipe build views."""
-__metaclass__ = type
__all__ = [
'OCIRecipeBuildCancelView',
'OCIRecipeBuildContextMenu',
diff --git a/lib/lp/oci/browser/ocirecipesubscription.py b/lib/lp/oci/browser/ocirecipesubscription.py
index 06086ac..4edf12e 100644
--- a/lib/lp/oci/browser/ocirecipesubscription.py
+++ b/lib/lp/oci/browser/ocirecipesubscription.py
@@ -3,7 +3,6 @@
"""OCI recipe subscription views."""
-__metaclass__ = type
__all__ = [
'OCIRecipePortletSubscribersContent'
]
diff --git a/lib/lp/oci/browser/tests/test_ocirecipe.py b/lib/lp/oci/browser/tests/test_ocirecipe.py
index 4a36517..4cea71a 100644
--- a/lib/lp/oci/browser/tests/test_ocirecipe.py
+++ b/lib/lp/oci/browser/tests/test_ocirecipe.py
@@ -4,8 +4,6 @@
"""Test OCI recipe views."""
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/oci/browser/tests/test_ocirecipebuild.py b/lib/lp/oci/browser/tests/test_ocirecipebuild.py
index 06f1f8e..7fa823e 100644
--- a/lib/lp/oci/browser/tests/test_ocirecipebuild.py
+++ b/lib/lp/oci/browser/tests/test_ocirecipebuild.py
@@ -3,8 +3,6 @@
"""Test OCI recipe build views."""
-__metaclass__ = type
-
import re
from fixtures import FakeLogger
diff --git a/lib/lp/oci/browser/tests/test_ocirecipesubscription.py b/lib/lp/oci/browser/tests/test_ocirecipesubscription.py
index fadb8f7..41b76b9 100644
--- a/lib/lp/oci/browser/tests/test_ocirecipesubscription.py
+++ b/lib/lp/oci/browser/tests/test_ocirecipesubscription.py
@@ -3,9 +3,6 @@
"""Test OCI recipe subscription views."""
-__metaclass__ = type
-
-
from fixtures import FakeLogger
from zope.security.interfaces import Unauthorized
diff --git a/lib/lp/oci/enums.py b/lib/lp/oci/enums.py
index 8ba7b55..c0cb164 100644
--- a/lib/lp/oci/enums.py
+++ b/lib/lp/oci/enums.py
@@ -3,7 +3,6 @@
"""Enums for the OCI app."""
-__metaclass__ = type
__all__ = [
'OCIRecipeBuildRequestStatus',
]
diff --git a/lib/lp/oci/interfaces/ocipushrule.py b/lib/lp/oci/interfaces/ocipushrule.py
index b5dfc77..d235907 100644
--- a/lib/lp/oci/interfaces/ocipushrule.py
+++ b/lib/lp/oci/interfaces/ocipushrule.py
@@ -3,7 +3,6 @@
"""Interfaces for handling credentials for OCI registry actions."""
-__metaclass__ = type
__all__ = [
'IOCIPushRule',
'IOCIPushRuleSet',
diff --git a/lib/lp/oci/interfaces/ocirecipe.py b/lib/lp/oci/interfaces/ocirecipe.py
index 98631f6..325de85 100644
--- a/lib/lp/oci/interfaces/ocirecipe.py
+++ b/lib/lp/oci/interfaces/ocirecipe.py
@@ -3,7 +3,6 @@
"""Interfaces related to recipes for OCI Images."""
-__metaclass__ = type
__all__ = [
'CannotModifyOCIRecipeProcessor',
'DuplicateOCIRecipeName',
diff --git a/lib/lp/oci/interfaces/ocirecipebuild.py b/lib/lp/oci/interfaces/ocirecipebuild.py
index 022f7f8..260e622 100644
--- a/lib/lp/oci/interfaces/ocirecipebuild.py
+++ b/lib/lp/oci/interfaces/ocirecipebuild.py
@@ -3,7 +3,6 @@
"""Interfaces for a build record for OCI recipes."""
-__metaclass__ = type
__all__ = [
'CannotScheduleRegistryUpload',
'IOCIFile',
diff --git a/lib/lp/oci/interfaces/ocirecipebuildjob.py b/lib/lp/oci/interfaces/ocirecipebuildjob.py
index 7d5c885..df411e2 100644
--- a/lib/lp/oci/interfaces/ocirecipebuildjob.py
+++ b/lib/lp/oci/interfaces/ocirecipebuildjob.py
@@ -3,7 +3,6 @@
"""OCIRecipe build job interfaces"""
-__metaclass__ = type
__all__ = [
'IOCIRecipeBuildJob',
'IOCIRegistryUploadJob',
diff --git a/lib/lp/oci/interfaces/ocirecipejob.py b/lib/lp/oci/interfaces/ocirecipejob.py
index bc7fd60..a6e727d 100644
--- a/lib/lp/oci/interfaces/ocirecipejob.py
+++ b/lib/lp/oci/interfaces/ocirecipejob.py
@@ -3,7 +3,6 @@
"""Interfaces related to OCI recipe jobs."""
-__metaclass__ = type
__all__ = [
'IOCIRecipeJob',
'IOCIRecipeRequestBuildsJob',
diff --git a/lib/lp/oci/interfaces/ocirecipesubscription.py b/lib/lp/oci/interfaces/ocirecipesubscription.py
index 511f410..b519c0e 100644
--- a/lib/lp/oci/interfaces/ocirecipesubscription.py
+++ b/lib/lp/oci/interfaces/ocirecipesubscription.py
@@ -3,7 +3,6 @@
"""OCIRecipe subscription model."""
-__metaclass__ = type
__all__ = [
'IOCIRecipeSubscription'
]
diff --git a/lib/lp/oci/interfaces/ociregistryclient.py b/lib/lp/oci/interfaces/ociregistryclient.py
index 2a60285..323137d 100644
--- a/lib/lp/oci/interfaces/ociregistryclient.py
+++ b/lib/lp/oci/interfaces/ociregistryclient.py
@@ -3,7 +3,6 @@
"""Interface for communication with an OCI registry."""
-__metaclass__ = type
__all__ = [
'BlobUploadFailed',
'IOCIRegistryClient',
diff --git a/lib/lp/oci/interfaces/ociregistrycredentials.py b/lib/lp/oci/interfaces/ociregistrycredentials.py
index ec094f7..82f768c 100644
--- a/lib/lp/oci/interfaces/ociregistrycredentials.py
+++ b/lib/lp/oci/interfaces/ociregistrycredentials.py
@@ -3,7 +3,6 @@
"""Interfaces for handling credentials for OCI registry actions."""
-__metaclass__ = type
__all__ = [
'IOCIRegistryCredentials',
'IOCIRegistryCredentialsSet',
diff --git a/lib/lp/oci/model/ocipushrule.py b/lib/lp/oci/model/ocipushrule.py
index e4a8270..872b2e5 100644
--- a/lib/lp/oci/model/ocipushrule.py
+++ b/lib/lp/oci/model/ocipushrule.py
@@ -3,7 +3,6 @@
"""Registry credentials for use by an `OCIPushRule`."""
-__metaclass__ = type
__all__ = [
'OCIDistributionPushRule',
'OCIPushRule',
diff --git a/lib/lp/oci/model/ocirecipe.py b/lib/lp/oci/model/ocirecipe.py
index 392455a..34a7516 100644
--- a/lib/lp/oci/model/ocirecipe.py
+++ b/lib/lp/oci/model/ocirecipe.py
@@ -5,8 +5,6 @@
from lp.soyuz.interfaces.binarypackagebuild import BuildSetStatus
-
-__metaclass__ = type
__all__ = [
'get_ocirecipe_privacy_filter',
'OCIRecipe',
diff --git a/lib/lp/oci/model/ocirecipebuild.py b/lib/lp/oci/model/ocirecipebuild.py
index 9ba77e2..0172697 100644
--- a/lib/lp/oci/model/ocirecipebuild.py
+++ b/lib/lp/oci/model/ocirecipebuild.py
@@ -3,7 +3,6 @@
"""A build record for OCI Recipes."""
-__metaclass__ = type
__all__ = [
'OCIFile',
'OCIRecipeBuild',
diff --git a/lib/lp/oci/model/ocirecipebuildbehaviour.py b/lib/lp/oci/model/ocirecipebuildbehaviour.py
index 6b82f36..f654287 100644
--- a/lib/lp/oci/model/ocirecipebuildbehaviour.py
+++ b/lib/lp/oci/model/ocirecipebuildbehaviour.py
@@ -6,7 +6,6 @@
Dispatches OCI image build jobs to build-farm slaves.
"""
-__metaclass__ = type
__all__ = [
'OCIRecipeBuildBehaviour',
]
diff --git a/lib/lp/oci/model/ocirecipebuildjob.py b/lib/lp/oci/model/ocirecipebuildjob.py
index 09dbc10..51842ef 100644
--- a/lib/lp/oci/model/ocirecipebuildjob.py
+++ b/lib/lp/oci/model/ocirecipebuildjob.py
@@ -3,7 +3,6 @@
"""OCIRecipe build jobs."""
-__metaclass__ = type
__all__ = [
'OCIRecipeBuildJob',
'OCIRecipeBuildJobType',
diff --git a/lib/lp/oci/model/ocirecipejob.py b/lib/lp/oci/model/ocirecipejob.py
index 00fbe2a..1a82a14 100644
--- a/lib/lp/oci/model/ocirecipejob.py
+++ b/lib/lp/oci/model/ocirecipejob.py
@@ -6,8 +6,6 @@
from lp.buildmaster.model.processor import Processor
from lp.oci.interfaces.ocirecipe import IOCIRecipeSet
-
-__metaclass__ = type
__all__ = [
'OCIRecipeJob',
]
diff --git a/lib/lp/oci/model/ocirecipesubscription.py b/lib/lp/oci/model/ocirecipesubscription.py
index 3c9d210..970c66c 100644
--- a/lib/lp/oci/model/ocirecipesubscription.py
+++ b/lib/lp/oci/model/ocirecipesubscription.py
@@ -3,7 +3,6 @@
"""OCIRecipe subscription model."""
-__metaclass__ = type
__all__ = [
'OCIRecipeSubscription'
]
diff --git a/lib/lp/oci/model/ociregistryclient.py b/lib/lp/oci/model/ociregistryclient.py
index 4de58e8..198a4b2 100644
--- a/lib/lp/oci/model/ociregistryclient.py
+++ b/lib/lp/oci/model/ociregistryclient.py
@@ -3,7 +3,6 @@
"""Client for talking to an OCI registry."""
-__metaclass__ = type
__all__ = [
'OCIRegistryClient'
]
diff --git a/lib/lp/oci/model/ociregistrycredentials.py b/lib/lp/oci/model/ociregistrycredentials.py
index 771b1b8..28be770 100644
--- a/lib/lp/oci/model/ociregistrycredentials.py
+++ b/lib/lp/oci/model/ociregistrycredentials.py
@@ -3,7 +3,6 @@
"""Registry credentials for use by an `OCIPushRule`."""
-__metaclass__ = type
__all__ = [
'OCIRegistryCredentials',
'OCIRegistryCredentialsSet',
diff --git a/lib/lp/oci/subscribers/ocirecipebuild.py b/lib/lp/oci/subscribers/ocirecipebuild.py
index d6e0a3b..3394826 100644
--- a/lib/lp/oci/subscribers/ocirecipebuild.py
+++ b/lib/lp/oci/subscribers/ocirecipebuild.py
@@ -3,8 +3,6 @@
"""Event subscribers for OCI recipe builds."""
-__metaclass__ = type
-
from zope.component import getUtility
from lp.buildmaster.enums import BuildStatus
diff --git a/lib/lp/oci/tests/helpers.py b/lib/lp/oci/tests/helpers.py
index 751bd9f..c3b7b4b 100644
--- a/lib/lp/oci/tests/helpers.py
+++ b/lib/lp/oci/tests/helpers.py
@@ -3,7 +3,6 @@
"""Helper methods and mixins for OCI tests."""
-__metaclass__ = type
__all__ = []
import base64
diff --git a/lib/lp/oci/tests/test_ocirecipebuildbehaviour.py b/lib/lp/oci/tests/test_ocirecipebuildbehaviour.py
index d379a12..5109dfe 100644
--- a/lib/lp/oci/tests/test_ocirecipebuildbehaviour.py
+++ b/lib/lp/oci/tests/test_ocirecipebuildbehaviour.py
@@ -3,8 +3,6 @@
"""Tests for `OCIRecipeBuildBehaviour`."""
-__metaclass__ = type
-
import base64
from datetime import datetime
import json
diff --git a/lib/lp/oci/tests/test_ocirecipebuildjob.py b/lib/lp/oci/tests/test_ocirecipebuildjob.py
index 591e5e4..742b3ec 100644
--- a/lib/lp/oci/tests/test_ocirecipebuildjob.py
+++ b/lib/lp/oci/tests/test_ocirecipebuildjob.py
@@ -3,8 +3,6 @@
"""OCIRecipeBuildJob tests"""
-__metaclass__ = type
-
import os
import signal
from unittest import mock
diff --git a/lib/lp/oci/tests/test_ocirecipejob.py b/lib/lp/oci/tests/test_ocirecipejob.py
index a348753..2a37120 100644
--- a/lib/lp/oci/tests/test_ocirecipejob.py
+++ b/lib/lp/oci/tests/test_ocirecipejob.py
@@ -3,8 +3,6 @@
"""Tests for classes in OCIRecipeJob."""
-__metaclass__ = type
-
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
diff --git a/lib/lp/oci/tests/test_ociregistryclient.py b/lib/lp/oci/tests/test_ociregistryclient.py
index 6a10eed..b6e84fc 100644
--- a/lib/lp/oci/tests/test_ociregistryclient.py
+++ b/lib/lp/oci/tests/test_ociregistryclient.py
@@ -3,8 +3,6 @@
"""Tests for the OCI Registry client."""
-__metaclass__ = type
-
import base64
from datetime import timedelta
from functools import partial
diff --git a/lib/lp/oci/vocabularies.py b/lib/lp/oci/vocabularies.py
index 27b9d59..e8e60df 100644
--- a/lib/lp/oci/vocabularies.py
+++ b/lib/lp/oci/vocabularies.py
@@ -3,7 +3,6 @@
"""OCI vocabularies."""
-__metaclass__ = type
__all__ = []
from six.moves.urllib.parse import (
diff --git a/lib/lp/patchwebservice.py b/lib/lp/patchwebservice.py
index 74d5b5e..2008f99 100644
--- a/lib/lp/patchwebservice.py
+++ b/lib/lp/patchwebservice.py
@@ -9,8 +9,6 @@ There is a declaration in ZCML somewhere that looks like:
which tells `lazr.restful` that it should look for webservice exports here.
"""
-__metaclass__ = type
-
# XXX: JonathanLange 2010-11-09 bug=673083: Legacy work-around for circular
# import bugs. Break this up into a per-package thing.
from lp import _schema_circular_imports
diff --git a/lib/lp/registry/adapters.py b/lib/lp/registry/adapters.py
index beba4a7..3d32234 100644
--- a/lib/lp/registry/adapters.py
+++ b/lib/lp/registry/adapters.py
@@ -3,8 +3,6 @@
"""Adapters for registry objects."""
-__metaclass__ = type
-
__all__ = [
'distroseries_to_distribution',
'PollSubset',
diff --git a/lib/lp/registry/browser/__init__.py b/lib/lp/registry/browser/__init__.py
index 19c3b28..cb372fb 100644
--- a/lib/lp/registry/browser/__init__.py
+++ b/lib/lp/registry/browser/__init__.py
@@ -3,8 +3,6 @@
"""Common registry browser helpers and mixins."""
-__metaclass__ = type
-
__all__ = [
'add_subscribe_link',
'BaseRdfView',
diff --git a/lib/lp/registry/browser/announcement.py b/lib/lp/registry/browser/announcement.py
index 9c37748..7592db6 100644
--- a/lib/lp/registry/browser/announcement.py
+++ b/lib/lp/registry/browser/announcement.py
@@ -3,8 +3,6 @@
"""Announcement views."""
-__metaclass__ = type
-
__all__ = [
'AnnouncementAddView',
'AnnouncementRetargetView',
diff --git a/lib/lp/registry/browser/branding.py b/lib/lp/registry/browser/branding.py
index 474423a..58008f5 100644
--- a/lib/lp/registry/browser/branding.py
+++ b/lib/lp/registry/browser/branding.py
@@ -3,8 +3,6 @@
"""Browser views for items that can be displayed as images."""
-__metaclass__ = type
-
__all__ = [
'BrandingChangeView',
]
diff --git a/lib/lp/registry/browser/codeofconduct.py b/lib/lp/registry/browser/codeofconduct.py
index 065bbfc..65fc254 100644
--- a/lib/lp/registry/browser/codeofconduct.py
+++ b/lib/lp/registry/browser/codeofconduct.py
@@ -3,8 +3,6 @@
"""View classes to handle signed Codes of Conduct."""
-__metaclass__ = type
-
__all__ = [
'AffirmCodeOfConductView',
'SignedCodeOfConductSetNavigation',
diff --git a/lib/lp/registry/browser/distribution.py b/lib/lp/registry/browser/distribution.py
index f6e47cf..741fab0 100644
--- a/lib/lp/registry/browser/distribution.py
+++ b/lib/lp/registry/browser/distribution.py
@@ -3,8 +3,6 @@
"""Browser views for distributions."""
-__metaclass__ = type
-
__all__ = [
'DistributionAddView',
'DistributionAdminView',
diff --git a/lib/lp/registry/browser/distributionmirror.py b/lib/lp/registry/browser/distributionmirror.py
index 6ae1eb7..6b77341 100644
--- a/lib/lp/registry/browser/distributionmirror.py
+++ b/lib/lp/registry/browser/distributionmirror.py
@@ -1,8 +1,6 @@
# Copyright 2009-2020 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = [
'DistributionMirrorEditView',
'DistributionMirrorOverviewMenu',
diff --git a/lib/lp/registry/browser/distributionsourcepackage.py b/lib/lp/registry/browser/distributionsourcepackage.py
index f4c58d4..bfbbb38 100644
--- a/lib/lp/registry/browser/distributionsourcepackage.py
+++ b/lib/lp/registry/browser/distributionsourcepackage.py
@@ -1,8 +1,6 @@
# Copyright 2009-2020 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = [
'DistributionSourcePackageAnswersMenu',
'DistributionSourcePackageBreadcrumb',
diff --git a/lib/lp/registry/browser/distroseries.py b/lib/lp/registry/browser/distroseries.py
index 78604a1..afc2290 100644
--- a/lib/lp/registry/browser/distroseries.py
+++ b/lib/lp/registry/browser/distroseries.py
@@ -3,8 +3,6 @@
"""View classes related to `IDistroSeries`."""
-__metaclass__ = type
-
__all__ = [
'DistroSeriesAddView',
'DistroSeriesAdminView',
diff --git a/lib/lp/registry/browser/distroseriesdifference.py b/lib/lp/registry/browser/distroseriesdifference.py
index 60f7b87..717cb88 100644
--- a/lib/lp/registry/browser/distroseriesdifference.py
+++ b/lib/lp/registry/browser/distroseriesdifference.py
@@ -3,7 +3,6 @@
"""Browser views for DistroSeriesDifferences."""
-__metaclass__ = type
__all__ = [
'CommentXHTMLRepresentation',
'DistroSeriesDifferenceView',
diff --git a/lib/lp/registry/browser/distroseriesdifferencecomment.py b/lib/lp/registry/browser/distroseriesdifferencecomment.py
index 7d1ecc7..6d1a8a1 100644
--- a/lib/lp/registry/browser/distroseriesdifferencecomment.py
+++ b/lib/lp/registry/browser/distroseriesdifferencecomment.py
@@ -3,8 +3,6 @@
"""View and helper for `DistroSeriesDifferenceComment`."""
-__metaclass__ = type
-
from zope.component import getUtility
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
diff --git a/lib/lp/registry/browser/driver.py b/lib/lp/registry/browser/driver.py
index afda876..5225d10 100644
--- a/lib/lp/registry/browser/driver.py
+++ b/lib/lp/registry/browser/driver.py
@@ -3,7 +3,6 @@
"""Browser view class for drivers."""
-__metaclass__ = type
__all__ = ["AppointDriverView"]
from zope.interface import providedBy
diff --git a/lib/lp/registry/browser/featuredproject.py b/lib/lp/registry/browser/featuredproject.py
index 6523fb9..c77adcb 100644
--- a/lib/lp/registry/browser/featuredproject.py
+++ b/lib/lp/registry/browser/featuredproject.py
@@ -3,8 +3,6 @@
"""Featured Project views."""
-__metaclass__ = type
-
__all__ = [
'FeaturedProjectsView',
]
diff --git a/lib/lp/registry/browser/karma.py b/lib/lp/registry/browser/karma.py
index 30464b3..c0be894 100644
--- a/lib/lp/registry/browser/karma.py
+++ b/lib/lp/registry/browser/karma.py
@@ -1,8 +1,6 @@
# Copyright 2009-2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = [
'KarmaActionEditView',
'KarmaActionSetNavigation',
diff --git a/lib/lp/registry/browser/mailinglists.py b/lib/lp/registry/browser/mailinglists.py
index 9fa6dd2..ea8c6ed 100644
--- a/lib/lp/registry/browser/mailinglists.py
+++ b/lib/lp/registry/browser/mailinglists.py
@@ -3,7 +3,6 @@
"""Browser views for handling mailing lists."""
-__metaclass__ = type
__all__ = [
'HeldMessageView',
'enabled_with_active_mailing_list',
diff --git a/lib/lp/registry/browser/menu.py b/lib/lp/registry/browser/menu.py
index 6e9d706..ad03092 100644
--- a/lib/lp/registry/browser/menu.py
+++ b/lib/lp/registry/browser/menu.py
@@ -3,7 +3,6 @@
"""Shared menus."""
-__metaclass__ = type
__all__ = [
'IRegistryCollectionNavigationMenu',
'RegistryCollectionActionMenuBase',
diff --git a/lib/lp/registry/browser/milestone.py b/lib/lp/registry/browser/milestone.py
index 263bd8a..1a2a171 100644
--- a/lib/lp/registry/browser/milestone.py
+++ b/lib/lp/registry/browser/milestone.py
@@ -3,8 +3,6 @@
"""Milestone views."""
-__metaclass__ = type
-
__all__ = [
'ISearchMilestoneTagsForm',
'MilestoneAddView',
diff --git a/lib/lp/registry/browser/nameblacklist.py b/lib/lp/registry/browser/nameblacklist.py
index 686676f..a653c12 100644
--- a/lib/lp/registry/browser/nameblacklist.py
+++ b/lib/lp/registry/browser/nameblacklist.py
@@ -1,7 +1,6 @@
# Copyright 2010-2018 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'NameBlacklistAddView',
'NameBlacklistEditView',
diff --git a/lib/lp/registry/browser/objectreassignment.py b/lib/lp/registry/browser/objectreassignment.py
index 5e3d4e6..79c0ddf 100644
--- a/lib/lp/registry/browser/objectreassignment.py
+++ b/lib/lp/registry/browser/objectreassignment.py
@@ -7,7 +7,6 @@ This view needs to be refactored to use the Launchpad form infrastructure.
See bug 151161.
"""
-__metaclass__ = type
__all__ = ["ObjectReassignmentView"]
diff --git a/lib/lp/registry/browser/ociproject.py b/lib/lp/registry/browser/ociproject.py
index 756703e..55f2d61 100644
--- a/lib/lp/registry/browser/ociproject.py
+++ b/lib/lp/registry/browser/ociproject.py
@@ -3,7 +3,6 @@
"""Views, menus, and traversal related to `OCIProject`s."""
-__metaclass__ = type
__all__ = [
'OCIProjectBreadcrumb',
'OCIProjectContextMenu',
diff --git a/lib/lp/registry/browser/peoplemerge.py b/lib/lp/registry/browser/peoplemerge.py
index c5c331f..eb15d67 100644
--- a/lib/lp/registry/browser/peoplemerge.py
+++ b/lib/lp/registry/browser/peoplemerge.py
@@ -3,8 +3,6 @@
"""People Merge related wiew classes."""
-__metaclass__ = type
-
__all__ = [
'AdminPeopleMergeView',
'AdminTeamMergeView',
diff --git a/lib/lp/registry/browser/person.py b/lib/lp/registry/browser/person.py
index 2cb78bc..7cf2fcb 100644
--- a/lib/lp/registry/browser/person.py
+++ b/lib/lp/registry/browser/person.py
@@ -3,7 +3,6 @@
"""Person-related view classes."""
-__metaclass__ = type
__all__ = [
'BeginTeamClaimView',
'CommonMenuLinks',
diff --git a/lib/lp/registry/browser/persondistributionsourcepackage.py b/lib/lp/registry/browser/persondistributionsourcepackage.py
index d4ba936..71e2456 100644
--- a/lib/lp/registry/browser/persondistributionsourcepackage.py
+++ b/lib/lp/registry/browser/persondistributionsourcepackage.py
@@ -3,7 +3,6 @@
"""Views, menus and traversal related to PersonDistributionSourcePackages."""
-__metaclass__ = type
__all__ = [
'PersonDistributionSourcePackageBreadcrumb',
'PersonDistributionSourcePackageFacets',
diff --git a/lib/lp/registry/browser/personociproject.py b/lib/lp/registry/browser/personociproject.py
index 6e4c4af..251f5db 100644
--- a/lib/lp/registry/browser/personociproject.py
+++ b/lib/lp/registry/browser/personociproject.py
@@ -3,7 +3,6 @@
"""Views, menus, and traversal related to `PersonOCIProject`s."""
-__metaclass__ = type
__all__ = [
'PersonOCIProjectNavigation',
]
diff --git a/lib/lp/registry/browser/personproduct.py b/lib/lp/registry/browser/personproduct.py
index 280550c..0af1156 100644
--- a/lib/lp/registry/browser/personproduct.py
+++ b/lib/lp/registry/browser/personproduct.py
@@ -3,7 +3,6 @@
"""Views, menus and traversal related to PersonProducts."""
-__metaclass__ = type
__all__ = [
'PersonProductBreadcrumb',
'PersonProductFacets',
diff --git a/lib/lp/registry/browser/pillar.py b/lib/lp/registry/browser/pillar.py
index 739b56f..4f185df 100644
--- a/lib/lp/registry/browser/pillar.py
+++ b/lib/lp/registry/browser/pillar.py
@@ -3,8 +3,6 @@
"""Common views for objects that implement `IPillar`."""
-__metaclass__ = type
-
__all__ = [
'InvolvedMenu',
'PillarBugsMenu',
diff --git a/lib/lp/registry/browser/poll.py b/lib/lp/registry/browser/poll.py
index 42b3e26..eaba0c7 100644
--- a/lib/lp/registry/browser/poll.py
+++ b/lib/lp/registry/browser/poll.py
@@ -1,8 +1,6 @@
# Copyright 2009-2021 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = [
'BasePollView',
'PollAddView',
diff --git a/lib/lp/registry/browser/product.py b/lib/lp/registry/browser/product.py
index 63724fd..3a853ae 100644
--- a/lib/lp/registry/browser/product.py
+++ b/lib/lp/registry/browser/product.py
@@ -3,8 +3,6 @@
"""Browser views for products."""
-__metaclass__ = type
-
__all__ = [
'ProductAddSeriesView',
'ProductAddView',
diff --git a/lib/lp/registry/browser/productrelease.py b/lib/lp/registry/browser/productrelease.py
index b4a23ba..9bb9242 100644
--- a/lib/lp/registry/browser/productrelease.py
+++ b/lib/lp/registry/browser/productrelease.py
@@ -1,8 +1,6 @@
# Copyright 2009-2018 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = [
'ProductReleaseAddDownloadFileView',
'ProductReleaseAddView',
diff --git a/lib/lp/registry/browser/productseries.py b/lib/lp/registry/browser/productseries.py
index 1bf10e7..8af4afb 100644
--- a/lib/lp/registry/browser/productseries.py
+++ b/lib/lp/registry/browser/productseries.py
@@ -3,8 +3,6 @@
"""View classes for `IProductSeries`."""
-__metaclass__ = type
-
__all__ = [
'get_series_branch_error',
'ProductSeriesBreadcrumb',
diff --git a/lib/lp/registry/browser/project.py b/lib/lp/registry/browser/project.py
index 233207a..3927fc6 100644
--- a/lib/lp/registry/browser/project.py
+++ b/lib/lp/registry/browser/project.py
@@ -3,8 +3,6 @@
"""Project-related View Classes"""
-__metaclass__ = type
-
__all__ = [
'ProjectActionMenu',
'ProjectAddProductView',
diff --git a/lib/lp/registry/browser/sourcepackage.py b/lib/lp/registry/browser/sourcepackage.py
index d3876ad..d5a676c 100644
--- a/lib/lp/registry/browser/sourcepackage.py
+++ b/lib/lp/registry/browser/sourcepackage.py
@@ -3,8 +3,6 @@
"""Browser views for sourcepackages."""
-__metaclass__ = type
-
__all__ = [
'PackageUpstreamTracking',
'SourcePackageAssociationPortletView',
diff --git a/lib/lp/registry/browser/team.py b/lib/lp/registry/browser/team.py
index 980ee1e..eeefcee 100644
--- a/lib/lp/registry/browser/team.py
+++ b/lib/lp/registry/browser/team.py
@@ -1,7 +1,6 @@
# Copyright 2009-2021 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'HasRenewalPolicyMixin',
'ProposedTeamMembersEditView',
diff --git a/lib/lp/registry/browser/teammembership.py b/lib/lp/registry/browser/teammembership.py
index c1b8294..ef62f97 100644
--- a/lib/lp/registry/browser/teammembership.py
+++ b/lib/lp/registry/browser/teammembership.py
@@ -1,8 +1,6 @@
# Copyright 2009-2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = [
'TeamMembershipBreadcrumb',
'TeamInvitationsView',
diff --git a/lib/lp/registry/browser/tests/test_announcements.py b/lib/lp/registry/browser/tests/test_announcements.py
index 6667f25..b79d42e 100644
--- a/lib/lp/registry/browser/tests/test_announcements.py
+++ b/lib/lp/registry/browser/tests/test_announcements.py
@@ -3,8 +3,6 @@
"""Tests for +announcement views."""
-__metaclass__ = type
-
from datetime import datetime
from lxml import html
diff --git a/lib/lp/registry/browser/tests/test_branding.py b/lib/lp/registry/browser/tests/test_branding.py
index dfa4048..1b2d321 100644
--- a/lib/lp/registry/browser/tests/test_branding.py
+++ b/lib/lp/registry/browser/tests/test_branding.py
@@ -3,8 +3,6 @@
"""Tests for Branding."""
-__metaclass__ = type
-
from lp.registry.browser.branding import BrandingChangeView
from lp.services.webapp.servers import LaunchpadTestRequest
from lp.testing import TestCaseWithFactory
diff --git a/lib/lp/registry/browser/tests/test_breadcrumbs.py b/lib/lp/registry/browser/tests/test_breadcrumbs.py
index a0ca5bf..459a259 100644
--- a/lib/lp/registry/browser/tests/test_breadcrumbs.py
+++ b/lib/lp/registry/browser/tests/test_breadcrumbs.py
@@ -1,8 +1,6 @@
# Copyright 2009-2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from zope.component import getUtility
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
diff --git a/lib/lp/registry/browser/tests/test_codeofconduct.py b/lib/lp/registry/browser/tests/test_codeofconduct.py
index 88c1d5f..f52b93b 100644
--- a/lib/lp/registry/browser/tests/test_codeofconduct.py
+++ b/lib/lp/registry/browser/tests/test_codeofconduct.py
@@ -3,8 +3,6 @@
"""Tests for Code of Conduct views."""
-__metaclass__ = type
-
from testtools.matchers import MatchesRegex
from zope.component import getUtility
diff --git a/lib/lp/registry/browser/tests/test_distribution.py b/lib/lp/registry/browser/tests/test_distribution.py
index 5e3f7bf..58c3fed 100644
--- a/lib/lp/registry/browser/tests/test_distribution.py
+++ b/lib/lp/registry/browser/tests/test_distribution.py
@@ -4,8 +4,6 @@
"""Tests for Distribution page."""
-__metaclass__ = type
-
from fixtures import FakeLogger
from lazr.restful.fields import Reference
from lazr.restful.interfaces import (
diff --git a/lib/lp/registry/browser/tests/test_distribution_views.py b/lib/lp/registry/browser/tests/test_distribution_views.py
index 404f410..ad7956d 100644
--- a/lib/lp/registry/browser/tests/test_distribution_views.py
+++ b/lib/lp/registry/browser/tests/test_distribution_views.py
@@ -1,8 +1,6 @@
# Copyright 2009-2015 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
import soupmatchers
from testtools.matchers import MatchesStructure
import transaction
diff --git a/lib/lp/registry/browser/tests/test_distributionsourcepackage.py b/lib/lp/registry/browser/tests/test_distributionsourcepackage.py
index c2e145c..0ae0087 100644
--- a/lib/lp/registry/browser/tests/test_distributionsourcepackage.py
+++ b/lib/lp/registry/browser/tests/test_distributionsourcepackage.py
@@ -3,8 +3,6 @@
"""Test distributionsourcepackage views."""
-__metaclass__ = type
-
import re
import soupmatchers
diff --git a/lib/lp/registry/browser/tests/test_distroseries.py b/lib/lp/registry/browser/tests/test_distroseries.py
index 46ab789..e1d1d66 100644
--- a/lib/lp/registry/browser/tests/test_distroseries.py
+++ b/lib/lp/registry/browser/tests/test_distroseries.py
@@ -3,8 +3,6 @@
"""Tests for `lp.registry.browser.distroseries`."""
-__metaclass__ = type
-
from datetime import timedelta
import difflib
import re
diff --git a/lib/lp/registry/browser/tests/test_distroseries_webservice.py b/lib/lp/registry/browser/tests/test_distroseries_webservice.py
index a7969a9..6792eef 100644
--- a/lib/lp/registry/browser/tests/test_distroseries_webservice.py
+++ b/lib/lp/registry/browser/tests/test_distroseries_webservice.py
@@ -1,8 +1,6 @@
# Copyright 2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from datetime import timedelta
from zope.security.proxy import removeSecurityProxy
diff --git a/lib/lp/registry/browser/tests/test_distroseriesdifference_views.py b/lib/lp/registry/browser/tests/test_distroseriesdifference_views.py
index 4de09b6..766caac 100644
--- a/lib/lp/registry/browser/tests/test_distroseriesdifference_views.py
+++ b/lib/lp/registry/browser/tests/test_distroseriesdifference_views.py
@@ -3,8 +3,6 @@
"""Unit tests for the DistroSeriesDifference views."""
-__metaclass__ = type
-
import re
import soupmatchers
diff --git a/lib/lp/registry/browser/tests/test_distroseriesdifference_webservice.py b/lib/lp/registry/browser/tests/test_distroseriesdifference_webservice.py
index f09fe1d..5e6a285 100644
--- a/lib/lp/registry/browser/tests/test_distroseriesdifference_webservice.py
+++ b/lib/lp/registry/browser/tests/test_distroseriesdifference_webservice.py
@@ -1,8 +1,6 @@
# Copyright 2010 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from lazr.restfulclient.errors import BadRequest
import transaction
from zope.component import getUtility
diff --git a/lib/lp/registry/browser/tests/test_distroseriesdifferencecomment.py b/lib/lp/registry/browser/tests/test_distroseriesdifferencecomment.py
index b116393..c17e21b 100644
--- a/lib/lp/registry/browser/tests/test_distroseriesdifferencecomment.py
+++ b/lib/lp/registry/browser/tests/test_distroseriesdifferencecomment.py
@@ -3,8 +3,6 @@
"""Tests for `lp.registry.browser.distroseriesdifferencecomment`."""
-__metaclass__ = type
-
from lxml import html
from zope.component import getUtility
diff --git a/lib/lp/registry/browser/tests/test_edit_permissions.py b/lib/lp/registry/browser/tests/test_edit_permissions.py
index 6719910..022daa5 100644
--- a/lib/lp/registry/browser/tests/test_edit_permissions.py
+++ b/lib/lp/registry/browser/tests/test_edit_permissions.py
@@ -3,8 +3,6 @@
"""Test harness for edit view permissions unit tests."""
-__metaclass__ = type
-
from zope.component import getUtility
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
diff --git a/lib/lp/registry/browser/tests/test_gpgkey.py b/lib/lp/registry/browser/tests/test_gpgkey.py
index 672ae67..84d24ec 100644
--- a/lib/lp/registry/browser/tests/test_gpgkey.py
+++ b/lib/lp/registry/browser/tests/test_gpgkey.py
@@ -3,8 +3,6 @@
"""Tests for GPG key on the web."""
-__metaclass__ = type
-
from lp.services.webapp import canonical_url
from lp.testing import (
login_person,
diff --git a/lib/lp/registry/browser/tests/test_mailinglists.py b/lib/lp/registry/browser/tests/test_mailinglists.py
index 7e13ad6..f9f28e9 100644
--- a/lib/lp/registry/browser/tests/test_mailinglists.py
+++ b/lib/lp/registry/browser/tests/test_mailinglists.py
@@ -4,8 +4,6 @@
"""Test harness for mailinglist views unit tests."""
-__metaclass__ = type
-
import transaction
from zope.component import getUtility
diff --git a/lib/lp/registry/browser/tests/test_milestone.py b/lib/lp/registry/browser/tests/test_milestone.py
index 91a253a..e56ac8b 100644
--- a/lib/lp/registry/browser/tests/test_milestone.py
+++ b/lib/lp/registry/browser/tests/test_milestone.py
@@ -3,8 +3,6 @@
"""Test milestone views."""
-__metaclass__ = type
-
import soupmatchers
from storm.store import Store
from testtools.matchers import LessThan
diff --git a/lib/lp/registry/browser/tests/test_milestonetag.py b/lib/lp/registry/browser/tests/test_milestonetag.py
index fd7c99d..14333ba 100644
--- a/lib/lp/registry/browser/tests/test_milestonetag.py
+++ b/lib/lp/registry/browser/tests/test_milestonetag.py
@@ -3,8 +3,6 @@
"""Test projectmilestone tag views."""
-__metaclass__ = type
-
from lp.services.webapp import canonical_url
from lp.testing import TestCaseWithFactory
from lp.testing.layers import DatabaseFunctionalLayer
diff --git a/lib/lp/registry/browser/tests/test_ociproject.py b/lib/lp/registry/browser/tests/test_ociproject.py
index 23a6ec6..f9230aa 100644
--- a/lib/lp/registry/browser/tests/test_ociproject.py
+++ b/lib/lp/registry/browser/tests/test_ociproject.py
@@ -4,7 +4,6 @@
"""Test OCI project views."""
-__metaclass__ = type
__all__ = []
from datetime import datetime
diff --git a/lib/lp/registry/browser/tests/test_packaging.py b/lib/lp/registry/browser/tests/test_packaging.py
index 20f68dd..35ffc0c 100644
--- a/lib/lp/registry/browser/tests/test_packaging.py
+++ b/lib/lp/registry/browser/tests/test_packaging.py
@@ -3,8 +3,6 @@
"""Browser tests for Packaging actions."""
-__metaclass__ = type
-
from testscenarios import (
load_tests_apply_scenarios,
WithScenarios,
diff --git a/lib/lp/registry/browser/tests/test_peoplemerge.py b/lib/lp/registry/browser/tests/test_peoplemerge.py
index 3eec0d6..aa359fd 100644
--- a/lib/lp/registry/browser/tests/test_peoplemerge.py
+++ b/lib/lp/registry/browser/tests/test_peoplemerge.py
@@ -2,8 +2,6 @@
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Test the peoplemerge browser module."""
-__metaclass__ = type
-
import six
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
diff --git a/lib/lp/registry/browser/tests/test_person.py b/lib/lp/registry/browser/tests/test_person.py
index b21e38e..33d8f9b 100644
--- a/lib/lp/registry/browser/tests/test_person.py
+++ b/lib/lp/registry/browser/tests/test_person.py
@@ -2,8 +2,6 @@
# Copyright 2009-2021 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
import doctest
import email
from operator import attrgetter
diff --git a/lib/lp/registry/browser/tests/test_person_contact.py b/lib/lp/registry/browser/tests/test_person_contact.py
index 85ccfdd..3696a64 100644
--- a/lib/lp/registry/browser/tests/test_person_contact.py
+++ b/lib/lp/registry/browser/tests/test_person_contact.py
@@ -2,8 +2,6 @@
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Test views and helpers related to the contact person feature."""
-__metaclass__ = type
-
from testtools.matchers import LessThan
from lp.app.browser.tales import DateTimeFormatterAPI
diff --git a/lib/lp/registry/browser/tests/test_person_webservice.py b/lib/lp/registry/browser/tests/test_person_webservice.py
index 4e7e503..2f5bc88 100644
--- a/lib/lp/registry/browser/tests/test_person_webservice.py
+++ b/lib/lp/registry/browser/tests/test_person_webservice.py
@@ -1,8 +1,6 @@
# Copyright 2009-2019 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from operator import attrgetter
import textwrap
diff --git a/lib/lp/registry/browser/tests/test_pillar_sharing.py b/lib/lp/registry/browser/tests/test_pillar_sharing.py
index 082276d..dbfd6b2 100644
--- a/lib/lp/registry/browser/tests/test_pillar_sharing.py
+++ b/lib/lp/registry/browser/tests/test_pillar_sharing.py
@@ -3,8 +3,6 @@
"""Test views that manage sharing."""
-__metaclass__ = type
-
from fixtures import FakeLogger
from lazr.restful.interfaces import IJSONRequestCache
from lazr.restful.utils import get_current_web_service_request
diff --git a/lib/lp/registry/browser/tests/test_poll.py b/lib/lp/registry/browser/tests/test_poll.py
index d4bf0d1..05f0183 100644
--- a/lib/lp/registry/browser/tests/test_poll.py
+++ b/lib/lp/registry/browser/tests/test_poll.py
@@ -3,8 +3,6 @@
"""Tests for IPoll views."""
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/registry/browser/tests/test_product.py b/lib/lp/registry/browser/tests/test_product.py
index 235fffd..3e71422 100644
--- a/lib/lp/registry/browser/tests/test_product.py
+++ b/lib/lp/registry/browser/tests/test_product.py
@@ -3,8 +3,6 @@
"""Tests for product views."""
-__metaclass__ = type
-
__all__ = ['make_product_form']
import re
diff --git a/lib/lp/registry/browser/tests/test_productrelease.py b/lib/lp/registry/browser/tests/test_productrelease.py
index 3bbd207..0fa7f14 100644
--- a/lib/lp/registry/browser/tests/test_productrelease.py
+++ b/lib/lp/registry/browser/tests/test_productrelease.py
@@ -3,9 +3,6 @@
"""View tests for ProductRelease pages."""
-__metaclass__ = type
-
-
from lp.app.enums import InformationType
from lp.services.webapp.escaping import html_escape
from lp.testing import (
diff --git a/lib/lp/registry/browser/tests/test_productseries_views.py b/lib/lp/registry/browser/tests/test_productseries_views.py
index 8bb793a..35c063f 100644
--- a/lib/lp/registry/browser/tests/test_productseries_views.py
+++ b/lib/lp/registry/browser/tests/test_productseries_views.py
@@ -3,9 +3,6 @@
"""View tests for ProductSeries pages."""
-__metaclass__ = type
-
-
import soupmatchers
from testtools.matchers import Not
from zope.security.proxy import removeSecurityProxy
diff --git a/lib/lp/registry/browser/tests/test_projectgroup.py b/lib/lp/registry/browser/tests/test_projectgroup.py
index 52d216f..75c9d9f 100644
--- a/lib/lp/registry/browser/tests/test_projectgroup.py
+++ b/lib/lp/registry/browser/tests/test_projectgroup.py
@@ -3,8 +3,6 @@
"""Tests for project group views."""
-__metaclass__ = type
-
from fixtures import FakeLogger
from lazr.restful.interfaces import IJSONRequestCache
from testtools.matchers import Not
diff --git a/lib/lp/registry/browser/tests/test_rdf.py b/lib/lp/registry/browser/tests/test_rdf.py
index 390989c..25a7334 100644
--- a/lib/lp/registry/browser/tests/test_rdf.py
+++ b/lib/lp/registry/browser/tests/test_rdf.py
@@ -3,8 +3,6 @@
"""Tests for RDF main views."""
-__metaclass__ = type
-
from zope.component import getUtility
from lp.services.webapp.interfaces import (
diff --git a/lib/lp/registry/browser/tests/test_reassign_team_view.py b/lib/lp/registry/browser/tests/test_reassign_team_view.py
index 3acd9cc..c5cba77 100644
--- a/lib/lp/registry/browser/tests/test_reassign_team_view.py
+++ b/lib/lp/registry/browser/tests/test_reassign_team_view.py
@@ -3,8 +3,6 @@
"""Tests for TeamReassignmentView view code."""
-__metaclass__ = type
-
from fixtures import FakeLogger
from zope.component import getUtility
from zope.security.interfaces import Unauthorized
diff --git a/lib/lp/registry/browser/tests/test_sourcepackage_views.py b/lib/lp/registry/browser/tests/test_sourcepackage_views.py
index 53403f5..eb5ccd3 100644
--- a/lib/lp/registry/browser/tests/test_sourcepackage_views.py
+++ b/lib/lp/registry/browser/tests/test_sourcepackage_views.py
@@ -3,8 +3,6 @@
"""Tests for SourcePackage view code."""
-__metaclass__ = type
-
from six.moves.urllib.parse import (
parse_qsl,
splitquery,
diff --git a/lib/lp/registry/browser/tests/test_sshkey.py b/lib/lp/registry/browser/tests/test_sshkey.py
index e93958b..88625bb 100644
--- a/lib/lp/registry/browser/tests/test_sshkey.py
+++ b/lib/lp/registry/browser/tests/test_sshkey.py
@@ -3,8 +3,6 @@
"""Tests for GPG key on the web."""
-__metaclass__ = type
-
from zope.component import getUtility
from lp.registry.interfaces.ssh import ISSHKeySet
diff --git a/lib/lp/registry/browser/tests/test_subscription_links.py b/lib/lp/registry/browser/tests/test_subscription_links.py
index b35037f..0c820b8 100644
--- a/lib/lp/registry/browser/tests/test_subscription_links.py
+++ b/lib/lp/registry/browser/tests/test_subscription_links.py
@@ -3,8 +3,6 @@
"""Tests for subscription links."""
-__metaclass__ = type
-
import unittest
from fixtures import FakeLogger
diff --git a/lib/lp/registry/browser/tests/test_team.py b/lib/lp/registry/browser/tests/test_team.py
index 07cb918..5a3f781 100644
--- a/lib/lp/registry/browser/tests/test_team.py
+++ b/lib/lp/registry/browser/tests/test_team.py
@@ -1,8 +1,6 @@
# Copyright 2010-2021 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
import contextlib
from lazr.restful.interfaces import IJSONRequestCache
diff --git a/lib/lp/registry/browser/tests/test_team_activate_ppa.py b/lib/lp/registry/browser/tests/test_team_activate_ppa.py
index 2787016..1b4004b 100644
--- a/lib/lp/registry/browser/tests/test_team_activate_ppa.py
+++ b/lib/lp/registry/browser/tests/test_team_activate_ppa.py
@@ -1,8 +1,6 @@
# Copyright 2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from lp.registry.enums import (
EXCLUSIVE_TEAM_POLICY,
INCLUSIVE_TEAM_POLICY,
diff --git a/lib/lp/registry/browser/tests/test_teammembership.py b/lib/lp/registry/browser/tests/test_teammembership.py
index 1682bb8..21c953f 100644
--- a/lib/lp/registry/browser/tests/test_teammembership.py
+++ b/lib/lp/registry/browser/tests/test_teammembership.py
@@ -1,8 +1,6 @@
# Copyright 2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from testtools.matchers import LessThan
from zope.component import getUtility
diff --git a/lib/lp/registry/browser/widgets/ocicredentialswidget.py b/lib/lp/registry/browser/widgets/ocicredentialswidget.py
index 42630ef..b47f436 100644
--- a/lib/lp/registry/browser/widgets/ocicredentialswidget.py
+++ b/lib/lp/registry/browser/widgets/ocicredentialswidget.py
@@ -3,7 +3,6 @@
"""Browser widget for handling a single `IOCICredentials`."""
-__metaclass__ = type
__all__ = [
'OCICredentialsWidget',
]
diff --git a/lib/lp/registry/browser/widgets/tests/test_ocicredentialswidget.py b/lib/lp/registry/browser/widgets/tests/test_ocicredentialswidget.py
index a6c6dd2..5494439 100644
--- a/lib/lp/registry/browser/widgets/tests/test_ocicredentialswidget.py
+++ b/lib/lp/registry/browser/widgets/tests/test_ocicredentialswidget.py
@@ -3,8 +3,6 @@
"""Tests for OCICredentialsWidget"""
-__metaclass__ = type
-
from lazr.restful.fields import Reference
from zope.formlib.interfaces import (
IBrowserWidget,
diff --git a/lib/lp/registry/enums.py b/lib/lp/registry/enums.py
index 1e99d85..699149d 100644
--- a/lib/lp/registry/enums.py
+++ b/lib/lp/registry/enums.py
@@ -3,7 +3,6 @@
"""Enums for the Registry app."""
-__metaclass__ = type
__all__ = [
'BranchSharingPolicy',
'BugSharingPolicy',
diff --git a/lib/lp/registry/errors.py b/lib/lp/registry/errors.py
index 9b6c81e..57d6aaa 100644
--- a/lib/lp/registry/errors.py
+++ b/lib/lp/registry/errors.py
@@ -1,7 +1,6 @@
# Copyright 2010-2016 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'DistroSeriesDifferenceError',
'NotADerivedSeriesError',
diff --git a/lib/lp/registry/feed/announcement.py b/lib/lp/registry/feed/announcement.py
index ccf4646..92a4ee0 100644
--- a/lib/lp/registry/feed/announcement.py
+++ b/lib/lp/registry/feed/announcement.py
@@ -9,8 +9,6 @@
# clearly demonstrate the concepts required to implement a feed rather than
# simply referencing the interfaces.
-__metaclass__ = type
-
__all__ = [
'LaunchpadAnnouncementsFeed',
'TargetAnnouncementsFeed',
diff --git a/lib/lp/registry/interfaces/accesspolicy.py b/lib/lp/registry/interfaces/accesspolicy.py
index 8705584..477a623 100644
--- a/lib/lp/registry/interfaces/accesspolicy.py
+++ b/lib/lp/registry/interfaces/accesspolicy.py
@@ -3,8 +3,6 @@
"""Interfaces for pillar and artifact access policies."""
-__metaclass__ = type
-
__all__ = [
'IAccessArtifact',
'IAccessArtifactGrant',
diff --git a/lib/lp/registry/interfaces/announcement.py b/lib/lp/registry/interfaces/announcement.py
index 98e93ec..ff36571 100644
--- a/lib/lp/registry/interfaces/announcement.py
+++ b/lib/lp/registry/interfaces/announcement.py
@@ -3,8 +3,6 @@
"""News item interfaces."""
-__metaclass__ = type
-
__all__ = [
'IAnnouncement',
'IHasAnnouncements',
diff --git a/lib/lp/registry/interfaces/codeofconduct.py b/lib/lp/registry/interfaces/codeofconduct.py
index 36fbd57..6c7f671 100644
--- a/lib/lp/registry/interfaces/codeofconduct.py
+++ b/lib/lp/registry/interfaces/codeofconduct.py
@@ -6,8 +6,6 @@
https://launchpad.canonical.com/CodeOfConduct
"""
-__metaclass__ = type
-
__all__ = [
'ICodeOfConduct',
'ISignedCodeOfConduct',
diff --git a/lib/lp/registry/interfaces/commercialsubscription.py b/lib/lp/registry/interfaces/commercialsubscription.py
index e2f619b..81b064a 100644
--- a/lib/lp/registry/interfaces/commercialsubscription.py
+++ b/lib/lp/registry/interfaces/commercialsubscription.py
@@ -3,8 +3,6 @@
"""Interfaces including and related to ICommercialSubscription."""
-__metaclass__ = type
-
__all__ = [
'ICommercialSubscription',
]
diff --git a/lib/lp/registry/interfaces/distribution.py b/lib/lp/registry/interfaces/distribution.py
index 8f43f58..3c863b7 100644
--- a/lib/lp/registry/interfaces/distribution.py
+++ b/lib/lp/registry/interfaces/distribution.py
@@ -3,8 +3,6 @@
"""Interfaces including and related to IDistribution."""
-__metaclass__ = type
-
__all__ = [
'IDistribution',
'IDistributionDriverRestricted',
diff --git a/lib/lp/registry/interfaces/distributionmirror.py b/lib/lp/registry/interfaces/distributionmirror.py
index 4457085..b64a18c 100644
--- a/lib/lp/registry/interfaces/distributionmirror.py
+++ b/lib/lp/registry/interfaces/distributionmirror.py
@@ -1,8 +1,6 @@
# Copyright 2009-2020 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = [
'IDistributionMirror',
'IMirrorDistroArchSeries',
diff --git a/lib/lp/registry/interfaces/distributionsourcepackage.py b/lib/lp/registry/interfaces/distributionsourcepackage.py
index 60f75b1..0301988 100644
--- a/lib/lp/registry/interfaces/distributionsourcepackage.py
+++ b/lib/lp/registry/interfaces/distributionsourcepackage.py
@@ -3,8 +3,6 @@
"""Source package in Distribution interfaces."""
-__metaclass__ = type
-
__all__ = [
'IDistributionSourcePackage',
]
diff --git a/lib/lp/registry/interfaces/distroseries.py b/lib/lp/registry/interfaces/distroseries.py
index 8586033..2b56254 100644
--- a/lib/lp/registry/interfaces/distroseries.py
+++ b/lib/lp/registry/interfaces/distroseries.py
@@ -3,8 +3,6 @@
"""Interfaces including and related to IDistroSeries."""
-__metaclass__ = type
-
__all__ = [
'DerivationError',
'DistroSeriesNameField',
diff --git a/lib/lp/registry/interfaces/distroseriesdifference.py b/lib/lp/registry/interfaces/distroseriesdifference.py
index 9b85ae5..c7a8b7f 100644
--- a/lib/lp/registry/interfaces/distroseriesdifference.py
+++ b/lib/lp/registry/interfaces/distroseriesdifference.py
@@ -3,9 +3,6 @@
"""Interface classes for a difference between two distribution series."""
-__metaclass__ = type
-
-
__all__ = [
'IDistroSeriesDifference',
'IDistroSeriesDifferenceAdmin',
diff --git a/lib/lp/registry/interfaces/distroseriesdifferencecomment.py b/lib/lp/registry/interfaces/distroseriesdifferencecomment.py
index 2502a04..efbf008 100644
--- a/lib/lp/registry/interfaces/distroseriesdifferencecomment.py
+++ b/lib/lp/registry/interfaces/distroseriesdifferencecomment.py
@@ -3,7 +3,6 @@
"""Distribution series difference messages."""
-__metaclass__ = type
__all__ = [
'IDistroSeriesDifferenceComment',
'IDistroSeriesDifferenceCommentSource',
diff --git a/lib/lp/registry/interfaces/distroseriesparent.py b/lib/lp/registry/interfaces/distroseriesparent.py
index 4773d9b..7a8500c 100644
--- a/lib/lp/registry/interfaces/distroseriesparent.py
+++ b/lib/lp/registry/interfaces/distroseriesparent.py
@@ -3,8 +3,6 @@
"""DistroSeriesParent interface."""
-__metaclass__ = type
-
__all__ = [
'IDistroSeriesParent',
'IDistroSeriesParentSet',
diff --git a/lib/lp/registry/interfaces/featuredproject.py b/lib/lp/registry/interfaces/featuredproject.py
index b902e07..689ebd4 100644
--- a/lib/lp/registry/interfaces/featuredproject.py
+++ b/lib/lp/registry/interfaces/featuredproject.py
@@ -3,8 +3,6 @@
"""Featured project interfaces."""
-__metaclass__ = type
-
__all__ = [
'IFeaturedProject',
]
diff --git a/lib/lp/registry/interfaces/gpg.py b/lib/lp/registry/interfaces/gpg.py
index 0489cff..bcc869e 100644
--- a/lib/lp/registry/interfaces/gpg.py
+++ b/lib/lp/registry/interfaces/gpg.py
@@ -3,8 +3,6 @@
"""OpenPGP key interfaces."""
-__metaclass__ = type
-
__all__ = [
'IGPGKey',
'IGPGKeySet',
diff --git a/lib/lp/registry/interfaces/irc.py b/lib/lp/registry/interfaces/irc.py
index 63c4514..11af933 100644
--- a/lib/lp/registry/interfaces/irc.py
+++ b/lib/lp/registry/interfaces/irc.py
@@ -3,8 +3,6 @@
"""IRC interfaces."""
-__metaclass__ = type
-
__all__ = [
'IIrcID',
'IIrcIDSet',
diff --git a/lib/lp/registry/interfaces/jabber.py b/lib/lp/registry/interfaces/jabber.py
index df1d8fb..7c66dbb 100644
--- a/lib/lp/registry/interfaces/jabber.py
+++ b/lib/lp/registry/interfaces/jabber.py
@@ -3,8 +3,6 @@
"""Jabber interfaces."""
-__metaclass__ = type
-
__all__ = [
'IJabberID',
'IJabberIDSet',
diff --git a/lib/lp/registry/interfaces/karma.py b/lib/lp/registry/interfaces/karma.py
index 478b1db..9902a72 100644
--- a/lib/lp/registry/interfaces/karma.py
+++ b/lib/lp/registry/interfaces/karma.py
@@ -3,8 +3,6 @@
"""Karma interfaces."""
-__metaclass__ = type
-
__all__ = [
'IKarma',
'IKarmaAction',
diff --git a/lib/lp/registry/interfaces/location.py b/lib/lp/registry/interfaces/location.py
index 06df850..14192d2 100644
--- a/lib/lp/registry/interfaces/location.py
+++ b/lib/lp/registry/interfaces/location.py
@@ -7,8 +7,6 @@ An object can have a location, which includes geographic coordinates and a
time zone.
"""
-__metaclass__ = type
-
__all__ = [
'IHasLocation',
'ILocationRecord',
diff --git a/lib/lp/registry/interfaces/mailinglist.py b/lib/lp/registry/interfaces/mailinglist.py
index ed735eb..ff60fa0 100644
--- a/lib/lp/registry/interfaces/mailinglist.py
+++ b/lib/lp/registry/interfaces/mailinglist.py
@@ -3,7 +3,6 @@
"""Mailing list interfaces."""
-__metaclass__ = type
__all__ = [
'CannotChangeSubscription',
'CannotSubscribe',
diff --git a/lib/lp/registry/interfaces/mailinglistsubscription.py b/lib/lp/registry/interfaces/mailinglistsubscription.py
index 3aa7363..9afb353 100644
--- a/lib/lp/registry/interfaces/mailinglistsubscription.py
+++ b/lib/lp/registry/interfaces/mailinglistsubscription.py
@@ -3,8 +3,6 @@
"""Mailing list interfaces related to list subscriptions."""
-__metaclass__ = type
-
__all__ = ['MailingListAutoSubscribePolicy']
diff --git a/lib/lp/registry/interfaces/milestone.py b/lib/lp/registry/interfaces/milestone.py
index aab0935..452a6e2 100644
--- a/lib/lp/registry/interfaces/milestone.py
+++ b/lib/lp/registry/interfaces/milestone.py
@@ -3,8 +3,6 @@
"""Milestone interfaces."""
-__metaclass__ = type
-
__all__ = [
'IAbstractMilestone',
'ICanGetMilestonesDirectly',
diff --git a/lib/lp/registry/interfaces/milestonetag.py b/lib/lp/registry/interfaces/milestonetag.py
index 03d31d9..bf63059 100644
--- a/lib/lp/registry/interfaces/milestonetag.py
+++ b/lib/lp/registry/interfaces/milestonetag.py
@@ -3,7 +3,6 @@
"""MilestoneTag interfaces."""
-__metaclass__ = type
__all__ = [
'IProjectGroupMilestoneTag',
]
diff --git a/lib/lp/registry/interfaces/nameblacklist.py b/lib/lp/registry/interfaces/nameblacklist.py
index a2ab5f1..c657153 100644
--- a/lib/lp/registry/interfaces/nameblacklist.py
+++ b/lib/lp/registry/interfaces/nameblacklist.py
@@ -3,8 +3,6 @@
"""NameBlacklist interfaces."""
-__metaclass__ = type
-
__all__ = [
'INameBlacklist',
'INameBlacklistSet',
diff --git a/lib/lp/registry/interfaces/ociproject.py b/lib/lp/registry/interfaces/ociproject.py
index e650c75..31d08c3 100644
--- a/lib/lp/registry/interfaces/ociproject.py
+++ b/lib/lp/registry/interfaces/ociproject.py
@@ -3,7 +3,6 @@
"""OCI Project interfaces."""
-__metaclass__ = type
__all__ = [
'CannotDeleteOCIProject',
'IOCIProject',
diff --git a/lib/lp/registry/interfaces/ociprojectname.py b/lib/lp/registry/interfaces/ociprojectname.py
index 694c3ee..6e55872 100644
--- a/lib/lp/registry/interfaces/ociprojectname.py
+++ b/lib/lp/registry/interfaces/ociprojectname.py
@@ -3,7 +3,6 @@
"""OCI Project Name interfaces."""
-__metaclass__ = type
__all__ = [
'IOCIProjectName',
'IOCIProjectNameSet',
diff --git a/lib/lp/registry/interfaces/ociprojectseries.py b/lib/lp/registry/interfaces/ociprojectseries.py
index 27de38b..152c416 100644
--- a/lib/lp/registry/interfaces/ociprojectseries.py
+++ b/lib/lp/registry/interfaces/ociprojectseries.py
@@ -3,7 +3,6 @@
"""Interfaces to allow bug filing on multiple versions of an OCI Project."""
-__metaclass__ = type
__all__ = [
'IOCIProjectSeries',
'IOCIProjectSeriesEditableAttributes',
diff --git a/lib/lp/registry/interfaces/oopsreferences.py b/lib/lp/registry/interfaces/oopsreferences.py
index 346758a..38171b9 100644
--- a/lib/lp/registry/interfaces/oopsreferences.py
+++ b/lib/lp/registry/interfaces/oopsreferences.py
@@ -3,8 +3,6 @@
"""Interfaces for querying OOPS references."""
-__metaclass__ = type
-
__all__ = [
'IHasOOPSReferences',
]
diff --git a/lib/lp/registry/interfaces/packaging.py b/lib/lp/registry/interfaces/packaging.py
index 74588df..ab53e79 100644
--- a/lib/lp/registry/interfaces/packaging.py
+++ b/lib/lp/registry/interfaces/packaging.py
@@ -3,8 +3,6 @@
"""Packaging interfaces."""
-__metaclass__ = type
-
__all__ = [
'IPackaging',
'IPackagingUtil',
diff --git a/lib/lp/registry/interfaces/person.py b/lib/lp/registry/interfaces/person.py
index 173fb49..b1ae107 100644
--- a/lib/lp/registry/interfaces/person.py
+++ b/lib/lp/registry/interfaces/person.py
@@ -3,8 +3,6 @@
"""Person interfaces."""
-__metaclass__ = type
-
__all__ = [
'AlreadyConvertedException',
'IAdminPeopleMergeSchema',
diff --git a/lib/lp/registry/interfaces/persondistributionsourcepackage.py b/lib/lp/registry/interfaces/persondistributionsourcepackage.py
index d8d72bc..57bc1fc 100644
--- a/lib/lp/registry/interfaces/persondistributionsourcepackage.py
+++ b/lib/lp/registry/interfaces/persondistributionsourcepackage.py
@@ -3,7 +3,6 @@
"""A person's view on a source package in a distribution."""
-__metaclass__ = type
__all__ = [
'IPersonDistributionSourcePackage',
'IPersonDistributionSourcePackageFactory',
diff --git a/lib/lp/registry/interfaces/personnotification.py b/lib/lp/registry/interfaces/personnotification.py
index ffacaf1..7402c63 100644
--- a/lib/lp/registry/interfaces/personnotification.py
+++ b/lib/lp/registry/interfaces/personnotification.py
@@ -3,7 +3,6 @@
"""Person notifications."""
-__metaclass__ = type
__all__ = [
'IPersonNotification',
'IPersonNotificationSet',
diff --git a/lib/lp/registry/interfaces/personociproject.py b/lib/lp/registry/interfaces/personociproject.py
index 1f4a106..ec1baaf 100644
--- a/lib/lp/registry/interfaces/personociproject.py
+++ b/lib/lp/registry/interfaces/personociproject.py
@@ -3,7 +3,6 @@
"""A person's view on an OCI project."""
-__metaclass__ = type
__all__ = [
'IPersonOCIProject',
'IPersonOCIProjectFactory',
diff --git a/lib/lp/registry/interfaces/personproduct.py b/lib/lp/registry/interfaces/personproduct.py
index 15829b1..4c26272 100644
--- a/lib/lp/registry/interfaces/personproduct.py
+++ b/lib/lp/registry/interfaces/personproduct.py
@@ -3,7 +3,6 @@
"""A person's view on a product."""
-__metaclass__ = type
__all__ = [
'IPersonProduct',
'IPersonProductFactory',
diff --git a/lib/lp/registry/interfaces/persontransferjob.py b/lib/lp/registry/interfaces/persontransferjob.py
index 7905658..3da86fd 100644
--- a/lib/lp/registry/interfaces/persontransferjob.py
+++ b/lib/lp/registry/interfaces/persontransferjob.py
@@ -3,7 +3,6 @@
"""Interface for the Jobs system to change memberships or merge persons."""
-__metaclass__ = type
__all__ = [
'IExpiringMembershipNotificationJob',
'IExpiringMembershipNotificationJobSource',
diff --git a/lib/lp/registry/interfaces/pillar.py b/lib/lp/registry/interfaces/pillar.py
index 25ef03f..51f5fe8 100644
--- a/lib/lp/registry/interfaces/pillar.py
+++ b/lib/lp/registry/interfaces/pillar.py
@@ -6,8 +6,6 @@
Pillars are currently Product, ProjectGroup and Distribution.
"""
-__metaclass__ = type
-
from lazr.restful.declarations import (
call_with,
export_read_operation,
diff --git a/lib/lp/registry/interfaces/pocket.py b/lib/lp/registry/interfaces/pocket.py
index a3a1e94..10443b2 100644
--- a/lib/lp/registry/interfaces/pocket.py
+++ b/lib/lp/registry/interfaces/pocket.py
@@ -8,7 +8,6 @@ Any given package in a `IDistroSeries` may be published in more than one
is.
"""
-__metaclass__ = type
__all__ = [
'PackagePublishingPocket',
'pocketsuffix',
diff --git a/lib/lp/registry/interfaces/product.py b/lib/lp/registry/interfaces/product.py
index f6557df..6c76349 100644
--- a/lib/lp/registry/interfaces/product.py
+++ b/lib/lp/registry/interfaces/product.py
@@ -3,8 +3,6 @@
"""Interfaces including and related to IProduct."""
-__metaclass__ = type
-
__all__ = [
'ILicensesModifiedEvent',
'InvalidProductName',
diff --git a/lib/lp/registry/interfaces/productjob.py b/lib/lp/registry/interfaces/productjob.py
index b211b9e..d0af408 100644
--- a/lib/lp/registry/interfaces/productjob.py
+++ b/lib/lp/registry/interfaces/productjob.py
@@ -3,7 +3,6 @@
"""Interfaces for the Jobs system to update products and send notifications."""
-__metaclass__ = type
__all__ = [
'IProductJob',
'IProductJobSource',
diff --git a/lib/lp/registry/interfaces/productlicense.py b/lib/lp/registry/interfaces/productlicense.py
index e6a835d..5591fc9 100644
--- a/lib/lp/registry/interfaces/productlicense.py
+++ b/lib/lp/registry/interfaces/productlicense.py
@@ -3,8 +3,6 @@
"""Product licence interface."""
-__metaclass__ = type
-
__all__ = ['IProductLicense']
from zope.interface import (
diff --git a/lib/lp/registry/interfaces/productrelease.py b/lib/lp/registry/interfaces/productrelease.py
index 2cc1acc..c00973f 100644
--- a/lib/lp/registry/interfaces/productrelease.py
+++ b/lib/lp/registry/interfaces/productrelease.py
@@ -3,8 +3,6 @@
"""Product release interfaces."""
-__metaclass__ = type
-
__all__ = [
'IProductRelease',
'IProductReleaseEditRestricted',
diff --git a/lib/lp/registry/interfaces/productseries.py b/lib/lp/registry/interfaces/productseries.py
index ee91924..81df2db 100644
--- a/lib/lp/registry/interfaces/productseries.py
+++ b/lib/lp/registry/interfaces/productseries.py
@@ -3,8 +3,6 @@
"""Product series interfaces."""
-__metaclass__ = type
-
__all__ = [
'IProductSeries',
'IProductSeriesEditRestricted',
diff --git a/lib/lp/registry/interfaces/projectgroup.py b/lib/lp/registry/interfaces/projectgroup.py
index f8f0708..cafd662 100644
--- a/lib/lp/registry/interfaces/projectgroup.py
+++ b/lib/lp/registry/interfaces/projectgroup.py
@@ -3,8 +3,6 @@
"""ProjectGroup-related interfaces for Launchpad."""
-__metaclass__ = type
-
__all__ = [
'IProjectGroup',
'IProjectGroupPublic',
diff --git a/lib/lp/registry/interfaces/role.py b/lib/lp/registry/interfaces/role.py
index 92f8872..caa0e1b 100644
--- a/lib/lp/registry/interfaces/role.py
+++ b/lib/lp/registry/interfaces/role.py
@@ -3,8 +3,6 @@
"""Interfaces that define common roles associated with objects."""
-__metaclass__ = type
-
__all__ = [
'IHasAppointedDriver',
'IHasDrivers',
diff --git a/lib/lp/registry/interfaces/series.py b/lib/lp/registry/interfaces/series.py
index a9a2bd8..4a800a2 100644
--- a/lib/lp/registry/interfaces/series.py
+++ b/lib/lp/registry/interfaces/series.py
@@ -3,8 +3,6 @@
"""Interfaces including common IDistroSeries and IProductSeries classes."""
-__metaclass__ = type
-
__all__ = [
'SeriesStatus',
'ISeriesMixin',
diff --git a/lib/lp/registry/interfaces/sharingjob.py b/lib/lp/registry/interfaces/sharingjob.py
index 95496ff..af6681a 100644
--- a/lib/lp/registry/interfaces/sharingjob.py
+++ b/lib/lp/registry/interfaces/sharingjob.py
@@ -3,8 +3,6 @@
"""Interfaces for sharing jobs."""
-__metaclass__ = type
-
__all__ = [
'IRemoveArtifactSubscriptionsJob',
'IRemoveArtifactSubscriptionsJobSource',
diff --git a/lib/lp/registry/interfaces/sharingservice.py b/lib/lp/registry/interfaces/sharingservice.py
index 502bfdc..1a0b77e 100644
--- a/lib/lp/registry/interfaces/sharingservice.py
+++ b/lib/lp/registry/interfaces/sharingservice.py
@@ -3,9 +3,6 @@
"""Interfaces for sharing service."""
-
-__metaclass__ = type
-
__all__ = [
'ISharingService',
]
diff --git a/lib/lp/registry/interfaces/sourcepackage.py b/lib/lp/registry/interfaces/sourcepackage.py
index 9699c32..faf366e 100644
--- a/lib/lp/registry/interfaces/sourcepackage.py
+++ b/lib/lp/registry/interfaces/sourcepackage.py
@@ -3,8 +3,6 @@
"""Source package interfaces."""
-__metaclass__ = type
-
__all__ = [
'ISourcePackage',
'ISourcePackagePublic',
diff --git a/lib/lp/registry/interfaces/sourcepackagename.py b/lib/lp/registry/interfaces/sourcepackagename.py
index 1d07542..8da08d7 100644
--- a/lib/lp/registry/interfaces/sourcepackagename.py
+++ b/lib/lp/registry/interfaces/sourcepackagename.py
@@ -3,8 +3,6 @@
"""Source package name interfaces."""
-__metaclass__ = type
-
__all__ = [
'ISourcePackageName',
'ISourcePackageNameSet',
diff --git a/lib/lp/registry/interfaces/ssh.py b/lib/lp/registry/interfaces/ssh.py
index bec3496..5f78968 100644
--- a/lib/lp/registry/interfaces/ssh.py
+++ b/lib/lp/registry/interfaces/ssh.py
@@ -3,8 +3,6 @@
"""SSH key interfaces."""
-__metaclass__ = type
-
__all__ = [
'ISSHKey',
'ISSHKeySet',
diff --git a/lib/lp/registry/interfaces/suitesourcepackage.py b/lib/lp/registry/interfaces/suitesourcepackage.py
index a3274d4..3ed9a78 100644
--- a/lib/lp/registry/interfaces/suitesourcepackage.py
+++ b/lib/lp/registry/interfaces/suitesourcepackage.py
@@ -3,7 +3,6 @@
"""A pocket of a source package."""
-__metaclass__ = type
__all__ = [
'ISuiteSourcePackage',
]
diff --git a/lib/lp/registry/interfaces/teammembership.py b/lib/lp/registry/interfaces/teammembership.py
index d2bcf1d..1df97d3 100644
--- a/lib/lp/registry/interfaces/teammembership.py
+++ b/lib/lp/registry/interfaces/teammembership.py
@@ -3,8 +3,6 @@
"""Team membership interfaces."""
-__metaclass__ = type
-
__all__ = [
'ACTIVE_STATES',
'CyclicalTeamMembershipError',
diff --git a/lib/lp/registry/javascript/tests/test_milestone_creation.py b/lib/lp/registry/javascript/tests/test_milestone_creation.py
index 35ea7e8..bdb94e7 100644
--- a/lib/lp/registry/javascript/tests/test_milestone_creation.py
+++ b/lib/lp/registry/javascript/tests/test_milestone_creation.py
@@ -4,7 +4,6 @@
"""Support for the lp.registry.javascript.milestoneoverlay YUIXHR tests.
"""
-__metaclass__ = type
__all__ = []
from lp.services.webapp.publisher import canonical_url
diff --git a/lib/lp/registry/mail/notification.py b/lib/lp/registry/mail/notification.py
index cc60a1a..909e37d 100644
--- a/lib/lp/registry/mail/notification.py
+++ b/lib/lp/registry/mail/notification.py
@@ -3,8 +3,6 @@
"""Event handlers that send email notifications."""
-__metaclass__ = type
-
from email.header import Header
from email.mime.text import MIMEText
from email.utils import (
diff --git a/lib/lp/registry/mail/teammembership.py b/lib/lp/registry/mail/teammembership.py
index b29aaeb..452ca59 100644
--- a/lib/lp/registry/mail/teammembership.py
+++ b/lib/lp/registry/mail/teammembership.py
@@ -1,7 +1,6 @@
# Copyright 2015 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'TeamMembershipMailer',
]
diff --git a/lib/lp/registry/model/accesspolicy.py b/lib/lp/registry/model/accesspolicy.py
index f994833..ef76153 100644
--- a/lib/lp/registry/model/accesspolicy.py
+++ b/lib/lp/registry/model/accesspolicy.py
@@ -3,7 +3,6 @@
"""Model classes for pillar and artifact access policies."""
-__metaclass__ = type
__all__ = [
'AccessArtifact',
'AccessArtifactGrant',
diff --git a/lib/lp/registry/model/announcement.py b/lib/lp/registry/model/announcement.py
index a2c9ac9..0862f70 100644
--- a/lib/lp/registry/model/announcement.py
+++ b/lib/lp/registry/model/announcement.py
@@ -3,7 +3,6 @@
"""Database classes for project news and announcement."""
-__metaclass__ = type
__all__ = [
'Announcement',
'AnnouncementSet',
diff --git a/lib/lp/registry/model/codeofconduct.py b/lib/lp/registry/model/codeofconduct.py
index f4eca01..720b373 100644
--- a/lib/lp/registry/model/codeofconduct.py
+++ b/lib/lp/registry/model/codeofconduct.py
@@ -6,7 +6,6 @@
https://launchpad.canonical.com/CodeOfConduct
"""
-__metaclass__ = type
__all__ = ['CodeOfConduct', 'CodeOfConductSet', 'CodeOfConductConf',
'SignedCodeOfConduct', 'SignedCodeOfConductSet']
diff --git a/lib/lp/registry/model/commercialsubscription.py b/lib/lp/registry/model/commercialsubscription.py
index b9b0b7d..9f7501e 100644
--- a/lib/lp/registry/model/commercialsubscription.py
+++ b/lib/lp/registry/model/commercialsubscription.py
@@ -3,7 +3,6 @@
"""Implementation classes for a CommercialSubscription."""
-__metaclass__ = type
__all__ = ['CommercialSubscription']
import datetime
diff --git a/lib/lp/registry/model/distribution.py b/lib/lp/registry/model/distribution.py
index 56eff14..dada762 100644
--- a/lib/lp/registry/model/distribution.py
+++ b/lib/lp/registry/model/distribution.py
@@ -3,7 +3,6 @@
"""Database classes for implementing distribution items."""
-__metaclass__ = type
__all__ = [
'Distribution',
'DistributionSet',
diff --git a/lib/lp/registry/model/distributionmirror.py b/lib/lp/registry/model/distributionmirror.py
index 7d39bae..71d7c49 100644
--- a/lib/lp/registry/model/distributionmirror.py
+++ b/lib/lp/registry/model/distributionmirror.py
@@ -3,7 +3,6 @@
"""Module docstring goes here."""
-__metaclass__ = type
__all__ = [
'DistributionMirror',
'MirrorDistroArchSeries',
diff --git a/lib/lp/registry/model/distributionsourcepackage.py b/lib/lp/registry/model/distributionsourcepackage.py
index e7611be..4606f0e 100644
--- a/lib/lp/registry/model/distributionsourcepackage.py
+++ b/lib/lp/registry/model/distributionsourcepackage.py
@@ -3,8 +3,6 @@
"""Classes to represent source packages in a distribution."""
-__metaclass__ = type
-
__all__ = [
'DistributionSourcePackage',
'DistributionSourcePackageInDatabase',
diff --git a/lib/lp/registry/model/distroseries.py b/lib/lp/registry/model/distroseries.py
index b2dc72b..e039e45 100644
--- a/lib/lp/registry/model/distroseries.py
+++ b/lib/lp/registry/model/distroseries.py
@@ -3,8 +3,6 @@
"""Database classes for a distribution series."""
-__metaclass__ = type
-
__all__ = [
'ACTIVE_RELEASED_STATUSES',
'ACTIVE_UNRELEASED_STATUSES',
diff --git a/lib/lp/registry/model/distroseriesdifference.py b/lib/lp/registry/model/distroseriesdifference.py
index 3f2e063..3b3bef4 100644
--- a/lib/lp/registry/model/distroseriesdifference.py
+++ b/lib/lp/registry/model/distroseriesdifference.py
@@ -3,8 +3,6 @@
"""Database classes for a difference between two distribution series."""
-__metaclass__ = type
-
__all__ = [
'DistroSeriesDifference',
]
diff --git a/lib/lp/registry/model/distroseriesdifferencecomment.py b/lib/lp/registry/model/distroseriesdifferencecomment.py
index 3c00ae2..3d7ef52 100644
--- a/lib/lp/registry/model/distroseriesdifferencecomment.py
+++ b/lib/lp/registry/model/distroseriesdifferencecomment.py
@@ -3,8 +3,6 @@
"""A comment/message for a difference between two distribution series."""
-__metaclass__ = type
-
__all__ = [
'DistroSeriesDifferenceComment',
]
diff --git a/lib/lp/registry/model/distroseriesparent.py b/lib/lp/registry/model/distroseriesparent.py
index ea056c3..a632004 100644
--- a/lib/lp/registry/model/distroseriesparent.py
+++ b/lib/lp/registry/model/distroseriesparent.py
@@ -3,8 +3,6 @@
"""Database class for table DistroSeriesParent."""
-__metaclass__ = type
-
__all__ = [
'DistroSeriesParent',
'DistroSeriesParentSet',
diff --git a/lib/lp/registry/model/featuredproject.py b/lib/lp/registry/model/featuredproject.py
index 35d3579..5c8a4cf 100644
--- a/lib/lp/registry/model/featuredproject.py
+++ b/lib/lp/registry/model/featuredproject.py
@@ -3,7 +3,6 @@
"""Database class for Featured Projects."""
-__metaclass__ = type
__all__ = [
'FeaturedProject',
]
diff --git a/lib/lp/registry/model/gpgkey.py b/lib/lp/registry/model/gpgkey.py
index bda1415..236297c 100644
--- a/lib/lp/registry/model/gpgkey.py
+++ b/lib/lp/registry/model/gpgkey.py
@@ -1,7 +1,6 @@
# Copyright 2009-2016 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = ['GPGKey', 'GPGKeySet']
from sqlobject import (
diff --git a/lib/lp/registry/model/hasdrivers.py b/lib/lp/registry/model/hasdrivers.py
index b8a9d4c..8763bd8 100644
--- a/lib/lp/registry/model/hasdrivers.py
+++ b/lib/lp/registry/model/hasdrivers.py
@@ -3,8 +3,6 @@
"""Common implementations for IHasDrivers."""
-__metaclass__ = type
-
__all__ = [
'HasDriversMixin',
]
diff --git a/lib/lp/registry/model/karma.py b/lib/lp/registry/model/karma.py
index 4e3473e..c4d4243 100644
--- a/lib/lp/registry/model/karma.py
+++ b/lib/lp/registry/model/karma.py
@@ -1,7 +1,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'Karma',
'KarmaAction',
diff --git a/lib/lp/registry/model/mailinglist.py b/lib/lp/registry/model/mailinglist.py
index 6161581..3b2dca2 100644
--- a/lib/lp/registry/model/mailinglist.py
+++ b/lib/lp/registry/model/mailinglist.py
@@ -1,8 +1,6 @@
# Copyright 2009-2019 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = [
'HeldMessageDetails',
'MailingList',
diff --git a/lib/lp/registry/model/milestone.py b/lib/lp/registry/model/milestone.py
index 452a3bf..2172fb9 100644
--- a/lib/lp/registry/model/milestone.py
+++ b/lib/lp/registry/model/milestone.py
@@ -3,7 +3,6 @@
"""Milestone model classes."""
-__metaclass__ = type
__all__ = [
'HasMilestonesMixin',
'Milestone',
diff --git a/lib/lp/registry/model/milestonetag.py b/lib/lp/registry/model/milestonetag.py
index 1e885f9..e5bf99d 100644
--- a/lib/lp/registry/model/milestonetag.py
+++ b/lib/lp/registry/model/milestonetag.py
@@ -3,7 +3,6 @@
"""Milestonetag model class."""
-__metaclass__ = type
__all__ = [
'MilestoneTag',
'ProjectGroupMilestoneTag',
diff --git a/lib/lp/registry/model/nameblacklist.py b/lib/lp/registry/model/nameblacklist.py
index 03f809d..9c63da8 100644
--- a/lib/lp/registry/model/nameblacklist.py
+++ b/lib/lp/registry/model/nameblacklist.py
@@ -3,7 +3,6 @@
"""Classes for managing the NameBlacklist table."""
-__metaclass__ = type
__all__ = [
'NameBlacklist',
'NameBlacklistSet',
diff --git a/lib/lp/registry/model/ociproject.py b/lib/lp/registry/model/ociproject.py
index 8a88be6..048c2a4 100644
--- a/lib/lp/registry/model/ociproject.py
+++ b/lib/lp/registry/model/ociproject.py
@@ -3,7 +3,6 @@
"""OCI Project implementation."""
-__metaclass__ = type
__all__ = [
'OCIProject',
'OCIProjectSet',
diff --git a/lib/lp/registry/model/ociprojectname.py b/lib/lp/registry/model/ociprojectname.py
index 517a0b4..d0d7626 100644
--- a/lib/lp/registry/model/ociprojectname.py
+++ b/lib/lp/registry/model/ociprojectname.py
@@ -3,7 +3,6 @@
"""OCI Project Name implementation."""
-__metaclass__ = type
__all__ = [
'OCIProjectName',
'OCIProjectNameSet',
diff --git a/lib/lp/registry/model/ociprojectseries.py b/lib/lp/registry/model/ociprojectseries.py
index b57e5cd..fb358ed 100644
--- a/lib/lp/registry/model/ociprojectseries.py
+++ b/lib/lp/registry/model/ociprojectseries.py
@@ -3,7 +3,6 @@
"""Model implementing `IOCIProjectSeries`."""
-__metaclass__ = type
__all__ = [
'OCIProjectSeries',
]
diff --git a/lib/lp/registry/model/oopsreferences.py b/lib/lp/registry/model/oopsreferences.py
index 34ff31d..fc71321 100644
--- a/lib/lp/registry/model/oopsreferences.py
+++ b/lib/lp/registry/model/oopsreferences.py
@@ -3,8 +3,6 @@
"""Find OOPS References within the LP database."""
-__metaclass__ = type
-
__all__ = [
'referenced_oops',
]
diff --git a/lib/lp/registry/model/packaging.py b/lib/lp/registry/model/packaging.py
index 90c6574..df6c7b6 100644
--- a/lib/lp/registry/model/packaging.py
+++ b/lib/lp/registry/model/packaging.py
@@ -1,7 +1,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = ['Packaging', 'PackagingUtil']
from lazr.lifecycle.event import (
diff --git a/lib/lp/registry/model/person.py b/lib/lp/registry/model/person.py
index 94153ed..708e937 100644
--- a/lib/lp/registry/model/person.py
+++ b/lib/lp/registry/model/person.py
@@ -3,7 +3,6 @@
"""Implementation classes for a Person."""
-__metaclass__ = type
__all__ = [
'get_person_visibility_terms',
'get_recipients',
diff --git a/lib/lp/registry/model/persondistributionsourcepackage.py b/lib/lp/registry/model/persondistributionsourcepackage.py
index 7dfa6c2..937e299 100644
--- a/lib/lp/registry/model/persondistributionsourcepackage.py
+++ b/lib/lp/registry/model/persondistributionsourcepackage.py
@@ -3,7 +3,6 @@
"""A person's view on a source package in a distribution."""
-__metaclass__ = type
__all__ = [
'PersonDistributionSourcePackage',
]
diff --git a/lib/lp/registry/model/personlocation.py b/lib/lp/registry/model/personlocation.py
index 50b14c4..8256958 100644
--- a/lib/lp/registry/model/personlocation.py
+++ b/lib/lp/registry/model/personlocation.py
@@ -9,7 +9,6 @@ people who have provided it, so we put it in a separate table which
decorates Person.
"""
-__metaclass__ = type
__all__ = [
'PersonLocation',
]
diff --git a/lib/lp/registry/model/personnotification.py b/lib/lp/registry/model/personnotification.py
index a6b0f8a..1afc27e 100644
--- a/lib/lp/registry/model/personnotification.py
+++ b/lib/lp/registry/model/personnotification.py
@@ -3,7 +3,6 @@
"""Person notifications."""
-__metaclass__ = type
__all__ = [
'PersonNotification',
'PersonNotificationSet',
diff --git a/lib/lp/registry/model/personociproject.py b/lib/lp/registry/model/personociproject.py
index 64a7d95..ed63adb 100644
--- a/lib/lp/registry/model/personociproject.py
+++ b/lib/lp/registry/model/personociproject.py
@@ -3,7 +3,6 @@
"""A person's view on an OCI project."""
-__metaclass__ = type
__all__ = []
from zope.interface import (
diff --git a/lib/lp/registry/model/personproduct.py b/lib/lp/registry/model/personproduct.py
index 6cade57..95aabbd 100644
--- a/lib/lp/registry/model/personproduct.py
+++ b/lib/lp/registry/model/personproduct.py
@@ -3,7 +3,6 @@
"""A person's view on a product."""
-__metaclass__ = type
__all__ = [
'PersonProduct',
]
diff --git a/lib/lp/registry/model/personroles.py b/lib/lp/registry/model/personroles.py
index 685e20d..f8bf273 100644
--- a/lib/lp/registry/model/personroles.py
+++ b/lib/lp/registry/model/personroles.py
@@ -3,7 +3,6 @@
"""Class that implements the IPersonRoles interface."""
-__metaclass__ = type
__all__ = ['PersonRoles']
from zope.component import (
diff --git a/lib/lp/registry/model/persontransferjob.py b/lib/lp/registry/model/persontransferjob.py
index f34653e..aed104a 100644
--- a/lib/lp/registry/model/persontransferjob.py
+++ b/lib/lp/registry/model/persontransferjob.py
@@ -3,7 +3,6 @@
"""Job classes related to PersonTransferJob."""
-__metaclass__ = type
__all__ = [
'MembershipNotificationJob',
'PersonCloseAccountJob',
diff --git a/lib/lp/registry/model/pillar.py b/lib/lp/registry/model/pillar.py
index 87d58fd..7edf34e 100644
--- a/lib/lp/registry/model/pillar.py
+++ b/lib/lp/registry/model/pillar.py
@@ -6,8 +6,6 @@
Pillars are currently Product, ProjectGroup and Distribution.
"""
-__metaclass__ = type
-
from operator import attrgetter
import warnings
diff --git a/lib/lp/registry/model/pillaraffiliation.py b/lib/lp/registry/model/pillaraffiliation.py
index 0fcaba0..bba558f 100644
--- a/lib/lp/registry/model/pillaraffiliation.py
+++ b/lib/lp/registry/model/pillaraffiliation.py
@@ -14,8 +14,6 @@ person, the relevant affiliation details may be determined.
"""
-__metaclass__ = type
-
__all__ = [
'IHasAffiliation',
]
diff --git a/lib/lp/registry/model/poll.py b/lib/lp/registry/model/poll.py
index d4b6878..fd228ed 100644
--- a/lib/lp/registry/model/poll.py
+++ b/lib/lp/registry/model/poll.py
@@ -1,7 +1,6 @@
# Copyright 2009-2021 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'Poll',
'PollOption',
diff --git a/lib/lp/registry/model/product.py b/lib/lp/registry/model/product.py
index bcda063..b539782 100644
--- a/lib/lp/registry/model/product.py
+++ b/lib/lp/registry/model/product.py
@@ -3,7 +3,6 @@
"""Database classes including and related to Product."""
-__metaclass__ = type
__all__ = [
'get_precached_products',
'LicensesModifiedEvent',
diff --git a/lib/lp/registry/model/productjob.py b/lib/lp/registry/model/productjob.py
index 009645a..a24eccc 100644
--- a/lib/lp/registry/model/productjob.py
+++ b/lib/lp/registry/model/productjob.py
@@ -3,7 +3,6 @@
"""Jobs classes to update products and send notifications."""
-__metaclass__ = type
__all__ = [
'ProductJob',
'ProductJobManager',
diff --git a/lib/lp/registry/model/productlicense.py b/lib/lp/registry/model/productlicense.py
index e33e972..35c905d 100644
--- a/lib/lp/registry/model/productlicense.py
+++ b/lib/lp/registry/model/productlicense.py
@@ -3,7 +3,6 @@
"""Database classes including and related to ProductLicense."""
-__metaclass__ = type
__all__ = [
'ProductLicense',
]
diff --git a/lib/lp/registry/model/productrelease.py b/lib/lp/registry/model/productrelease.py
index 6dfc8b3..f1e0744 100644
--- a/lib/lp/registry/model/productrelease.py
+++ b/lib/lp/registry/model/productrelease.py
@@ -1,7 +1,6 @@
# Copyright 2009-2013 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'ProductRelease',
'ProductReleaseFile',
diff --git a/lib/lp/registry/model/productseries.py b/lib/lp/registry/model/productseries.py
index d8a0bef..0cb2be2 100644
--- a/lib/lp/registry/model/productseries.py
+++ b/lib/lp/registry/model/productseries.py
@@ -3,8 +3,6 @@
"""Models for `IProductSeries`."""
-__metaclass__ = type
-
__all__ = [
'ProductSeries',
'ProductSeriesSet',
diff --git a/lib/lp/registry/model/projectgroup.py b/lib/lp/registry/model/projectgroup.py
index 433851f..7c645d8 100644
--- a/lib/lp/registry/model/projectgroup.py
+++ b/lib/lp/registry/model/projectgroup.py
@@ -3,7 +3,6 @@
"""Launchpad ProjectGroup-related Database Table Objects."""
-__metaclass__ = type
__all__ = [
'ProjectGroup',
'ProjectGroupSeries',
diff --git a/lib/lp/registry/model/series.py b/lib/lp/registry/model/series.py
index ab99593..0754811 100644
--- a/lib/lp/registry/model/series.py
+++ b/lib/lp/registry/model/series.py
@@ -3,8 +3,6 @@
"""Common implementations for a series."""
-__metaclass__ = type
-
__all__ = [
'ACTIVE_STATUSES',
'SeriesMixin',
diff --git a/lib/lp/registry/model/sharingjob.py b/lib/lp/registry/model/sharingjob.py
index 2714ed8..3f3f398 100644
--- a/lib/lp/registry/model/sharingjob.py
+++ b/lib/lp/registry/model/sharingjob.py
@@ -3,9 +3,6 @@
"""Job classes related to the sharing feature are in here."""
-__metaclass__ = type
-
-
__all__ = [
'RemoveArtifactSubscriptionsJob',
]
diff --git a/lib/lp/registry/model/sourcepackage.py b/lib/lp/registry/model/sourcepackage.py
index acc0bf9..f27672e 100644
--- a/lib/lp/registry/model/sourcepackage.py
+++ b/lib/lp/registry/model/sourcepackage.py
@@ -3,8 +3,6 @@
"""Database classes that implement SourcePackage items."""
-__metaclass__ = type
-
__all__ = [
'SourcePackage',
'SourcePackageQuestionTargetMixin',
diff --git a/lib/lp/registry/model/sourcepackagename.py b/lib/lp/registry/model/sourcepackagename.py
index 9fe65e1..e91e5f2 100644
--- a/lib/lp/registry/model/sourcepackagename.py
+++ b/lib/lp/registry/model/sourcepackagename.py
@@ -1,7 +1,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'SourcePackageName',
'SourcePackageNameSet',
diff --git a/lib/lp/registry/model/suitesourcepackage.py b/lib/lp/registry/model/suitesourcepackage.py
index 02a99c9..ba7795a 100644
--- a/lib/lp/registry/model/suitesourcepackage.py
+++ b/lib/lp/registry/model/suitesourcepackage.py
@@ -3,7 +3,6 @@
"""Implementation of `ISuiteSourcePackage`."""
-__metaclass__ = type
__all__ = [
'SuiteSourcePackage',
]
diff --git a/lib/lp/registry/model/teammembership.py b/lib/lp/registry/model/teammembership.py
index d6f043c..f7e2e75 100644
--- a/lib/lp/registry/model/teammembership.py
+++ b/lib/lp/registry/model/teammembership.py
@@ -1,7 +1,6 @@
# Copyright 2009-2015 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'find_team_participations',
'TeamMembership',
diff --git a/lib/lp/registry/personmerge.py b/lib/lp/registry/personmerge.py
index b2e61d9..9c39b76 100644
--- a/lib/lp/registry/personmerge.py
+++ b/lib/lp/registry/personmerge.py
@@ -3,7 +3,6 @@
"""Person/team merger implementation."""
-__metaclass__ = type
__all__ = ['merge_people']
from storm.store import Store
diff --git a/lib/lp/registry/publisher.py b/lib/lp/registry/publisher.py
index c314990..40e96e8 100644
--- a/lib/lp/registry/publisher.py
+++ b/lib/lp/registry/publisher.py
@@ -3,7 +3,6 @@
"""ILaunchpadContainer adapters."""
-__metaclass__ = type
__all__ = [
'LaunchpadProductContainer',
]
diff --git a/lib/lp/registry/scripts/closeaccount.py b/lib/lp/registry/scripts/closeaccount.py
index 3130cd5..9bdc3b0 100644
--- a/lib/lp/registry/scripts/closeaccount.py
+++ b/lib/lp/registry/scripts/closeaccount.py
@@ -3,7 +3,6 @@
"""Remove personal details of a user from the database, leaving a stub."""
-__metaclass__ = type
__all__ = [
'close_account',
'CloseAccountScript',
diff --git a/lib/lp/registry/scripts/distributionmirror_prober.py b/lib/lp/registry/scripts/distributionmirror_prober.py
index 13cff94..a9eb8e9 100644
--- a/lib/lp/registry/scripts/distributionmirror_prober.py
+++ b/lib/lp/registry/scripts/distributionmirror_prober.py
@@ -1,7 +1,6 @@
# Copyright 2009-2020 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'DistroMirrorProber',
]
diff --git a/lib/lp/registry/scripts/listteammembers.py b/lib/lp/registry/scripts/listteammembers.py
index f9631c3..f9a08b0 100644
--- a/lib/lp/registry/scripts/listteammembers.py
+++ b/lib/lp/registry/scripts/listteammembers.py
@@ -3,7 +3,6 @@
"""List all team members: name, preferred email address."""
-__metaclass__ = type
__all__ = ['process_team']
import re
diff --git a/lib/lp/registry/scripts/mlistimport.py b/lib/lp/registry/scripts/mlistimport.py
index f8d5951..6d921ce 100644
--- a/lib/lp/registry/scripts/mlistimport.py
+++ b/lib/lp/registry/scripts/mlistimport.py
@@ -3,7 +3,6 @@
"""Import mailing list information."""
-__metaclass__ = type
__all__ = [
'Importer',
]
diff --git a/lib/lp/registry/scripts/populate_distroseriesdiff.py b/lib/lp/registry/scripts/populate_distroseriesdiff.py
index b50cb73..cfb2e01 100644
--- a/lib/lp/registry/scripts/populate_distroseriesdiff.py
+++ b/lib/lp/registry/scripts/populate_distroseriesdiff.py
@@ -11,7 +11,6 @@ out the exact differences. Any pre-existing `DistroSeriesDifference`
entries remain untouched.
"""
-__metaclass__ = type
__all__ = [
'PopulateDistroSeriesDiff',
]
diff --git a/lib/lp/registry/scripts/productreleasefinder/filter.py b/lib/lp/registry/scripts/productreleasefinder/filter.py
index 24c87f7..e32ad1c 100644
--- a/lib/lp/registry/scripts/productreleasefinder/filter.py
+++ b/lib/lp/registry/scripts/productreleasefinder/filter.py
@@ -7,7 +7,6 @@ This module implements the URL filtering to identify which glob each
filename matches, or whether it is a file outside of any known pattern.
"""
-__metaclass__ = type
__all__ = [
'Filter',
'FilterPattern',
diff --git a/lib/lp/registry/scripts/productreleasefinder/finder.py b/lib/lp/registry/scripts/productreleasefinder/finder.py
index a8fa035..f8a0bc6 100644
--- a/lib/lp/registry/scripts/productreleasefinder/finder.py
+++ b/lib/lp/registry/scripts/productreleasefinder/finder.py
@@ -1,8 +1,6 @@
# Copyright 2009-2018 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = [
'ProductReleaseFinder'
]
diff --git a/lib/lp/registry/scripts/productreleasefinder/hose.py b/lib/lp/registry/scripts/productreleasefinder/hose.py
index ecf1fd0..2e9781a 100644
--- a/lib/lp/registry/scripts/productreleasefinder/hose.py
+++ b/lib/lp/registry/scripts/productreleasefinder/hose.py
@@ -7,7 +7,6 @@ This module uses the walker and filter modules to identify files for
download.
"""
-__metaclass__ = type
__all__ = [
'Hose',
]
diff --git a/lib/lp/registry/scripts/productreleasefinder/log.py b/lib/lp/registry/scripts/productreleasefinder/log.py
index 81c989f..b778445 100644
--- a/lib/lp/registry/scripts/productreleasefinder/log.py
+++ b/lib/lp/registry/scripts/productreleasefinder/log.py
@@ -7,9 +7,6 @@ This module contains a utility function for creating trees of logging
instances for objects.
"""
-__metaclass__ = type
-
-
import logging
diff --git a/lib/lp/registry/scripts/productreleasefinder/walker.py b/lib/lp/registry/scripts/productreleasefinder/walker.py
index 9dfbbf0..adcaa7e 100644
--- a/lib/lp/registry/scripts/productreleasefinder/walker.py
+++ b/lib/lp/registry/scripts/productreleasefinder/walker.py
@@ -6,7 +6,6 @@
This module implements classes to walk HTTP and FTP sites to find files.
"""
-__metaclass__ = type
__all__ = [
'walk',
'combine_url',
diff --git a/lib/lp/registry/scripts/standing.py b/lib/lp/registry/scripts/standing.py
index 00d1c92..aeb10d2 100644
--- a/lib/lp/registry/scripts/standing.py
+++ b/lib/lp/registry/scripts/standing.py
@@ -3,7 +3,6 @@
"""Core implementation of the script to update personal standing."""
-__metaclass__ = type
__all__ = [
'UpdatePersonalStanding',
]
diff --git a/lib/lp/registry/scripts/teamparticipation.py b/lib/lp/registry/scripts/teamparticipation.py
index 5484663..c332f51 100644
--- a/lib/lp/registry/scripts/teamparticipation.py
+++ b/lib/lp/registry/scripts/teamparticipation.py
@@ -3,7 +3,6 @@
"""Script code relating to team participations."""
-__metaclass__ = type
__all__ = [
"check_teamparticipation_circular",
"check_teamparticipation_consistency",
diff --git a/lib/lp/registry/scripts/tests/test_closeaccount.py b/lib/lp/registry/scripts/tests/test_closeaccount.py
index f729613..b90a255 100644
--- a/lib/lp/registry/scripts/tests/test_closeaccount.py
+++ b/lib/lp/registry/scripts/tests/test_closeaccount.py
@@ -3,8 +3,6 @@
"""Test the close-account script."""
-__metaclass__ = type
-
import six
from storm.store import Store
from testtools.matchers import (
diff --git a/lib/lp/registry/scripts/tests/test_createbotaccount.py b/lib/lp/registry/scripts/tests/test_createbotaccount.py
index 8a90908..97979de 100644
--- a/lib/lp/registry/scripts/tests/test_createbotaccount.py
+++ b/lib/lp/registry/scripts/tests/test_createbotaccount.py
@@ -3,8 +3,6 @@
"""Test the create-bot-account script."""
-__metaclass__ = type
-
from zope.component import getUtility
from lp.registry.interfaces.person import IPersonSet
diff --git a/lib/lp/registry/scripts/tests/test_populate_distroseriesdiff.py b/lib/lp/registry/scripts/tests/test_populate_distroseriesdiff.py
index 6882c96..9854fa7 100644
--- a/lib/lp/registry/scripts/tests/test_populate_distroseriesdiff.py
+++ b/lib/lp/registry/scripts/tests/test_populate_distroseriesdiff.py
@@ -3,8 +3,6 @@
"""Test the populate-distroseriesdiff script."""
-__metaclass__ = type
-
import six
from storm.store import Store
import transaction
diff --git a/lib/lp/registry/scripts/tests/test_suspendbotaccount.py b/lib/lp/registry/scripts/tests/test_suspendbotaccount.py
index 8ab52f4..14d8474 100644
--- a/lib/lp/registry/scripts/tests/test_suspendbotaccount.py
+++ b/lib/lp/registry/scripts/tests/test_suspendbotaccount.py
@@ -3,8 +3,6 @@
"""Test the suspend-bot-account script."""
-__metaclass__ = type
-
from lp.registry.scripts.suspendbotaccount import SuspendBotAccountScript
from lp.services.identity.interfaces.account import AccountStatus
from lp.services.log.logger import DevNullLogger
diff --git a/lib/lp/registry/services/sharingservice.py b/lib/lp/registry/services/sharingservice.py
index 36c89d4..7384df4 100644
--- a/lib/lp/registry/services/sharingservice.py
+++ b/lib/lp/registry/services/sharingservice.py
@@ -3,7 +3,6 @@
"""Classes for pillar and artifact sharing service."""
-__metaclass__ = type
__all__ = [
'SharingService',
]
diff --git a/lib/lp/registry/services/tests/test_sharingservice.py b/lib/lp/registry/services/tests/test_sharingservice.py
index 5dbee9b..5aa3c5c 100644
--- a/lib/lp/registry/services/tests/test_sharingservice.py
+++ b/lib/lp/registry/services/tests/test_sharingservice.py
@@ -1,9 +1,6 @@
# Copyright 2012-2021 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
-
from lazr.restful.interfaces import IWebBrowserOriginatingRequest
from lazr.restful.utils import get_current_web_service_request
import six
diff --git a/lib/lp/registry/subscribers.py b/lib/lp/registry/subscribers.py
index 1315479..08b3461 100644
--- a/lib/lp/registry/subscribers.py
+++ b/lib/lp/registry/subscribers.py
@@ -2,8 +2,6 @@
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Functions and classes that are subscribed to registry events."""
-__metaclass__ = type
-
__all__ = [
'product_licenses_modified',
]
diff --git a/lib/lp/registry/tests/mailinglists_helper.py b/lib/lp/registry/tests/mailinglists_helper.py
index bb7942a..2f926d9 100644
--- a/lib/lp/registry/tests/mailinglists_helper.py
+++ b/lib/lp/registry/tests/mailinglists_helper.py
@@ -3,7 +3,6 @@
"""Helper functions for testing XML-RPC services."""
-__metaclass__ = type
__all__ = [
'fault_catcher',
'mailman',
diff --git a/lib/lp/registry/tests/test_accesspolicy.py b/lib/lp/registry/tests/test_accesspolicy.py
index ce70d43..99b6145 100644
--- a/lib/lp/registry/tests/test_accesspolicy.py
+++ b/lib/lp/registry/tests/test_accesspolicy.py
@@ -1,8 +1,6 @@
# Copyright 2011-2021 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from storm.exceptions import LostObjectError
from testtools.matchers import AllMatch
from zope.component import getUtility
diff --git a/lib/lp/registry/tests/test_adapters.py b/lib/lp/registry/tests/test_adapters.py
index e018397..dd03d16 100644
--- a/lib/lp/registry/tests/test_adapters.py
+++ b/lib/lp/registry/tests/test_adapters.py
@@ -3,8 +3,6 @@
"""Tests for adapters."""
-__metaclass__ = type
-
from lp.registry.adapters import (
distroseries_to_distribution,
information_type_from_product,
diff --git a/lib/lp/registry/tests/test_add_member.py b/lib/lp/registry/tests/test_add_member.py
index a31e141..ec6748e 100644
--- a/lib/lp/registry/tests/test_add_member.py
+++ b/lib/lp/registry/tests/test_add_member.py
@@ -3,8 +3,6 @@
"""Test team membership changes."""
-__metaclass__ = type
-
from lp.registry.interfaces.teammembership import CyclicalTeamMembershipError
from lp.testing import (
person_logged_in,
diff --git a/lib/lp/registry/tests/test_codeofconduct.py b/lib/lp/registry/tests/test_codeofconduct.py
index 6072265..049515c 100644
--- a/lib/lp/registry/tests/test_codeofconduct.py
+++ b/lib/lp/registry/tests/test_codeofconduct.py
@@ -3,8 +3,6 @@
"""Test codes of conduct."""
-__metaclass__ = type
-
from textwrap import dedent
from testtools.matchers import (
diff --git a/lib/lp/registry/tests/test_commercial_subscription.py b/lib/lp/registry/tests/test_commercial_subscription.py
index 9e7f42b..00e607d 100644
--- a/lib/lp/registry/tests/test_commercial_subscription.py
+++ b/lib/lp/registry/tests/test_commercial_subscription.py
@@ -2,8 +2,6 @@
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Tests for the commercialsubscriptiojn module."""
-__metaclass__ = type
-
from datetime import timedelta
from zope.security.proxy import removeSecurityProxy
diff --git a/lib/lp/registry/tests/test_commercialprojects_vocabularies.py b/lib/lp/registry/tests/test_commercialprojects_vocabularies.py
index 0a44e5e..a594d0c 100644
--- a/lib/lp/registry/tests/test_commercialprojects_vocabularies.py
+++ b/lib/lp/registry/tests/test_commercialprojects_vocabularies.py
@@ -3,8 +3,6 @@
"""Test the commercial projects vocabularies."""
-__metaclass__ = type
-
from lp.registry.interfaces.product import License
from lp.registry.vocabularies import CommercialProjectsVocabulary
from lp.services.identity.interfaces.emailaddress import EmailAddressStatus
diff --git a/lib/lp/registry/tests/test_distribution.py b/lib/lp/registry/tests/test_distribution.py
index 005a7e6..e19bde3 100644
--- a/lib/lp/registry/tests/test_distribution.py
+++ b/lib/lp/registry/tests/test_distribution.py
@@ -3,8 +3,6 @@
"""Tests for Distribution."""
-__metaclass__ = type
-
import datetime
from fixtures import FakeLogger
diff --git a/lib/lp/registry/tests/test_distributionmirror.py b/lib/lp/registry/tests/test_distributionmirror.py
index bbe025d..08dae43 100644
--- a/lib/lp/registry/tests/test_distributionmirror.py
+++ b/lib/lp/registry/tests/test_distributionmirror.py
@@ -1,8 +1,6 @@
# Copyright 2009-2015 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
import transaction
from zope.component import getUtility
from zope.security.interfaces import Unauthorized
diff --git a/lib/lp/registry/tests/test_distributionmirror_prober.py b/lib/lp/registry/tests/test_distributionmirror_prober.py
index 052d98a..0648923 100644
--- a/lib/lp/registry/tests/test_distributionmirror_prober.py
+++ b/lib/lp/registry/tests/test_distributionmirror_prober.py
@@ -3,8 +3,6 @@
"""distributionmirror-prober tests."""
-__metaclass__ = type
-
from datetime import datetime
import logging
import os
diff --git a/lib/lp/registry/tests/test_distributionsourcepackage.py b/lib/lp/registry/tests/test_distributionsourcepackage.py
index 677d080..df6052b 100644
--- a/lib/lp/registry/tests/test_distributionsourcepackage.py
+++ b/lib/lp/registry/tests/test_distributionsourcepackage.py
@@ -3,8 +3,6 @@
"""Tests for DistributionSourcePackage."""
-__metaclass__ = type
-
from storm.store import Store
from testtools.matchers import (
Equals,
diff --git a/lib/lp/registry/tests/test_distributionsourcepackage_vocabulary.py b/lib/lp/registry/tests/test_distributionsourcepackage_vocabulary.py
index 196a115..e9f265f 100644
--- a/lib/lp/registry/tests/test_distributionsourcepackage_vocabulary.py
+++ b/lib/lp/registry/tests/test_distributionsourcepackage_vocabulary.py
@@ -3,8 +3,6 @@
"""Test the Distribution Source Package vocabulary."""
-__metaclass__ = type
-
from lp.registry.interfaces.pocket import PackagePublishingPocket
from lp.registry.vocabularies import DistributionSourcePackageVocabulary
from lp.services.webapp.vocabulary import IHugeVocabulary
diff --git a/lib/lp/registry/tests/test_distro_webservice.py b/lib/lp/registry/tests/test_distro_webservice.py
index 5c79665..f79e09e 100644
--- a/lib/lp/registry/tests/test_distro_webservice.py
+++ b/lib/lp/registry/tests/test_distro_webservice.py
@@ -1,8 +1,6 @@
# Copyright 2011-2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from datetime import datetime
from launchpadlib.errors import Unauthorized
diff --git a/lib/lp/registry/tests/test_distroseries.py b/lib/lp/registry/tests/test_distroseries.py
index 4a0ac2f..bb979c3 100644
--- a/lib/lp/registry/tests/test_distroseries.py
+++ b/lib/lp/registry/tests/test_distroseries.py
@@ -3,8 +3,6 @@
"""Tests for distroseries."""
-__metaclass__ = type
-
__all__ = [
'CurrentSourceReleasesMixin',
]
diff --git a/lib/lp/registry/tests/test_distroseries_vocabularies.py b/lib/lp/registry/tests/test_distroseries_vocabularies.py
index 5d1c93b..e08ea8d 100644
--- a/lib/lp/registry/tests/test_distroseries_vocabularies.py
+++ b/lib/lp/registry/tests/test_distroseries_vocabularies.py
@@ -3,8 +3,6 @@
"""Tests for distroseries vocabularies in `lp.registry.vocabularies`."""
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/registry/tests/test_distroseriesdifference.py b/lib/lp/registry/tests/test_distroseriesdifference.py
index f2d8dcc..9ab7cae 100644
--- a/lib/lp/registry/tests/test_distroseriesdifference.py
+++ b/lib/lp/registry/tests/test_distroseriesdifference.py
@@ -3,8 +3,6 @@
"""Model tests for the DistroSeriesDifference class."""
-__metaclass__ = type
-
from storm.exceptions import IntegrityError
from storm.store import Store
from testtools.matchers import MatchesStructure
diff --git a/lib/lp/registry/tests/test_distroseriesdifferencecomment.py b/lib/lp/registry/tests/test_distroseriesdifferencecomment.py
index 6276647..40de694 100644
--- a/lib/lp/registry/tests/test_distroseriesdifferencecomment.py
+++ b/lib/lp/registry/tests/test_distroseriesdifferencecomment.py
@@ -3,8 +3,6 @@
"""Model tests for the DistroSeriesDifferenceComment class."""
-__metaclass__ = type
-
from datetime import timedelta
from random import random
diff --git a/lib/lp/registry/tests/test_distroseriesparent.py b/lib/lp/registry/tests/test_distroseriesparent.py
index b484bf6..ea8bc96 100644
--- a/lib/lp/registry/tests/test_distroseriesparent.py
+++ b/lib/lp/registry/tests/test_distroseriesparent.py
@@ -3,8 +3,6 @@
"""Tests for DistroSeriesParent model class."""
-__metaclass__ = type
-
from testtools.matchers import MatchesStructure
from zope.component import getUtility
from zope.interface.verify import verifyObject
diff --git a/lib/lp/registry/tests/test_doc_project.py b/lib/lp/registry/tests/test_doc_project.py
index dd4b773..106e592 100644
--- a/lib/lp/registry/tests/test_doc_project.py
+++ b/lib/lp/registry/tests/test_doc_project.py
@@ -1,8 +1,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from doctest import DocTestSuite
from zope.component import getUtility
diff --git a/lib/lp/registry/tests/test_errors.py b/lib/lp/registry/tests/test_errors.py
index bb7a327..a896211 100644
--- a/lib/lp/registry/tests/test_errors.py
+++ b/lib/lp/registry/tests/test_errors.py
@@ -3,10 +3,6 @@
"""Tests for registry errors."""
-
-__metaclass__ = type
-
-
from six.moves.http_client import (
BAD_REQUEST,
CONFLICT,
diff --git a/lib/lp/registry/tests/test_gpgkey.py b/lib/lp/registry/tests/test_gpgkey.py
index 0a4ea26..878fcca 100644
--- a/lib/lp/registry/tests/test_gpgkey.py
+++ b/lib/lp/registry/tests/test_gpgkey.py
@@ -3,8 +3,6 @@
"""Tests for GPGKeySet model."""
-__metaclass__ = type
-
from testtools.matchers import (
Contains,
Equals,
diff --git a/lib/lp/registry/tests/test_initderiveddistroseries.py b/lib/lp/registry/tests/test_initderiveddistroseries.py
index e8572c3..07b5740 100644
--- a/lib/lp/registry/tests/test_initderiveddistroseries.py
+++ b/lib/lp/registry/tests/test_initderiveddistroseries.py
@@ -4,8 +4,6 @@
"""Test initializing a distroseries using
IDistroSeries.initDerivedDistroSeries."""
-__metaclass__ = type
-
from zope.component import getUtility
from zope.security.interfaces import Unauthorized
from zope.security.proxy import removeSecurityProxy
diff --git a/lib/lp/registry/tests/test_karmacache_updater.py b/lib/lp/registry/tests/test_karmacache_updater.py
index dca9081..ec5ad9f 100644
--- a/lib/lp/registry/tests/test_karmacache_updater.py
+++ b/lib/lp/registry/tests/test_karmacache_updater.py
@@ -1,9 +1,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
-
import subprocess
import unittest
diff --git a/lib/lp/registry/tests/test_mailinglist.py b/lib/lp/registry/tests/test_mailinglist.py
index 3ac95f5..c57c57f 100644
--- a/lib/lp/registry/tests/test_mailinglist.py
+++ b/lib/lp/registry/tests/test_mailinglist.py
@@ -1,7 +1,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = []
from textwrap import dedent
diff --git a/lib/lp/registry/tests/test_mailinglistapi.py b/lib/lp/registry/tests/test_mailinglistapi.py
index ec689eb..08f7f9c 100644
--- a/lib/lp/registry/tests/test_mailinglistapi.py
+++ b/lib/lp/registry/tests/test_mailinglistapi.py
@@ -3,7 +3,6 @@
"""Unit tests for the private MailingList API."""
-__metaclass__ = type
__all__ = []
import email
diff --git a/lib/lp/registry/tests/test_membership_notification_job.py b/lib/lp/registry/tests/test_membership_notification_job.py
index cad34e6..3d4ca21 100644
--- a/lib/lp/registry/tests/test_membership_notification_job.py
+++ b/lib/lp/registry/tests/test_membership_notification_job.py
@@ -3,8 +3,6 @@
"""Tests of `MembershipNotificationJob`."""
-__metaclass__ = type
-
from testtools.content import text_content
import transaction
from zope.component import getUtility
diff --git a/lib/lp/registry/tests/test_milestone.py b/lib/lp/registry/tests/test_milestone.py
index 1d55e54..27764ab 100644
--- a/lib/lp/registry/tests/test_milestone.py
+++ b/lib/lp/registry/tests/test_milestone.py
@@ -3,8 +3,6 @@
"""Milestone related test helper."""
-__metaclass__ = type
-
from operator import attrgetter
import unittest
diff --git a/lib/lp/registry/tests/test_milestone_vocabularies.py b/lib/lp/registry/tests/test_milestone_vocabularies.py
index 7e7c500..0cae9eb 100644
--- a/lib/lp/registry/tests/test_milestone_vocabularies.py
+++ b/lib/lp/registry/tests/test_milestone_vocabularies.py
@@ -3,8 +3,6 @@
"""Test the milestone vocabularies."""
-__metaclass__ = type
-
from zope.component import getUtility
from lp.app.enums import InformationType
diff --git a/lib/lp/registry/tests/test_milestonetag.py b/lib/lp/registry/tests/test_milestonetag.py
index d3cad1e..0713fe4 100644
--- a/lib/lp/registry/tests/test_milestonetag.py
+++ b/lib/lp/registry/tests/test_milestonetag.py
@@ -3,8 +3,6 @@
"""Milestone related test helper."""
-__metaclass__ = type
-
import datetime
from lazr.restfulclient.errors import BadRequest
diff --git a/lib/lp/registry/tests/test_mlists.py b/lib/lp/registry/tests/test_mlists.py
index a656372..a581384 100644
--- a/lib/lp/registry/tests/test_mlists.py
+++ b/lib/lp/registry/tests/test_mlists.py
@@ -3,9 +3,6 @@
"""Test mailing list stuff."""
-__metaclass__ = type
-
-
import errno
import os
from subprocess import (
diff --git a/lib/lp/registry/tests/test_nameblacklist.py b/lib/lp/registry/tests/test_nameblacklist.py
index 00bf53f..f533b93 100644
--- a/lib/lp/registry/tests/test_nameblacklist.py
+++ b/lib/lp/registry/tests/test_nameblacklist.py
@@ -3,9 +3,6 @@
"""Test the person_sort_key stored procedure."""
-__metaclass__ = type
-
-
from zope.component import getUtility
from zope.interface.verify import verifyObject
diff --git a/lib/lp/registry/tests/test_nickname.py b/lib/lp/registry/tests/test_nickname.py
index 6ca86bb..7fb56f0 100644
--- a/lib/lp/registry/tests/test_nickname.py
+++ b/lib/lp/registry/tests/test_nickname.py
@@ -3,8 +3,6 @@
"""Tests for nickname generation"""
-__metaclass__ = type
-
from zope.component import getUtility
from lp.registry.interfaces.person import IPersonSet
diff --git a/lib/lp/registry/tests/test_notification.py b/lib/lp/registry/tests/test_notification.py
index d075377..ead0170 100644
--- a/lib/lp/registry/tests/test_notification.py
+++ b/lib/lp/registry/tests/test_notification.py
@@ -3,8 +3,6 @@
"""Test notification classes and functions."""
-__metaclass__ = type
-
from lp.registry.mail.notification import send_direct_contact_email
from lp.services.mail.notificationrecipientset import NotificationRecipientSet
from lp.services.messages.interfaces.message import (
diff --git a/lib/lp/registry/tests/test_ociproject.py b/lib/lp/registry/tests/test_ociproject.py
index df8858a..5b0924f 100644
--- a/lib/lp/registry/tests/test_ociproject.py
+++ b/lib/lp/registry/tests/test_ociproject.py
@@ -3,8 +3,6 @@
"""Tests for `OCIProject` and `OCIProjectSet`."""
-__metaclass__ = type
-
import json
from six import text_type
diff --git a/lib/lp/registry/tests/test_ociprojectname.py b/lib/lp/registry/tests/test_ociprojectname.py
index b59f027..e51fe32 100644
--- a/lib/lp/registry/tests/test_ociprojectname.py
+++ b/lib/lp/registry/tests/test_ociprojectname.py
@@ -3,8 +3,6 @@
"""Test OCIProjectName."""
-__metaclass__ = type
-
from zope.component import getUtility
from lp.registry.errors import (
diff --git a/lib/lp/registry/tests/test_ociprojectseries.py b/lib/lp/registry/tests/test_ociprojectseries.py
index 78c4445..a938a54 100644
--- a/lib/lp/registry/tests/test_ociprojectseries.py
+++ b/lib/lp/registry/tests/test_ociprojectseries.py
@@ -3,8 +3,6 @@
"""Test OCIProjectSeries."""
-__metaclass__ = type
-
from six import string_types
from testtools.matchers import (
ContainsDict,
diff --git a/lib/lp/registry/tests/test_oopsreferences.py b/lib/lp/registry/tests/test_oopsreferences.py
index 54e8514..f06352c 100644
--- a/lib/lp/registry/tests/test_oopsreferences.py
+++ b/lib/lp/registry/tests/test_oopsreferences.py
@@ -3,8 +3,6 @@
"""Tests of the oopsreferences core."""
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/registry/tests/test_packaging.py b/lib/lp/registry/tests/test_packaging.py
index 5452d6e..43658af 100644
--- a/lib/lp/registry/tests/test_packaging.py
+++ b/lib/lp/registry/tests/test_packaging.py
@@ -3,8 +3,6 @@
"""Tests for the Packaging content class."""
-__metaclass__ = type
-
from lazr.lifecycle.event import (
ObjectCreatedEvent,
ObjectDeletedEvent,
diff --git a/lib/lp/registry/tests/test_person.py b/lib/lp/registry/tests/test_person.py
index de9e9a0..ee75a5b 100644
--- a/lib/lp/registry/tests/test_person.py
+++ b/lib/lp/registry/tests/test_person.py
@@ -1,8 +1,6 @@
# Copyright 2009-2019 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/registry/tests/test_person_close_account_job.py b/lib/lp/registry/tests/test_person_close_account_job.py
index eb71135..f7ecc35 100644
--- a/lib/lp/registry/tests/test_person_close_account_job.py
+++ b/lib/lp/registry/tests/test_person_close_account_job.py
@@ -3,8 +3,6 @@
"""Tests for `PersonCloseAccountJob`."""
-__metaclass__ = type
-
from testtools.matchers import (
Not,
StartsWith,
diff --git a/lib/lp/registry/tests/test_person_deactivate_job.py b/lib/lp/registry/tests/test_person_deactivate_job.py
index 683f993..8f21989 100644
--- a/lib/lp/registry/tests/test_person_deactivate_job.py
+++ b/lib/lp/registry/tests/test_person_deactivate_job.py
@@ -3,8 +3,6 @@
"""Tests for `PersonDeactivateJob`."""
-__metaclass__ = type
-
from zope.component import getUtility
from zope.interface.verify import verifyObject
diff --git a/lib/lp/registry/tests/test_person_merge_job.py b/lib/lp/registry/tests/test_person_merge_job.py
index 24d85fb..99f943d 100644
--- a/lib/lp/registry/tests/test_person_merge_job.py
+++ b/lib/lp/registry/tests/test_person_merge_job.py
@@ -3,8 +3,6 @@
"""Tests of `PersonMergeJob`."""
-__metaclass__ = type
-
from testtools.content import text_content
import transaction
from zope.component import getUtility
diff --git a/lib/lp/registry/tests/test_person_sort_key.py b/lib/lp/registry/tests/test_person_sort_key.py
index 25aa81c..64b82bb 100644
--- a/lib/lp/registry/tests/test_person_sort_key.py
+++ b/lib/lp/registry/tests/test_person_sort_key.py
@@ -3,8 +3,6 @@
"""Test the person_sort_key stored procedure and its in-app twin."""
-__metaclass__ = type
-
from lp.registry.model.person import person_sort_key
from lp.testing import TestCase
from lp.testing.layers import DatabaseLayer
diff --git a/lib/lp/registry/tests/test_person_vocabularies.py b/lib/lp/registry/tests/test_person_vocabularies.py
index a33ad30..e10da4d 100644
--- a/lib/lp/registry/tests/test_person_vocabularies.py
+++ b/lib/lp/registry/tests/test_person_vocabularies.py
@@ -3,8 +3,6 @@
"""Test the person vocabularies."""
-__metaclass__ = type
-
from storm.store import Store
from testtools.matchers import Equals
from zope.component import getUtility
diff --git a/lib/lp/registry/tests/test_persondistributionsourcepackage.py b/lib/lp/registry/tests/test_persondistributionsourcepackage.py
index 98794e1..683e282 100644
--- a/lib/lp/registry/tests/test_persondistributionsourcepackage.py
+++ b/lib/lp/registry/tests/test_persondistributionsourcepackage.py
@@ -3,8 +3,6 @@
"""Test the Person/DistributionSourcePackage non-database class."""
-__metaclass__ = type
-
from lp.registry.model.persondistributionsourcepackage import (
PersonDistributionSourcePackage,
)
diff --git a/lib/lp/registry/tests/test_personnotification.py b/lib/lp/registry/tests/test_personnotification.py
index 10eaf62..ce0df42 100644
--- a/lib/lp/registry/tests/test_personnotification.py
+++ b/lib/lp/registry/tests/test_personnotification.py
@@ -3,9 +3,6 @@
"""Test the PersonNotification classes."""
-__metaclass__ = type
-
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/registry/tests/test_personociproject.py b/lib/lp/registry/tests/test_personociproject.py
index 25c9517..132b3e3 100644
--- a/lib/lp/registry/tests/test_personociproject.py
+++ b/lib/lp/registry/tests/test_personociproject.py
@@ -3,8 +3,6 @@
"""Test the Person/OCIProject non-database class."""
-__metaclass__ = type
-
from zope.component import getUtility
from lp.registry.interfaces.personociproject import IPersonOCIProjectFactory
diff --git a/lib/lp/registry/tests/test_personproduct.py b/lib/lp/registry/tests/test_personproduct.py
index d8ffe76..5f82142 100644
--- a/lib/lp/registry/tests/test_personproduct.py
+++ b/lib/lp/registry/tests/test_personproduct.py
@@ -3,8 +3,6 @@
"""Test the Person/Product non-database class."""
-__metaclass__ = type
-
from lp.app.enums import InformationType
from lp.app.interfaces.launchpad import IPrivacy
from lp.registry.enums import PersonVisibility
diff --git a/lib/lp/registry/tests/test_personroles.py b/lib/lp/registry/tests/test_personroles.py
index 40af1b5..8ebb402 100644
--- a/lib/lp/registry/tests/test_personroles.py
+++ b/lib/lp/registry/tests/test_personroles.py
@@ -1,8 +1,6 @@
# Copyright 2010 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from zope.component import getUtility
from zope.interface.verify import verifyObject
from zope.security.proxy import removeSecurityProxy
diff --git a/lib/lp/registry/tests/test_personset.py b/lib/lp/registry/tests/test_personset.py
index 9bf188f..cccc95d 100644
--- a/lib/lp/registry/tests/test_personset.py
+++ b/lib/lp/registry/tests/test_personset.py
@@ -3,9 +3,6 @@
"""Tests for PersonSet."""
-__metaclass__ = type
-
-
from testtools.matchers import (
Contains,
ContainsDict,
diff --git a/lib/lp/registry/tests/test_persontransferjob.py b/lib/lp/registry/tests/test_persontransferjob.py
index 1795e88..bc78115 100644
--- a/lib/lp/registry/tests/test_persontransferjob.py
+++ b/lib/lp/registry/tests/test_persontransferjob.py
@@ -3,8 +3,6 @@
"""Tests for PersonTransferJobs."""
-__metaclass__ = type
-
from lp.registry.enums import PersonTransferJobType
from lp.registry.model.persontransferjob import (
PersonTransferJob,
diff --git a/lib/lp/registry/tests/test_pillar_vocabularies.py b/lib/lp/registry/tests/test_pillar_vocabularies.py
index c55d970..08ada9d 100644
--- a/lib/lp/registry/tests/test_pillar_vocabularies.py
+++ b/lib/lp/registry/tests/test_pillar_vocabularies.py
@@ -3,8 +3,6 @@
"""Test the pillar vocabularies."""
-__metaclass__ = type
-
from lp.app.enums import InformationType
from lp.registry.vocabularies import (
DistributionOrProductOrProjectGroupVocabulary,
diff --git a/lib/lp/registry/tests/test_pillaraffiliation.py b/lib/lp/registry/tests/test_pillaraffiliation.py
index 465aa76..0098e28 100644
--- a/lib/lp/registry/tests/test_pillaraffiliation.py
+++ b/lib/lp/registry/tests/test_pillaraffiliation.py
@@ -3,8 +3,6 @@
"""Tests for adapters."""
-__metaclass__ = type
-
from storm.store import Store
from testtools.matchers import Equals
from zope.component import getUtility
diff --git a/lib/lp/registry/tests/test_pillarname_triggers.py b/lib/lp/registry/tests/test_pillarname_triggers.py
index 5f8a6aa..8e1e7a3 100644
--- a/lib/lp/registry/tests/test_pillarname_triggers.py
+++ b/lib/lp/registry/tests/test_pillarname_triggers.py
@@ -4,8 +4,6 @@
"""Tests that the PillarName materialized view is being maintained correctly.
"""
-__metaclass__ = type
-
import unittest
from lp.services.database.sqlbase import cursor
diff --git a/lib/lp/registry/tests/test_private_team_visibility.py b/lib/lp/registry/tests/test_private_team_visibility.py
index ec4651a..524963f 100644
--- a/lib/lp/registry/tests/test_private_team_visibility.py
+++ b/lib/lp/registry/tests/test_private_team_visibility.py
@@ -15,8 +15,6 @@ private team's existence, and basic properties like name, displayname etc, by
being granted launchpad.limitedView permission.
"""
-__metaclass__ = type
-
from zope.component import getUtility
from zope.security.interfaces import Unauthorized
diff --git a/lib/lp/registry/tests/test_product.py b/lib/lp/registry/tests/test_product.py
index 80f7edd..da0be15 100644
--- a/lib/lp/registry/tests/test_product.py
+++ b/lib/lp/registry/tests/test_product.py
@@ -1,8 +1,6 @@
# Copyright 2009-2020 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/registry/tests/test_product_vocabularies.py b/lib/lp/registry/tests/test_product_vocabularies.py
index 5868084..83a3e9c 100644
--- a/lib/lp/registry/tests/test_product_vocabularies.py
+++ b/lib/lp/registry/tests/test_product_vocabularies.py
@@ -3,8 +3,6 @@
"""Test the product vocabularies."""
-__metaclass__ = type
-
from zope.component import getUtility
from lp.app.enums import InformationType
diff --git a/lib/lp/registry/tests/test_product_webservice.py b/lib/lp/registry/tests/test_product_webservice.py
index 6e38554..4f6e465 100644
--- a/lib/lp/registry/tests/test_product_webservice.py
+++ b/lib/lp/registry/tests/test_product_webservice.py
@@ -1,8 +1,6 @@
# Copyright 2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
import json
from lazr.uri import URI
diff --git a/lib/lp/registry/tests/test_productjob.py b/lib/lp/registry/tests/test_productjob.py
index 70ae61b..4d819bc 100644
--- a/lib/lp/registry/tests/test_productjob.py
+++ b/lib/lp/registry/tests/test_productjob.py
@@ -3,8 +3,6 @@
"""Tests for ProductJobs."""
-__metaclass__ = type
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/registry/tests/test_productrelease.py b/lib/lp/registry/tests/test_productrelease.py
index 26c7410..8a837da 100644
--- a/lib/lp/registry/tests/test_productrelease.py
+++ b/lib/lp/registry/tests/test_productrelease.py
@@ -3,8 +3,6 @@
"""Test product releases and product release set."""
-__metaclass__ = type
-
from zope.component import getUtility
from lp.app.enums import InformationType
diff --git a/lib/lp/registry/tests/test_productseries.py b/lib/lp/registry/tests/test_productseries.py
index 626b9e0..e833c72 100644
--- a/lib/lp/registry/tests/test_productseries.py
+++ b/lib/lp/registry/tests/test_productseries.py
@@ -3,8 +3,6 @@
"""Tests for ProductSeries and ProductSeriesSet."""
-__metaclass__ = type
-
from storm.exceptions import NoneError
from testtools.testcase import ExpectedException
import transaction
diff --git a/lib/lp/registry/tests/test_productseries_vocabularies.py b/lib/lp/registry/tests/test_productseries_vocabularies.py
index 1f77a10..88121d8 100644
--- a/lib/lp/registry/tests/test_productseries_vocabularies.py
+++ b/lib/lp/registry/tests/test_productseries_vocabularies.py
@@ -3,8 +3,6 @@
"""Test the milestone vocabularies."""
-__metaclass__ = type
-
from operator import attrgetter
from lp.app.enums import InformationType
diff --git a/lib/lp/registry/tests/test_project_milestone.py b/lib/lp/registry/tests/test_project_milestone.py
index cf14ffa..5caa8f7 100644
--- a/lib/lp/registry/tests/test_project_milestone.py
+++ b/lib/lp/registry/tests/test_project_milestone.py
@@ -3,8 +3,6 @@
"""Project Milestone related test helper."""
-__metaclass__ = type
-
from datetime import datetime
import unittest
diff --git a/lib/lp/registry/tests/test_projectgroup.py b/lib/lp/registry/tests/test_projectgroup.py
index 6ef7c65..abf6460 100644
--- a/lib/lp/registry/tests/test_projectgroup.py
+++ b/lib/lp/registry/tests/test_projectgroup.py
@@ -1,8 +1,6 @@
# Copyright 2009-2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from lazr.restfulclient.errors import ClientError
from zope.component import getUtility
from zope.security.interfaces import Unauthorized
diff --git a/lib/lp/registry/tests/test_projectgroup_vocabulary.py b/lib/lp/registry/tests/test_projectgroup_vocabulary.py
index 1deaf5a..cf55f3c 100644
--- a/lib/lp/registry/tests/test_projectgroup_vocabulary.py
+++ b/lib/lp/registry/tests/test_projectgroup_vocabulary.py
@@ -3,8 +3,6 @@
"""Test the ProjectGroup vocabulary."""
-__metaclass__ = type
-
from lp.registry.vocabularies import ProjectGroupVocabulary
from lp.testing import TestCaseWithFactory
from lp.testing.layers import DatabaseFunctionalLayer
diff --git a/lib/lp/registry/tests/test_ro_user.py b/lib/lp/registry/tests/test_ro_user.py
index ae72302..f84a523 100644
--- a/lib/lp/registry/tests/test_ro_user.py
+++ b/lib/lp/registry/tests/test_ro_user.py
@@ -3,8 +3,6 @@
"""Tests for read-only users."""
-__metaclass__ = type
-
import unittest
import psycopg2
diff --git a/lib/lp/registry/tests/test_samplekarma.py b/lib/lp/registry/tests/test_samplekarma.py
index eee43cb..1bce05b 100644
--- a/lib/lp/registry/tests/test_samplekarma.py
+++ b/lib/lp/registry/tests/test_samplekarma.py
@@ -1,8 +1,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
import unittest
from lp.testing.layers import LaunchpadLayer
diff --git a/lib/lp/registry/tests/test_service_usage.py b/lib/lp/registry/tests/test_service_usage.py
index 05a4a20..413eb37 100644
--- a/lib/lp/registry/tests/test_service_usage.py
+++ b/lib/lp/registry/tests/test_service_usage.py
@@ -1,8 +1,6 @@
# Copyright 2010-2015 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from zope.component import getUtility
from lp.app.enums import ServiceUsage
diff --git a/lib/lp/registry/tests/test_sharingjob.py b/lib/lp/registry/tests/test_sharingjob.py
index 65f382b..1a96940 100644
--- a/lib/lp/registry/tests/test_sharingjob.py
+++ b/lib/lp/registry/tests/test_sharingjob.py
@@ -3,8 +3,6 @@
"""Tests for SharingJobs."""
-__metaclass__ = type
-
from testtools.content import text_content
import transaction
from zope.component import getUtility
diff --git a/lib/lp/registry/tests/test_sourcepackage.py b/lib/lp/registry/tests/test_sourcepackage.py
index 02f6a2a..1cafc6f 100644
--- a/lib/lp/registry/tests/test_sourcepackage.py
+++ b/lib/lp/registry/tests/test_sourcepackage.py
@@ -3,8 +3,6 @@
"""Unit tests for ISourcePackage implementations."""
-__metaclass__ = type
-
from lazr.lifecycle.event import (
ObjectCreatedEvent,
ObjectDeletedEvent,
diff --git a/lib/lp/registry/tests/test_sourcepackagename.py b/lib/lp/registry/tests/test_sourcepackagename.py
index 0931327..b3aa204 100644
--- a/lib/lp/registry/tests/test_sourcepackagename.py
+++ b/lib/lp/registry/tests/test_sourcepackagename.py
@@ -3,8 +3,6 @@
"""Tests for SourcePackageName"""
-__metaclass__ = type
-
from testtools.testcase import ExpectedException
from lp.registry.errors import InvalidName
diff --git a/lib/lp/registry/tests/test_sourcepackagename_vocabulary.py b/lib/lp/registry/tests/test_sourcepackagename_vocabulary.py
index 7417092..044b483 100644
--- a/lib/lp/registry/tests/test_sourcepackagename_vocabulary.py
+++ b/lib/lp/registry/tests/test_sourcepackagename_vocabulary.py
@@ -3,8 +3,6 @@
"""Test the source package name vocabularies."""
-__metaclass__ = type
-
from testtools.matchers import (
Matcher,
MatchesListwise,
diff --git a/lib/lp/registry/tests/test_ssh.py b/lib/lp/registry/tests/test_ssh.py
index 006e185..bce2795 100644
--- a/lib/lp/registry/tests/test_ssh.py
+++ b/lib/lp/registry/tests/test_ssh.py
@@ -3,8 +3,6 @@
"""Tests for SSHKey."""
-__metaclass__ = type
-
from testtools.matchers import StartsWith
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
diff --git a/lib/lp/registry/tests/test_subscribers.py b/lib/lp/registry/tests/test_subscribers.py
index 9743c0f..7e26809 100644
--- a/lib/lp/registry/tests/test_subscribers.py
+++ b/lib/lp/registry/tests/test_subscribers.py
@@ -3,8 +3,6 @@
"""Test subscruber classes and functions."""
-__metaclass__ = type
-
from datetime import datetime
from lazr.restful.utils import get_current_browser_request
diff --git a/lib/lp/registry/tests/test_suitesourcepackage.py b/lib/lp/registry/tests/test_suitesourcepackage.py
index 3c45afd..f07e22f 100644
--- a/lib/lp/registry/tests/test_suitesourcepackage.py
+++ b/lib/lp/registry/tests/test_suitesourcepackage.py
@@ -3,8 +3,6 @@
"""Tests for ISuiteSourcePackage."""
-__metaclass__ = type
-
from lp.registry.interfaces.pocket import PackagePublishingPocket
from lp.registry.model.suitesourcepackage import SuiteSourcePackage
from lp.testing import TestCaseWithFactory
diff --git a/lib/lp/registry/tests/test_team.py b/lib/lp/registry/tests/test_team.py
index e860410..b624147 100644
--- a/lib/lp/registry/tests/test_team.py
+++ b/lib/lp/registry/tests/test_team.py
@@ -3,8 +3,6 @@
"""Tests for PersonSet."""
-__metaclass__ = type
-
from email.mime.text import MIMEText
from email.utils import (
formatdate,
diff --git a/lib/lp/registry/tests/test_team_webservice.py b/lib/lp/registry/tests/test_team_webservice.py
index 1525f85..f738b29 100644
--- a/lib/lp/registry/tests/test_team_webservice.py
+++ b/lib/lp/registry/tests/test_team_webservice.py
@@ -1,8 +1,6 @@
# Copyright 2010-2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from lazr.restfulclient.errors import (
HTTPError,
Unauthorized,
diff --git a/lib/lp/registry/tests/test_teammembership.py b/lib/lp/registry/tests/test_teammembership.py
index 0c3317a..58e264d 100644
--- a/lib/lp/registry/tests/test_teammembership.py
+++ b/lib/lp/registry/tests/test_teammembership.py
@@ -1,8 +1,6 @@
# Copyright 2009-2018 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
import bz2
from datetime import (
datetime,
diff --git a/lib/lp/registry/tests/test_teammembership_webservice.py b/lib/lp/registry/tests/test_teammembership_webservice.py
index 4fe1055..6edea51 100644
--- a/lib/lp/registry/tests/test_teammembership_webservice.py
+++ b/lib/lp/registry/tests/test_teammembership_webservice.py
@@ -1,8 +1,6 @@
# Copyright 2010 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from lazr.restfulclient.errors import HTTPError
from zope.component import getUtility
diff --git a/lib/lp/registry/tests/test_user_vocabularies.py b/lib/lp/registry/tests/test_user_vocabularies.py
index 77a4a25..be504b7 100644
--- a/lib/lp/registry/tests/test_user_vocabularies.py
+++ b/lib/lp/registry/tests/test_user_vocabularies.py
@@ -3,8 +3,6 @@
"""Test the user vocabularies."""
-__metaclass__ = type
-
from zope.component import getUtility
from zope.schema.vocabulary import getVocabularyRegistry
diff --git a/lib/lp/registry/tests/test_xmlrpc.py b/lib/lp/registry/tests/test_xmlrpc.py
index cfc665c..dc9507b 100644
--- a/lib/lp/registry/tests/test_xmlrpc.py
+++ b/lib/lp/registry/tests/test_xmlrpc.py
@@ -3,8 +3,6 @@
"""Testing registry-related xmlrpc calls."""
-__metaclass__ = type
-
from email import message_from_string
from textwrap import dedent
diff --git a/lib/lp/registry/tests/test_yuitests.py b/lib/lp/registry/tests/test_yuitests.py
index 89a9bcc..01d256a 100644
--- a/lib/lp/registry/tests/test_yuitests.py
+++ b/lib/lp/registry/tests/test_yuitests.py
@@ -3,7 +3,6 @@
"""Run YUI.test tests."""
-__metaclass__ = type
__all__ = []
from lp.testing import (
diff --git a/lib/lp/registry/vocabularies.py b/lib/lp/registry/vocabularies.py
index f2154e3..9adfe8d 100644
--- a/lib/lp/registry/vocabularies.py
+++ b/lib/lp/registry/vocabularies.py
@@ -21,8 +21,6 @@ class IFoo(Interface):
The binding of name -> class is done in the configure.zcml
"""
-__metaclass__ = type
-
__all__ = [
'ActiveMailingListVocabulary',
'AdminMergeablePersonVocabulary',
diff --git a/lib/lp/registry/xmlrpc/canonicalsso.py b/lib/lp/registry/xmlrpc/canonicalsso.py
index 9aa5c79..9abfdf5 100644
--- a/lib/lp/registry/xmlrpc/canonicalsso.py
+++ b/lib/lp/registry/xmlrpc/canonicalsso.py
@@ -3,7 +3,6 @@
"""XMLRPC APIs for Canonical SSO to retrieve person details."""
-__metaclass__ = type
__all__ = [
'CanonicalSSOAPI',
'CanonicalSSOApplication',
diff --git a/lib/lp/registry/xmlrpc/mailinglist.py b/lib/lp/registry/xmlrpc/mailinglist.py
index f14d8cd..829c740 100644
--- a/lib/lp/registry/xmlrpc/mailinglist.py
+++ b/lib/lp/registry/xmlrpc/mailinglist.py
@@ -3,7 +3,6 @@
"""XMLRPC APIs for mailing lists."""
-__metaclass__ = type
__all__ = [
'MailingListAPIView',
]
diff --git a/lib/lp/scripts/garbo.py b/lib/lp/scripts/garbo.py
index f416b3f..f89c5f7 100644
--- a/lib/lp/scripts/garbo.py
+++ b/lib/lp/scripts/garbo.py
@@ -3,7 +3,6 @@
"""Database garbage collection."""
-__metaclass__ = type
__all__ = [
'DailyDatabaseGarbageCollector',
'FrequentDatabaseGarbageCollector',
diff --git a/lib/lp/scripts/harness.py b/lib/lp/scripts/harness.py
index 7d2e397..b8adcfb 100644
--- a/lib/lp/scripts/harness.py
+++ b/lib/lp/scripts/harness.py
@@ -9,7 +9,6 @@ launchpad_dev or the database specified on the command line.
One uses Python, the other iPython.
"""
-__metaclass__ = type
__all__ = ['python', 'ipython']
# This has entry points with corresponding scripts installed by setup.py.
diff --git a/lib/lp/scripts/helpers.py b/lib/lp/scripts/helpers.py
index a534c6c..0e02ceb 100644
--- a/lib/lp/scripts/helpers.py
+++ b/lib/lp/scripts/helpers.py
@@ -3,7 +3,6 @@
"""Helpers for command line tools."""
-__metaclass__ = type
__all__ = ["LPOptionParser", "TransactionFreeOperation", ]
import contextlib
diff --git a/lib/lp/scripts/runlaunchpad.py b/lib/lp/scripts/runlaunchpad.py
index 38225f9..a92b39b 100644
--- a/lib/lp/scripts/runlaunchpad.py
+++ b/lib/lp/scripts/runlaunchpad.py
@@ -1,7 +1,6 @@
# Copyright 2009-2021 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = ['start_launchpad']
from contextlib import ExitStack
diff --git a/lib/lp/scripts/scriptmonitor.py b/lib/lp/scripts/scriptmonitor.py
index 72dad3e..2636e08 100644
--- a/lib/lp/scripts/scriptmonitor.py
+++ b/lib/lp/scripts/scriptmonitor.py
@@ -3,7 +3,6 @@
"""Monitor whether scripts have run between specified time periods."""
-__metaclass__ = type
__all__ = ['check_script']
from lp.services.database.sqlbase import sqlvalues
diff --git a/lib/lp/scripts/tests/test_garbo.py b/lib/lp/scripts/tests/test_garbo.py
index 62cbb4b..bb2bfb2 100644
--- a/lib/lp/scripts/tests/test_garbo.py
+++ b/lib/lp/scripts/tests/test_garbo.py
@@ -3,7 +3,6 @@
"""Test the database garbage collector."""
-__metaclass__ = type
__all__ = []
from datetime import (
diff --git a/lib/lp/scripts/tests/test_helpers.py b/lib/lp/scripts/tests/test_helpers.py
index 8dda0d5..6debdc4 100644
--- a/lib/lp/scripts/tests/test_helpers.py
+++ b/lib/lp/scripts/tests/test_helpers.py
@@ -3,8 +3,6 @@
"""Test the helpers."""
-__metaclass__ = type
-
from testtools.testcase import ExpectedException
import transaction
diff --git a/lib/lp/scripts/tests/test_runlaunchpad.py b/lib/lp/scripts/tests/test_runlaunchpad.py
index bd9d540..96dc261 100644
--- a/lib/lp/scripts/tests/test_runlaunchpad.py
+++ b/lib/lp/scripts/tests/test_runlaunchpad.py
@@ -3,7 +3,6 @@
"""Tests for runlaunchpad.py"""
-__metaclass__ = type
__all__ = [
'CommandLineArgumentProcessing',
'ServersToStart',
diff --git a/lib/lp/scripts/tests/test_scriptmonitor.py b/lib/lp/scripts/tests/test_scriptmonitor.py
index 95e8b43..d869f3b 100644
--- a/lib/lp/scripts/tests/test_scriptmonitor.py
+++ b/lib/lp/scripts/tests/test_scriptmonitor.py
@@ -3,8 +3,6 @@
"""Test scriptmonitor.py."""
-__metaclass__ = type
-
from unittest import TestCase
from lp.scripts.scriptmonitor import check_script
diff --git a/lib/lp/scripts/tests/test_sphinxdocs.py b/lib/lp/scripts/tests/test_sphinxdocs.py
index 717167d..de549b5 100644
--- a/lib/lp/scripts/tests/test_sphinxdocs.py
+++ b/lib/lp/scripts/tests/test_sphinxdocs.py
@@ -3,8 +3,6 @@
"""Tests for our Sphinx documentation."""
-__metaclass__ = type
-
import os
from sphinx.cmd.build import main as sphinx_main
diff --git a/lib/lp/scripts/utilities/js/jsbuild.py b/lib/lp/scripts/utilities/js/jsbuild.py
index 77ce702..1d6c9e6 100644
--- a/lib/lp/scripts/utilities/js/jsbuild.py
+++ b/lib/lp/scripts/utilities/js/jsbuild.py
@@ -3,7 +3,6 @@
"""build.py - Minifies and creates the JS build directory."""
-__metaclass__ = type
__all__ = [
'CSSComboFile',
]
diff --git a/lib/lp/scripts/utilities/killservice.py b/lib/lp/scripts/utilities/killservice.py
index d899ce2..53ea54b 100755
--- a/lib/lp/scripts/utilities/killservice.py
+++ b/lib/lp/scripts/utilities/killservice.py
@@ -3,8 +3,6 @@
# Copyright 2009-2018 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
import logging
from optparse import OptionParser
import os
diff --git a/lib/lp/scripts/utilities/settingsauditor.py b/lib/lp/scripts/utilities/settingsauditor.py
index 2637aa0..74598f7 100644
--- a/lib/lp/scripts/utilities/settingsauditor.py
+++ b/lib/lp/scripts/utilities/settingsauditor.py
@@ -3,8 +3,6 @@
"""Contains the seting auditor used to clean up security.cfg."""
-__metaclass__ = type
-
__all__ = [
"SettingsAuditor",
]
diff --git a/lib/lp/scripts/utilities/tests/test_audit_security_settings.py b/lib/lp/scripts/utilities/tests/test_audit_security_settings.py
index 3a0e13d..9317fea 100644
--- a/lib/lp/scripts/utilities/tests/test_audit_security_settings.py
+++ b/lib/lp/scripts/utilities/tests/test_audit_security_settings.py
@@ -3,8 +3,6 @@
"""Tests the security.cfg auditor."""
-__metaclass__ = type
-
from lp.scripts.utilities.settingsauditor import SettingsAuditor
from lp.testing import TestCase
from lp.testing.layers import BaseLayer
diff --git a/lib/lp/scripts/utilities/tests/test_shhh.py b/lib/lp/scripts/utilities/tests/test_shhh.py
index 4908e22..0f4ab02 100644
--- a/lib/lp/scripts/utilities/tests/test_shhh.py
+++ b/lib/lp/scripts/utilities/tests/test_shhh.py
@@ -1,8 +1,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from doctest import DocTestSuite
import os
import sys
diff --git a/lib/lp/scripts/utilities/tests/test_versioninfo.py b/lib/lp/scripts/utilities/tests/test_versioninfo.py
index 83e2061..db561a8 100644
--- a/lib/lp/scripts/utilities/tests/test_versioninfo.py
+++ b/lib/lp/scripts/utilities/tests/test_versioninfo.py
@@ -3,8 +3,6 @@
"""Test the script to show version information."""
-__metaclass__ = type
-
from textwrap import dedent
from fixtures import MockPatch
diff --git a/lib/lp/scripts/utilities/versioninfo.py b/lib/lp/scripts/utilities/versioninfo.py
index d59042e..fd1a061 100644
--- a/lib/lp/scripts/utilities/versioninfo.py
+++ b/lib/lp/scripts/utilities/versioninfo.py
@@ -6,7 +6,6 @@
This is useful in deployment scripts.
"""
-__metaclass__ = type
__all__ = ['main']
import argparse
diff --git a/lib/lp/scripts/utilities/warninghandler.py b/lib/lp/scripts/utilities/warninghandler.py
index 423ba6f..0c9aea3 100644
--- a/lib/lp/scripts/utilities/warninghandler.py
+++ b/lib/lp/scripts/utilities/warninghandler.py
@@ -3,8 +3,6 @@
"""Handlers for warnings, to be installed when testing."""
-__metaclass__ = type
-
import inspect
import sys
import warnings
diff --git a/lib/lp/security.py b/lib/lp/security.py
index 08f1065..d8876be 100644
--- a/lib/lp/security.py
+++ b/lib/lp/security.py
@@ -3,7 +3,6 @@
"""Security policies for using content objects."""
-__metaclass__ = type
__all__ = [
'BugTargetOwnerOrBugSupervisorOrAdmins',
'ModerateByRegistryExpertsOrAdmins',
diff --git a/lib/lp/services/apachelogparser/interfaces/parsedapachelog.py b/lib/lp/services/apachelogparser/interfaces/parsedapachelog.py
index e55536d..6d09815 100644
--- a/lib/lp/services/apachelogparser/interfaces/parsedapachelog.py
+++ b/lib/lp/services/apachelogparser/interfaces/parsedapachelog.py
@@ -1,7 +1,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = ['IParsedApacheLog']
from zope.interface import Interface
diff --git a/lib/lp/services/apachelogparser/model/parsedapachelog.py b/lib/lp/services/apachelogparser/model/parsedapachelog.py
index 128a46c..f5bca5d 100644
--- a/lib/lp/services/apachelogparser/model/parsedapachelog.py
+++ b/lib/lp/services/apachelogparser/model/parsedapachelog.py
@@ -1,7 +1,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = ['ParsedApacheLog']
import six
diff --git a/lib/lp/services/apachelogparser/script.py b/lib/lp/services/apachelogparser/script.py
index 7e7b635..0c92c00 100644
--- a/lib/lp/services/apachelogparser/script.py
+++ b/lib/lp/services/apachelogparser/script.py
@@ -1,7 +1,6 @@
# Copyright 2009-2017 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = ['ParseApacheLogs']
import glob
diff --git a/lib/lp/services/authserver/interfaces.py b/lib/lp/services/authserver/interfaces.py
index 4fbcd4a..a1ec353 100644
--- a/lib/lp/services/authserver/interfaces.py
+++ b/lib/lp/services/authserver/interfaces.py
@@ -3,7 +3,6 @@
"""Interface for the XML-RPC authentication server."""
-__metaclass__ = type
__all__ = [
'IAuthServer',
'IAuthServerApplication',
diff --git a/lib/lp/services/authserver/testing.py b/lib/lp/services/authserver/testing.py
index 5c47d78..5dba0c9 100644
--- a/lib/lp/services/authserver/testing.py
+++ b/lib/lp/services/authserver/testing.py
@@ -3,7 +3,6 @@
"""In-process authserver fixture."""
-__metaclass__ = type
__all__ = [
'InProcessAuthServerFixture',
]
diff --git a/lib/lp/services/authserver/tests/test_authserver.py b/lib/lp/services/authserver/tests/test_authserver.py
index 195be52..a2319a3 100644
--- a/lib/lp/services/authserver/tests/test_authserver.py
+++ b/lib/lp/services/authserver/tests/test_authserver.py
@@ -3,8 +3,6 @@
"""Tests for the internal codehosting API."""
-__metaclass__ = type
-
from pymacaroons import Macaroon
from six.moves import xmlrpc_client
from storm.sqlobject import SQLObjectNotFound
diff --git a/lib/lp/services/authserver/xmlrpc.py b/lib/lp/services/authserver/xmlrpc.py
index 06629ea..4696ac0 100644
--- a/lib/lp/services/authserver/xmlrpc.py
+++ b/lib/lp/services/authserver/xmlrpc.py
@@ -3,8 +3,6 @@
"""Auth-Server XML-RPC API ."""
-__metaclass__ = type
-
__all__ = [
'AuthServerApplication',
'AuthServerAPIView',
diff --git a/lib/lp/services/beautifulsoup.py b/lib/lp/services/beautifulsoup.py
index 9266ad3..b61e126 100644
--- a/lib/lp/services/beautifulsoup.py
+++ b/lib/lp/services/beautifulsoup.py
@@ -3,7 +3,6 @@
"""Beautiful Soup wrapper for Launchpad."""
-__metaclass__ = type
__all__ = [
'BeautifulSoup',
'SoupStrainer',
diff --git a/lib/lp/services/browser_helpers.py b/lib/lp/services/browser_helpers.py
index f010205..e4a1902 100644
--- a/lib/lp/services/browser_helpers.py
+++ b/lib/lp/services/browser_helpers.py
@@ -3,7 +3,6 @@
"""Helpers for examining the browser user_agent header."""
-__metaclass__ = type
__all__ = [
'get_user_agent_distroseries',
'get_plural_text',
diff --git a/lib/lp/services/command_spawner.py b/lib/lp/services/command_spawner.py
index 98bcc1d..f2b34c8 100644
--- a/lib/lp/services/command_spawner.py
+++ b/lib/lp/services/command_spawner.py
@@ -3,7 +3,6 @@
"""Execute commands in parallel sub-processes."""
-__metaclass__ = type
__all__ = [
'CommandSpawner',
'OutputLineHandler',
diff --git a/lib/lp/services/comments/browser/comment.py b/lib/lp/services/comments/browser/comment.py
index a7461db..e745444 100644
--- a/lib/lp/services/comments/browser/comment.py
+++ b/lib/lp/services/comments/browser/comment.py
@@ -1,8 +1,6 @@
# Copyright 2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = [
'download_body',
'MAX_RENDERABLE',
diff --git a/lib/lp/services/comments/browser/messagecomment.py b/lib/lp/services/comments/browser/messagecomment.py
index f388622..9824042 100644
--- a/lib/lp/services/comments/browser/messagecomment.py
+++ b/lib/lp/services/comments/browser/messagecomment.py
@@ -1,8 +1,6 @@
# Copyright 2009-2018 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = ['MessageComment']
diff --git a/lib/lp/services/comments/browser/tests/test_comment.py b/lib/lp/services/comments/browser/tests/test_comment.py
index 755d2ac..0d593bc 100644
--- a/lib/lp/services/comments/browser/tests/test_comment.py
+++ b/lib/lp/services/comments/browser/tests/test_comment.py
@@ -1,8 +1,6 @@
# Copyright 2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from lp.services.comments.browser.comment import CommentBodyDownloadView
from lp.services.webapp.servers import LaunchpadTestRequest
from lp.testing import (
diff --git a/lib/lp/services/comments/interfaces/conversation.py b/lib/lp/services/comments/interfaces/conversation.py
index 97a230a..a8bc146 100644
--- a/lib/lp/services/comments/interfaces/conversation.py
+++ b/lib/lp/services/comments/interfaces/conversation.py
@@ -3,7 +3,6 @@
"""Interfaces to do with conversations on Launchpad entities."""
-__metaclass__ = type
__all__ = [
'IComment',
'IConversation',
diff --git a/lib/lp/services/compat.py b/lib/lp/services/compat.py
index 835b123..f5ebfe2 100644
--- a/lib/lp/services/compat.py
+++ b/lib/lp/services/compat.py
@@ -6,7 +6,6 @@
Use this for things that six doesn't provide.
"""
-__metaclass__ = type
__all__ = [
'escape',
'message_as_bytes',
diff --git a/lib/lp/services/config/__init__.py b/lib/lp/services/config/__init__.py
index b045e11..27088df 100644
--- a/lib/lp/services/config/__init__.py
+++ b/lib/lp/services/config/__init__.py
@@ -8,9 +8,6 @@ The configuration section used is specified using the LPCONFIG
environment variable, and defaults to 'development'
'''
-__metaclass__ = type
-
-
import glob
import os
import random
diff --git a/lib/lp/services/config/fixture.py b/lib/lp/services/config/fixture.py
index 698ceea..1f4fc21 100644
--- a/lib/lp/services/config/fixture.py
+++ b/lib/lp/services/config/fixture.py
@@ -3,8 +3,6 @@
"""Fixtures related to configs."""
-__metaclass__ = type
-
__all__ = [
'ConfigFixture',
'ConfigMismatchError',
diff --git a/lib/lp/services/config/tests/__init__.py b/lib/lp/services/config/tests/__init__.py
index 471402c..221f3c0 100644
--- a/lib/lp/services/config/tests/__init__.py
+++ b/lib/lp/services/config/tests/__init__.py
@@ -1,4 +1,2 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-
-__metaclass__ = type
diff --git a/lib/lp/services/config/tests/test_config.py b/lib/lp/services/config/tests/test_config.py
index 2906e4b..61e90a6 100644
--- a/lib/lp/services/config/tests/test_config.py
+++ b/lib/lp/services/config/tests/test_config.py
@@ -4,9 +4,6 @@
# We know we are not using root and handlers.
"""Test lp.services.config."""
-
-__metaclass__ = type
-
from doctest import (
DocTestSuite,
ELLIPSIS,
diff --git a/lib/lp/services/config/tests/test_config_lookup.py b/lib/lp/services/config/tests/test_config_lookup.py
index ec4290c..9e32bcd 100644
--- a/lib/lp/services/config/tests/test_config_lookup.py
+++ b/lib/lp/services/config/tests/test_config_lookup.py
@@ -3,7 +3,6 @@
"""Test our mechanisms for locating which config file to use."""
-__metaclass__ = type
__all__ = []
import os
diff --git a/lib/lp/services/config/tests/test_database_config.py b/lib/lp/services/config/tests/test_database_config.py
index d4261b6..791c1ff 100644
--- a/lib/lp/services/config/tests/test_database_config.py
+++ b/lib/lp/services/config/tests/test_database_config.py
@@ -1,8 +1,6 @@
# Copyright 2010-2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from lp.services.config import DatabaseConfig
from lp.services.propertycache import get_property_cache
from lp.testing import TestCase
diff --git a/lib/lp/services/config/tests/test_fixture.py b/lib/lp/services/config/tests/test_fixture.py
index 5f27e47..f83acc9 100644
--- a/lib/lp/services/config/tests/test_fixture.py
+++ b/lib/lp/services/config/tests/test_fixture.py
@@ -3,8 +3,6 @@
"""Tests of the config fixtures."""
-__metaclass__ = type
-
import os.path
from textwrap import dedent
diff --git a/lib/lp/services/crypto/interfaces.py b/lib/lp/services/crypto/interfaces.py
index f7bcb80..ea251ec 100644
--- a/lib/lp/services/crypto/interfaces.py
+++ b/lib/lp/services/crypto/interfaces.py
@@ -3,7 +3,6 @@
"""Interface to data encrypted at rest using configured keys."""
-__metaclass__ = type
__all__ = [
'CryptoError',
'IEncryptedContainer',
diff --git a/lib/lp/services/crypto/model.py b/lib/lp/services/crypto/model.py
index a7dc377..3202656 100644
--- a/lib/lp/services/crypto/model.py
+++ b/lib/lp/services/crypto/model.py
@@ -3,7 +3,6 @@
"""A container for data encrypted at rest using configured keys."""
-__metaclass__ = type
__all__ = [
'NaClEncryptedContainerBase',
]
diff --git a/lib/lp/services/crypto/scripts/generatekeypair.py b/lib/lp/services/crypto/scripts/generatekeypair.py
index 6420358..fa8e57a 100644
--- a/lib/lp/services/crypto/scripts/generatekeypair.py
+++ b/lib/lp/services/crypto/scripts/generatekeypair.py
@@ -8,7 +8,6 @@ in Launchpad configuration files. The private key should only be stored in
secret overlays on systems that need it.
"""
-__metaclass__ = type
__all__ = ['main']
import argparse
diff --git a/lib/lp/services/crypto/scripts/tests/test_generatekeypair.py b/lib/lp/services/crypto/scripts/tests/test_generatekeypair.py
index ae7f443..6c322f3 100644
--- a/lib/lp/services/crypto/scripts/tests/test_generatekeypair.py
+++ b/lib/lp/services/crypto/scripts/tests/test_generatekeypair.py
@@ -3,8 +3,6 @@
"""Test the script to generate a NaCl key pair."""
-__metaclass__ = type
-
import base64
from fixtures import MockPatch
diff --git a/lib/lp/services/crypto/tests/test_model.py b/lib/lp/services/crypto/tests/test_model.py
index c7843c0..3368797 100644
--- a/lib/lp/services/crypto/tests/test_model.py
+++ b/lib/lp/services/crypto/tests/test_model.py
@@ -3,8 +3,6 @@
"""Tests for encrypted data containers."""
-__metaclass__ = type
-
from nacl.public import PrivateKey
from lp.services.crypto.interfaces import CryptoError
diff --git a/lib/lp/services/daemons/readyservice.py b/lib/lp/services/daemons/readyservice.py
index 0468bd0..67af435 100644
--- a/lib/lp/services/daemons/readyservice.py
+++ b/lib/lp/services/daemons/readyservice.py
@@ -8,8 +8,6 @@ any Launchpad code, and any new external dependencies need coordination
with the launchpad-buildd deployment.
"""
-__metaclass__ = type
-
__all__ = [
'ReadyService',
]
diff --git a/lib/lp/services/daemons/tachandler.py b/lib/lp/services/daemons/tachandler.py
index 4175b69..4ab805e 100644
--- a/lib/lp/services/daemons/tachandler.py
+++ b/lib/lp/services/daemons/tachandler.py
@@ -3,8 +3,6 @@
"""Test harness for TAC (Twisted Application Configuration) files."""
-__metaclass__ = type
-
__all__ = [
'TacTestSetup',
'TacException',
diff --git a/lib/lp/services/daemons/tests/cannotlisten.tac b/lib/lp/services/daemons/tests/cannotlisten.tac
index f653bc6..3904cbc 100644
--- a/lib/lp/services/daemons/tests/cannotlisten.tac
+++ b/lib/lp/services/daemons/tests/cannotlisten.tac
@@ -6,8 +6,6 @@ This TAC is used for the TacTestSetupTestCase.test_couldNotListenTac test case
in test_tachandler.py. It fails with a CannotListenError.
"""
-__metaclass__ = type
-
from twisted.application import (
internet,
service,
diff --git a/lib/lp/services/daemons/tests/okay.tac b/lib/lp/services/daemons/tests/okay.tac
index 9009ebd..fe940cc 100644
--- a/lib/lp/services/daemons/tests/okay.tac
+++ b/lib/lp/services/daemons/tests/okay.tac
@@ -6,8 +6,6 @@ This TAC is used for the TacTestSetupTestCase.test_pidForNotRunningProcess
test case in test_tachandler.py. It simply starts up correctly.
"""
-__metaclass__ = type
-
from twisted.application import service
from zope.component import getUtility
diff --git a/lib/lp/services/daemons/tests/test_tachandler.py b/lib/lp/services/daemons/tests/test_tachandler.py
index 5e275f6..d9cfb23 100644
--- a/lib/lp/services/daemons/tests/test_tachandler.py
+++ b/lib/lp/services/daemons/tests/test_tachandler.py
@@ -3,8 +3,6 @@
"""Tests for lp.services.daemons.tachandler"""
-__metaclass__ = type
-
from os.path import (
dirname,
exists,
diff --git a/lib/lp/services/database/__init__.py b/lib/lp/services/database/__init__.py
index 3bbca06..af113c6 100644
--- a/lib/lp/services/database/__init__.py
+++ b/lib/lp/services/database/__init__.py
@@ -3,7 +3,6 @@
"""The lp.services.database package."""
-__metaclass__ = type
__all__ = [
'activity_cols',
'read_transaction',
diff --git a/lib/lp/services/database/bulk.py b/lib/lp/services/database/bulk.py
index 68285fc..8fdf3a2 100644
--- a/lib/lp/services/database/bulk.py
+++ b/lib/lp/services/database/bulk.py
@@ -3,7 +3,6 @@
"""Optimized bulk operations against the database."""
-__metaclass__ = type
__all__ = [
'create',
'dbify_value',
diff --git a/lib/lp/services/database/collection.py b/lib/lp/services/database/collection.py
index 2c225db..94a1b5b 100644
--- a/lib/lp/services/database/collection.py
+++ b/lib/lp/services/database/collection.py
@@ -3,7 +3,6 @@
"""A generic collection of database objects."""
-__metaclass__ = type
__all__ = [
'Collection',
]
diff --git a/lib/lp/services/database/decoratedresultset.py b/lib/lp/services/database/decoratedresultset.py
index fed8dc4..b31e1f8 100644
--- a/lib/lp/services/database/decoratedresultset.py
+++ b/lib/lp/services/database/decoratedresultset.py
@@ -1,7 +1,6 @@
# Copyright 2009-2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'DecoratedResultSet',
]
diff --git a/lib/lp/services/database/enumcol.py b/lib/lp/services/database/enumcol.py
index d184733..3360ebe 100644
--- a/lib/lp/services/database/enumcol.py
+++ b/lib/lp/services/database/enumcol.py
@@ -1,8 +1,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from lazr.enum import (
DBEnumeratedType,
DBItem,
diff --git a/lib/lp/services/database/interfaces.py b/lib/lp/services/database/interfaces.py
index 31f304b..c9709ef 100644
--- a/lib/lp/services/database/interfaces.py
+++ b/lib/lp/services/database/interfaces.py
@@ -1,7 +1,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'DEFAULT_FLAVOR',
'DisallowedStore',
diff --git a/lib/lp/services/database/isolation.py b/lib/lp/services/database/isolation.py
index 45a6598..dfbde85 100644
--- a/lib/lp/services/database/isolation.py
+++ b/lib/lp/services/database/isolation.py
@@ -3,7 +3,6 @@
"""Ensure that some operations happen outside of transactions."""
-__metaclass__ = type
__all__ = [
'check_no_transaction',
'ensure_no_transaction',
diff --git a/lib/lp/services/database/locking.py b/lib/lp/services/database/locking.py
index 3f1c478..b1ed93d 100644
--- a/lib/lp/services/database/locking.py
+++ b/lib/lp/services/database/locking.py
@@ -1,8 +1,6 @@
# Copyright 2011-2021 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = [
'AdvisoryLockHeld',
'LockType',
diff --git a/lib/lp/services/database/multitablecopy.py b/lib/lp/services/database/multitablecopy.py
index 561ed28..a79e8ca 100644
--- a/lib/lp/services/database/multitablecopy.py
+++ b/lib/lp/services/database/multitablecopy.py
@@ -1,8 +1,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
__all__ = ['MultiTableCopy']
import logging
diff --git a/lib/lp/services/database/namedrow.py b/lib/lp/services/database/namedrow.py
index 55d8ef2..3f40183 100644
--- a/lib/lp/services/database/namedrow.py
+++ b/lib/lp/services/database/namedrow.py
@@ -3,7 +3,6 @@
"""Convert the tuples returned by Cursor.fetchall() into namedtuples."""
-__metaclass__ = type
__all__ = []
from collections import namedtuple
diff --git a/lib/lp/services/database/nl_search.py b/lib/lp/services/database/nl_search.py
index be9a9dd..a4fbdf0 100644
--- a/lib/lp/services/database/nl_search.py
+++ b/lib/lp/services/database/nl_search.py
@@ -5,8 +5,6 @@
full text index.
"""
-__metaclass__ = type
-
__all__ = ['nl_phrase_search']
import re
diff --git a/lib/lp/services/database/policy.py b/lib/lp/services/database/policy.py
index 691baf4..803d4bc 100644
--- a/lib/lp/services/database/policy.py
+++ b/lib/lp/services/database/policy.py
@@ -3,7 +3,6 @@
"""Launchpad database policies."""
-__metaclass__ = type
__all__ = [
'BaseDatabasePolicy',
'DatabaseBlockedPolicy',
diff --git a/lib/lp/services/database/postgresql.py b/lib/lp/services/database/postgresql.py
index d36c374..9d3faaf 100644
--- a/lib/lp/services/database/postgresql.py
+++ b/lib/lp/services/database/postgresql.py
@@ -6,8 +6,6 @@ PostgreSQL specific helper functions, such as database introspection
and table manipulation
"""
-__metaclass__ = type
-
import re
import six
diff --git a/lib/lp/services/database/sort_sql.py b/lib/lp/services/database/sort_sql.py
index a981423..bc480ce 100644
--- a/lib/lp/services/database/sort_sql.py
+++ b/lib/lp/services/database/sort_sql.py
@@ -7,8 +7,6 @@ This library provides functions for the script sort_sql.py, which resides in
database/schema/.
"""
-__metaclass__ = type
-
import re
diff --git a/lib/lp/services/database/sqlbase.py b/lib/lp/services/database/sqlbase.py
index 7757749..f8ba318 100644
--- a/lib/lp/services/database/sqlbase.py
+++ b/lib/lp/services/database/sqlbase.py
@@ -1,7 +1,6 @@
# Copyright 2009-2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'block_implicit_flushes',
'clear_current_connection_cache',
diff --git a/lib/lp/services/database/stormbase.py b/lib/lp/services/database/stormbase.py
index 29888ed..20ed118 100644
--- a/lib/lp/services/database/stormbase.py
+++ b/lib/lp/services/database/stormbase.py
@@ -1,7 +1,6 @@
# Copyright 2011-2021 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'StormBase',
]
diff --git a/lib/lp/services/database/stormexpr.py b/lib/lp/services/database/stormexpr.py
index fd66a6e..c40171d 100644
--- a/lib/lp/services/database/stormexpr.py
+++ b/lib/lp/services/database/stormexpr.py
@@ -1,7 +1,6 @@
# Copyright 2011-2021 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
__all__ = [
'AdvisoryUnlock',
'Array',
diff --git a/lib/lp/services/database/tests/__init__.py b/lib/lp/services/database/tests/__init__.py
index 50a7743..cda2ee4 100644
--- a/lib/lp/services/database/tests/__init__.py
+++ b/lib/lp/services/database/tests/__init__.py
@@ -3,5 +3,4 @@
"""The lp.services.database.tests package."""
-__metaclass__ = type
__all__ = []
diff --git a/lib/lp/services/database/tests/enumeration.py b/lib/lp/services/database/tests/enumeration.py
index b8217ae..8761b50 100644
--- a/lib/lp/services/database/tests/enumeration.py
+++ b/lib/lp/services/database/tests/enumeration.py
@@ -3,7 +3,6 @@
"""Test enumerations used for enumcol doctests."""
-__metaclass__ = type
__all__ = [
'DBTestEnumeration',
'InheritedTestEnumeration',
diff --git a/lib/lp/services/database/tests/script_isolation.py b/lib/lp/services/database/tests/script_isolation.py
index dd02ff0..fa46ffb 100644
--- a/lib/lp/services/database/tests/script_isolation.py
+++ b/lib/lp/services/database/tests/script_isolation.py
@@ -5,7 +5,6 @@
settings work. Note we need to use a non-default isolation level to
confirm that the changes are actually being made by the API calls."""
-__metaclass__ = type
__all__ = []
import transaction
diff --git a/lib/lp/services/database/tests/test_bulk.py b/lib/lp/services/database/tests/test_bulk.py
index 1c93654..aa3a30c 100644
--- a/lib/lp/services/database/tests/test_bulk.py
+++ b/lib/lp/services/database/tests/test_bulk.py
@@ -3,8 +3,6 @@
"""Test the bulk database functions."""
-__metaclass__ = type
-
import datetime
from pytz import UTC
diff --git a/lib/lp/services/database/tests/test_collection.py b/lib/lp/services/database/tests/test_collection.py
index 6049ed0..5be65aa 100644
--- a/lib/lp/services/database/tests/test_collection.py
+++ b/lib/lp/services/database/tests/test_collection.py
@@ -3,8 +3,6 @@
"""Tests for `Collection`."""
-__metaclass__ = type
-
from storm.locals import Int
from lp.registry.model.person import Person
diff --git a/lib/lp/services/database/tests/test_decoratedresultset.py b/lib/lp/services/database/tests/test_decoratedresultset.py
index 5b2b400..9516230 100644
--- a/lib/lp/services/database/tests/test_decoratedresultset.py
+++ b/lib/lp/services/database/tests/test_decoratedresultset.py
@@ -3,8 +3,6 @@
"""Test harness for running decoratedresultset.txt."""
-__metaclass__ = type
-
__all__ = []
import unittest
diff --git a/lib/lp/services/database/tests/test_indexes.py b/lib/lp/services/database/tests/test_indexes.py
index 1d1e8c1..086bb8e 100644
--- a/lib/lp/services/database/tests/test_indexes.py
+++ b/lib/lp/services/database/tests/test_indexes.py
@@ -3,8 +3,6 @@
"""Test database index correctness."""
-__metaclass__ = type
-
from testscenarios import (
load_tests_apply_scenarios,
WithScenarios,
diff --git a/lib/lp/services/database/tests/test_isolation.py b/lib/lp/services/database/tests/test_isolation.py
index f73f684..552a13f 100644
--- a/lib/lp/services/database/tests/test_isolation.py
+++ b/lib/lp/services/database/tests/test_isolation.py
@@ -3,8 +3,6 @@
"""Tests of the isolation module."""
-__metaclass__ = type
-
from psycopg2.extensions import TRANSACTION_STATUS_IDLE
import six
from storm.zope.interfaces import IZStorm
diff --git a/lib/lp/services/database/tests/test_isolation_changes.py b/lib/lp/services/database/tests/test_isolation_changes.py
index 783ab31..6cfefdb 100644
--- a/lib/lp/services/database/tests/test_isolation_changes.py
+++ b/lib/lp/services/database/tests/test_isolation_changes.py
@@ -3,7 +3,6 @@
"""Tests confirming that changing isolation levels does what we expect."""
-__metaclass__ = type
__all__ = []
import os.path
diff --git a/lib/lp/services/database/tests/test_postgresql.py b/lib/lp/services/database/tests/test_postgresql.py
index 410801e..7e4c5c7 100644
--- a/lib/lp/services/database/tests/test_postgresql.py
+++ b/lib/lp/services/database/tests/test_postgresql.py
@@ -1,8 +1,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from doctest import DocTestSuite
from lp.testing.layers import BaseLayer
diff --git a/lib/lp/services/database/tests/test_rundoctests.py b/lib/lp/services/database/tests/test_rundoctests.py
index 9352d34..f46a5a6 100644
--- a/lib/lp/services/database/tests/test_rundoctests.py
+++ b/lib/lp/services/database/tests/test_rundoctests.py
@@ -1,8 +1,6 @@
# Copyright 2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-__metaclass__ = type
-
from doctest import DocTestSuite
import unittest
diff --git a/lib/lp/services/database/tests/test_storm.py b/lib/lp/services/database/tests/test_storm.py
index c619589..4cee575 100644
--- a/lib/lp/services/database/tests/test_storm.py
+++ b/lib/lp/services/database/tests/test_storm.py
@@ -3,8 +3,6 @@
"""Launchpad specific tests of Storm behaviour."""
-__metaclass__ = type
-
import storm
from lp.testing import TestCase
diff --git a/lib/lp/services/database/tests/test_stormbase.py b/lib/lp/services/database/tests/test_stormbase.py
index 711c274..6328abd 100644
--- a/lib/lp/services/database/tests/test_stormbase.py
+++ b/lib/lp/services/database/tests/test_stormbase.py
@@ -3,8 +3,6 @@
"""StormBase tests."""
-__metaclass__ = type
-
from storm.locals import Int
import transaction
from zope.component import getUtility
diff --git a/lib/lp/services/database/tests/test_transaction_policy.py b/lib/lp/services/database/tests/test_transaction_policy.py
index b7afe32..7122ccf 100644
--- a/lib/lp/services/database/tests/test_transaction_policy.py
+++ b/lib/lp/services/database/tests/test_transaction_policy.py
@@ -3,8 +3,6 @@
"""Test `TransactionPolicy`."""
-__metaclass__ = type
-
from psycopg2 import InternalError
import transaction
diff --git a/lib/lp/services/database/transaction_policy.py b/lib/lp/services/database/transaction_policy.py
index c4cdd0c..bb1b403 100644
--- a/lib/lp/services/database/transaction_policy.py
+++ b/lib/lp/services/database/transaction_policy.py
@@ -3,7 +3,6 @@
"""Policy for database transactions."""
-__metaclass__ = type
__all__ = [
'DatabaseTransactionPolicy',
]
diff --git a/lib/lp/services/encoding.py b/lib/lp/services/encoding.py
index aa5f74e..678df8d 100644
--- a/lib/lp/services/encoding.py
+++ b/lib/lp/services/encoding.py
@@ -7,7 +7,6 @@
"""Character encoding utilities"""
-__metaclass__ = type
__all__ = [
'escape_nonascii_uniquely',
'guess',
diff --git a/lib/lp/services/features/browser/changelog.py b/lib/lp/services/features/browser/changelog.py
index a0082ae..ddeb90b 100644
--- a/lib/lp/services/features/browser/changelog.py
+++ b/lib/lp/services/features/browser/changelog.py
@@ -7,8 +7,6 @@ __all__ = [
'ChangeLog',
]
-__metaclass__ = type
-
from lp.services.features.changelog import ChangeLog
from lp.services.webapp.batching import BatchNavigator
from lp.services.webapp.publisher import LaunchpadView
diff --git a/lib/lp/services/features/browser/edit.py b/lib/lp/services/features/browser/edit.py
index eacce88..29e8ae0 100644
--- a/lib/lp/services/features/browser/edit.py
+++ b/lib/lp/services/features/browser/edit.py
@@ -3,7 +3,6 @@
"""View and edit feature rules."""
-__metaclass__ = type
__all__ = [
'FeatureControlView',
'IFeatureControlForm',
diff --git a/lib/lp/services/features/browser/info.py b/lib/lp/services/features/browser/