launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #27334
[Merge] ~cjwatson/launchpad:it-is-the-future into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:it-is-the-future into launchpad:master.
Commit message:
Remove __future__ imports
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/406551
With this commit, Launchpad stops working on Python 2.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:it-is-the-future into launchpad:master.
diff --git a/database/replication/helpers.py b/database/replication/helpers.py
index 8f8adf6..80c33c9 100644
--- a/database/replication/helpers.py
+++ b/database/replication/helpers.py
@@ -3,8 +3,6 @@
"""Common helpers for replication scripts."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = []
diff --git a/database/replication/preamble.py b/database/replication/preamble.py
index 249b0a4..095386f 100755
--- a/database/replication/preamble.py
+++ b/database/replication/preamble.py
@@ -6,8 +6,6 @@
"""Generate a preamble for slonik(1) scripts based on the current LPCONFIG.
"""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = []
diff --git a/database/replication/walblock.py b/database/replication/walblock.py
index 8e0327a..0e2b5a9 100755
--- a/database/replication/walblock.py
+++ b/database/replication/walblock.py
@@ -5,8 +5,6 @@
"""Feed stdin to stdout, blocking if there are too many unshipped WAL files."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = []
diff --git a/database/schema/emptytables.py b/database/schema/emptytables.py
index 3605910..83366b6 100755
--- a/database/schema/emptytables.py
+++ b/database/schema/emptytables.py
@@ -5,8 +5,6 @@
"""List empty database tables."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
import _pythonpath # noqa: F401
diff --git a/database/schema/fti.py b/database/schema/fti.py
index 1835249..6e9c66c 100755
--- a/database/schema/fti.py
+++ b/database/schema/fti.py
@@ -8,8 +8,6 @@
Add full text indexes to the launchpad database
"""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
import _pythonpath # noqa: F401
diff --git a/database/schema/online_fti_updater.py b/database/schema/online_fti_updater.py
index effbdb0..9e0c8f8 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.
"""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
import _pythonpath # noqa: F401
diff --git a/lib/contrib/glock.py b/lib/contrib/glock.py
index 2925be1..de39d12 100644
--- a/lib/contrib/glock.py
+++ b/lib/contrib/glock.py
@@ -21,8 +21,6 @@ Unix.
@see: class L{GlobalLock} for more details.
'''
-from __future__ import absolute_import, print_function
-
__version__ = '0.2.' + '$Revision: #5 $'[12:-2]
__author__ = 'Richard Gruet', 'rjgruet@xxxxxxxxx'
__date__ = '$Date: 2005/06/19 $'[7:-2], '$Author: rgruet $'[9:-2]
diff --git a/lib/devscripts/sourcecode.py b/lib/devscripts/sourcecode.py
index d1d269f..f9fe0fe 100644
--- a/lib/devscripts/sourcecode.py
+++ b/lib/devscripts/sourcecode.py
@@ -3,8 +3,6 @@
"""Tools for maintaining the Launchpad source code."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = [
'interpret_config',
diff --git a/lib/devscripts/tests/test_sourcecode.py b/lib/devscripts/tests/test_sourcecode.py
index 6b538c7..e06377a 100644
--- a/lib/devscripts/tests/test_sourcecode.py
+++ b/lib/devscripts/tests/test_sourcecode.py
@@ -3,8 +3,6 @@
"""Module docstring goes here."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
import os
diff --git a/lib/launchpad_loggerhead/revision.py b/lib/launchpad_loggerhead/revision.py
index 81c1937..094b470 100644
--- a/lib/launchpad_loggerhead/revision.py
+++ b/lib/launchpad_loggerhead/revision.py
@@ -3,8 +3,6 @@
"""WSGI Middleware to add Launchpad revision headers to loggerhead."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = ['RevisionHeaderHandler']
diff --git a/lib/launchpad_loggerhead/testing.py b/lib/launchpad_loggerhead/testing.py
index 2266fab..3254107 100644
--- a/lib/launchpad_loggerhead/testing.py
+++ b/lib/launchpad_loggerhead/testing.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'LoggerheadFixture',
diff --git a/lib/launchpad_loggerhead/wsgi.py b/lib/launchpad_loggerhead/wsgi.py
index d10c7eb..5d1463b 100644
--- a/lib/launchpad_loggerhead/wsgi.py
+++ b/lib/launchpad_loggerhead/wsgi.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'LoggerheadApplication',
diff --git a/lib/lp/answers/browser/tests/test_breadcrumbs.py b/lib/lp/answers/browser/tests/test_breadcrumbs.py
index 9bf76da..675fe2d 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lp.services.webapp.publisher import canonical_url
diff --git a/lib/lp/answers/browser/tests/test_menus.py b/lib/lp/answers/browser/tests/test_menus.py
index 0bfc9db..ff4a4d6 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.component import getUtility
diff --git a/lib/lp/answers/browser/tests/test_question.py b/lib/lp/answers/browser/tests/test_question.py
index 59da09f..5f2209a 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = []
diff --git a/lib/lp/answers/browser/tests/test_questionmessages.py b/lib/lp/answers/browser/tests/test_questionmessages.py
index cc1b472..0e49240 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.component import getUtility
diff --git a/lib/lp/answers/browser/tests/test_questionsubscription_views.py b/lib/lp/answers/browser/tests/test_questionsubscription_views.py
index 0bea4d0..aa738e5 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import json
diff --git a/lib/lp/answers/browser/tests/test_questiontarget.py b/lib/lp/answers/browser/tests/test_questiontarget.py
index 241a1a8..a1b29e8 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import json
diff --git a/lib/lp/answers/browser/tests/test_views.py b/lib/lp/answers/browser/tests/test_views.py
index 1008af7..c7affee 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = []
diff --git a/lib/lp/answers/model/questionsubscription.py b/lib/lp/answers/model/questionsubscription.py
index 60b40d2..8442f8d 100644
--- a/lib/lp/answers/model/questionsubscription.py
+++ b/lib/lp/answers/model/questionsubscription.py
@@ -3,8 +3,6 @@
"""StormBase implementation of IQuestionSubscription."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = ['QuestionSubscription']
diff --git a/lib/lp/answers/model/tests/test_question.py b/lib/lp/answers/model/tests/test_question.py
index 28a19da..28e980f 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/answers/model/tests/test_questionsubscription.py b/lib/lp/answers/model/tests/test_questionsubscription.py
index 27a8a7d..1275905 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.."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.component import getUtility
diff --git a/lib/lp/answers/testing.py b/lib/lp/answers/testing.py
index 2a76ad6..f6360b3 100644
--- a/lib/lp/answers/testing.py
+++ b/lib/lp/answers/testing.py
@@ -3,8 +3,6 @@
"""Helper functions for Answer Tracker tests."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'QuestionFactory',
diff --git a/lib/lp/answers/tests/test_doc.py b/lib/lp/answers/tests/test_doc.py
index 5c4ef5a..5f7083d 100644
--- a/lib/lp/answers/tests/test_doc.py
+++ b/lib/lp/answers/tests/test_doc.py
@@ -5,8 +5,6 @@
Run the doctests and pagetests.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
import os
import unittest
diff --git a/lib/lp/answers/tests/test_faq.py b/lib/lp/answers/tests/test_faq.py
index 138f3ca..20eea11 100644
--- a/lib/lp/answers/tests/test_faq.py
+++ b/lib/lp/answers/tests/test_faq.py
@@ -3,8 +3,6 @@
"""Tests for IFAQ"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import transaction
diff --git a/lib/lp/answers/tests/test_faq_webservice.py b/lib/lp/answers/tests/test_faq_webservice.py
index 33ad24b..969af27 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from testtools.matchers import (
diff --git a/lib/lp/answers/tests/test_faqtarget.py b/lib/lp/answers/tests/test_faqtarget.py
index a469530..9d52303 100644
--- a/lib/lp/answers/tests/test_faqtarget.py
+++ b/lib/lp/answers/tests/test_faqtarget.py
@@ -3,8 +3,6 @@
"""Tests for IFAQTarget"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.component import getUtility
diff --git a/lib/lp/answers/tests/test_publisher.py b/lib/lp/answers/tests/test_publisher.py
index d68263e..8acc360 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import io
diff --git a/lib/lp/answers/tests/test_question.py b/lib/lp/answers/tests/test_question.py
index 1cc62bf..d81870f 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from testtools.testcase import ExpectedException
diff --git a/lib/lp/answers/tests/test_question_notifications.py b/lib/lp/answers/tests/test_question_notifications.py
index 1ac77ee..200d39a 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
diff --git a/lib/lp/answers/tests/test_question_webservice.py b/lib/lp/answers/tests/test_question_webservice.py
index 4c1333d..b4d0662 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/answers/tests/test_question_workflow.py b/lib/lp/answers/tests/test_question_workflow.py
index 66fa81b..d458f68 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.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = []
diff --git a/lib/lp/answers/tests/test_questionjob.py b/lib/lp/answers/tests/test_questionjob.py
index aa21aad..f1ebac6 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from testtools.content import text_content
diff --git a/lib/lp/answers/tests/test_questiontarget.py b/lib/lp/answers/tests/test_questiontarget.py
index d2ea79f..89c2c9b 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = []
diff --git a/lib/lp/answers/tests/test_vocabulary.py b/lib/lp/answers/tests/test_vocabulary.py
index 6841e8d..84d3c6f 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lp.answers.vocabulary import (
diff --git a/lib/lp/app/browser/stringformatter.py b/lib/lp/app/browser/stringformatter.py
index 8fa5a2b..d77cf50 100644
--- a/lib/lp/app/browser/stringformatter.py
+++ b/lib/lp/app/browser/stringformatter.py
@@ -3,8 +3,6 @@
"""TALES formatter for strings."""
-from __future__ import division
-
__metaclass__ = type
__all__ = [
'add_word_breaks',
diff --git a/lib/lp/app/browser/tales.py b/lib/lp/app/browser/tales.py
index 1bf84aa..37c55de 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."""
-from __future__ import division
-
__metaclass__ = type
from bisect import bisect
diff --git a/lib/lp/app/browser/tests/test_views.py b/lib/lp/app/browser/tests/test_views.py
index d0d8967..c3e8615 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import logging
diff --git a/lib/lp/app/validators/__init__.py b/lib/lp/app/validators/__init__.py
index 99b112b..70d9ab7 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
"""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
from zope.formlib.exception import (
diff --git a/lib/lp/app/validators/attachment.py b/lib/lp/app/validators/attachment.py
index 0056c53..a998673 100644
--- a/lib/lp/app/validators/attachment.py
+++ b/lib/lp/app/validators/attachment.py
@@ -3,8 +3,6 @@
"""Validators for attachments."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = ['attachment_size_constraint']
diff --git a/lib/lp/app/validators/cve.py b/lib/lp/app/validators/cve.py
index 0a0407b..93c4f35 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).
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
import re
diff --git a/lib/lp/app/validators/email.py b/lib/lp/app/validators/email.py
index 04d02dc..04599f8 100644
--- a/lib/lp/app/validators/email.py
+++ b/lib/lp/app/validators/email.py
@@ -3,8 +3,6 @@
"""EmailAdress validator"""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
import re
diff --git a/lib/lp/app/validators/name.py b/lib/lp/app/validators/name.py
index e0b16b2..5b2575f 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.)"""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
import re
diff --git a/lib/lp/app/validators/path.py b/lib/lp/app/validators/path.py
index 13e0b06..92fc3c6 100644
--- a/lib/lp/app/validators/path.py
+++ b/lib/lp/app/validators/path.py
@@ -3,8 +3,6 @@
"""Validators for paths and path functions."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'path_does_not_escape'
diff --git a/lib/lp/app/validators/tests/test_path.py b/lib/lp/app/validators/tests/test_path.py
index 24501a8..af03fde 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lp.app.validators import LaunchpadValidationError
diff --git a/lib/lp/app/validators/tests/test_validation.py b/lib/lp/app/validators/tests/test_validation.py
index 3cd87d9..83736e8 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"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lp.app.validators.validation import validate_oci_branch_name
diff --git a/lib/lp/app/validators/url.py b/lib/lp/app/validators/url.py
index bf4d998..8df0a18 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).
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = [
diff --git a/lib/lp/app/validators/username.py b/lib/lp/app/validators/username.py
index 40d69da..acfe874 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."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
import re
diff --git a/lib/lp/app/validators/validation.py b/lib/lp/app/validators/validation.py
index 7ff8ad4..1ddbf6c 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).
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = [
diff --git a/lib/lp/app/validators/version.py b/lib/lp/app/validators/version.py
index 3f7d163..170b869 100644
--- a/lib/lp/app/validators/version.py
+++ b/lib/lp/app/validators/version.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).
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
diff --git a/lib/lp/app/widgets/tests/test_launchpadtarget.py b/lib/lp/app/widgets/tests/test_launchpadtarget.py
index 13030cd..dca46dc 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import re
diff --git a/lib/lp/archivepublisher/meta_data.py b/lib/lp/archivepublisher/meta_data.py
index 7cee6cd..f18b984 100644
--- a/lib/lp/archivepublisher/meta_data.py
+++ b/lib/lp/archivepublisher/meta_data.py
@@ -3,8 +3,6 @@
"""Processing of archive meta-data uploads."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
"MetaDataUpload",
diff --git a/lib/lp/archivepublisher/run_parts.py b/lib/lp/archivepublisher/run_parts.py
index db37847..21b5569 100644
--- a/lib/lp/archivepublisher/run_parts.py
+++ b/lib/lp/archivepublisher/run_parts.py
@@ -3,8 +3,6 @@
"""Publisher support for running programs from a plug-in directory."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'execute_subprocess',
diff --git a/lib/lp/archivepublisher/scripts/copy_signingkeys.py b/lib/lp/archivepublisher/scripts/copy_signingkeys.py
index 322b7d9..2c079e1 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
diff --git a/lib/lp/archivepublisher/scripts/sync_signingkeys.py b/lib/lp/archivepublisher/scripts/sync_signingkeys.py
index a56978e..68a22d9 100644
--- a/lib/lp/archivepublisher/scripts/sync_signingkeys.py
+++ b/lib/lp/archivepublisher/scripts/sync_signingkeys.py
@@ -3,8 +3,6 @@
"""Script to inject archive keys into signing service."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
diff --git a/lib/lp/archivepublisher/signing.py b/lib/lp/archivepublisher/signing.py
index 296e626..ec61b95 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.
"""
-from __future__ import print_function
-
__metaclass__ = type
__all__ = [
diff --git a/lib/lp/archivepublisher/static_translations.py b/lib/lp/archivepublisher/static_translations.py
index e5c18ea..ea2d159 100644
--- a/lib/lp/archivepublisher/static_translations.py
+++ b/lib/lp/archivepublisher/static_translations.py
@@ -3,8 +3,6 @@
"""Processing of static translations uploads."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
"StaticTranslationsUpload",
diff --git a/lib/lp/archivepublisher/tests/__init__.py b/lib/lp/archivepublisher/tests/__init__.py
index c370e6e..9d65b15 100644
--- a/lib/lp/archivepublisher/tests/__init__.py
+++ b/lib/lp/archivepublisher/tests/__init__.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
import os
diff --git a/lib/lp/archivepublisher/tests/test_archivegpgsigningkey.py b/lib/lp/archivepublisher/tests/test_archivegpgsigningkey.py
index e9e7ded..f32c124 100644
--- a/lib/lp/archivepublisher/tests/test_archivegpgsigningkey.py
+++ b/lib/lp/archivepublisher/tests/test_archivegpgsigningkey.py
@@ -3,8 +3,6 @@
"""Test ArchiveGPGSigningKey."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import os
diff --git a/lib/lp/archivepublisher/tests/test_config.py b/lib/lp/archivepublisher/tests/test_config.py
index 55ebba9..9c11b66 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.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import os
diff --git a/lib/lp/archivepublisher/tests/test_copy_signingkeys.py b/lib/lp/archivepublisher/tests/test_copy_signingkeys.py
index d4d943f..d164fba 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from testtools.content import text_content
diff --git a/lib/lp/archivepublisher/tests/test_customupload.py b/lib/lp/archivepublisher/tests/test_customupload.py
index b93111f..2a2f0d3 100644
--- a/lib/lp/archivepublisher/tests/test_customupload.py
+++ b/lib/lp/archivepublisher/tests/test_customupload.py
@@ -3,8 +3,6 @@
"""Tests for `CustomUploads`."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
diff --git a/lib/lp/archivepublisher/tests/test_ddtp_tarball.py b/lib/lp/archivepublisher/tests/test_ddtp_tarball.py
index 9c210b2..e90e59b 100644
--- a/lib/lp/archivepublisher/tests/test_ddtp_tarball.py
+++ b/lib/lp/archivepublisher/tests/test_ddtp_tarball.py
@@ -7,8 +7,6 @@ See also lp.soyuz.tests.test_distroseriesqueue_ddtp_tarball for high-level
tests of ddtp-tarball upload and queue manipulation.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
import os
import six
diff --git a/lib/lp/archivepublisher/tests/test_deathrow.py b/lib/lp/archivepublisher/tests/test_deathrow.py
index 2d9ca02..ea8427c 100644
--- a/lib/lp/archivepublisher/tests/test_deathrow.py
+++ b/lib/lp/archivepublisher/tests/test_deathrow.py
@@ -3,8 +3,6 @@
"""Tests for deathrow class."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
diff --git a/lib/lp/archivepublisher/tests/test_debian_installer.py b/lib/lp/archivepublisher/tests/test_debian_installer.py
index 3eecee3..6ddf57a 100644
--- a/lib/lp/archivepublisher/tests/test_debian_installer.py
+++ b/lib/lp/archivepublisher/tests/test_debian_installer.py
@@ -7,8 +7,6 @@ See also lp.soyuz.tests.test_distroseriesqueue_debian_installer for
high-level tests of debian-installer upload and queue manipulation.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
import os
from textwrap import dedent
diff --git a/lib/lp/archivepublisher/tests/test_debversion.py b/lib/lp/archivepublisher/tests/test_debversion.py
index 3b96c77..304aa40 100644
--- a/lib/lp/archivepublisher/tests/test_debversion.py
+++ b/lib/lp/archivepublisher/tests/test_debversion.py
@@ -3,8 +3,6 @@
"""Tests for debversion."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
# These tests came from sourcerer.
diff --git a/lib/lp/archivepublisher/tests/test_dist_upgrader.py b/lib/lp/archivepublisher/tests/test_dist_upgrader.py
index 60e69d0..6f0bfbe 100644
--- a/lib/lp/archivepublisher/tests/test_dist_upgrader.py
+++ b/lib/lp/archivepublisher/tests/test_dist_upgrader.py
@@ -7,8 +7,6 @@ See also lp.soyuz.tests.test_distroseriesqueue_dist_upgrader for high-level
tests of dist-upgrader upload and queue manipulation.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
import os
from textwrap import dedent
diff --git a/lib/lp/archivepublisher/tests/test_dominator.py b/lib/lp/archivepublisher/tests/test_dominator.py
index c19f8b9..d76e542 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import datetime
diff --git a/lib/lp/archivepublisher/tests/test_ftparchive.py b/lib/lp/archivepublisher/tests/test_ftparchive.py
index 94b68fc..6a8fe26 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"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import difflib
diff --git a/lib/lp/archivepublisher/tests/test_generate_contents_files.py b/lib/lp/archivepublisher/tests/test_generate_contents_files.py
index a0d6967..a71f60c 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import hashlib
diff --git a/lib/lp/archivepublisher/tests/test_indices.py b/lib/lp/archivepublisher/tests/test_indices.py
index 3a39e58..52a0d75 100644
--- a/lib/lp/archivepublisher/tests/test_indices.py
+++ b/lib/lp/archivepublisher/tests/test_indices.py
@@ -3,8 +3,6 @@
"""Test native archive index generation for Soyuz."""
-from __future__ import absolute_import, print_function, unicode_literals
-
import os
import tempfile
import unittest
diff --git a/lib/lp/archivepublisher/tests/test_meta_data.py b/lib/lp/archivepublisher/tests/test_meta_data.py
index f79286b..1f09337 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import os
diff --git a/lib/lp/archivepublisher/tests/test_pool.py b/lib/lp/archivepublisher/tests/test_pool.py
index e56ef02..3c43ad6 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import hashlib
diff --git a/lib/lp/archivepublisher/tests/test_processaccepted.py b/lib/lp/archivepublisher/tests/test_processaccepted.py
index f945212..565d82b 100644
--- a/lib/lp/archivepublisher/tests/test_processaccepted.py
+++ b/lib/lp/archivepublisher/tests/test_processaccepted.py
@@ -3,8 +3,6 @@
"""Test process-accepted.py"""
-from __future__ import absolute_import, print_function, unicode_literals
-
from optparse import OptionValueError
from testtools.matchers import LessThan
diff --git a/lib/lp/archivepublisher/tests/test_processdeathrow.py b/lib/lp/archivepublisher/tests/test_processdeathrow.py
index 575f79a..a59381a 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.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import datetime
diff --git a/lib/lp/archivepublisher/tests/test_publish_ftpmaster.py b/lib/lp/archivepublisher/tests/test_publish_ftpmaster.py
index b9a82b7..2039856 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import logging
diff --git a/lib/lp/archivepublisher/tests/test_publishdistro.py b/lib/lp/archivepublisher/tests/test_publishdistro.py
index a260c71..41d81f4 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from optparse import OptionValueError
diff --git a/lib/lp/archivepublisher/tests/test_publisher.py b/lib/lp/archivepublisher/tests/test_publisher.py
index 0c8ff87..b0173cb 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import bz2
diff --git a/lib/lp/archivepublisher/tests/test_publisher_documentation.py b/lib/lp/archivepublisher/tests/test_publisher_documentation.py
index 1091cd1..a211eb8 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import logging
diff --git a/lib/lp/archivepublisher/tests/test_publisherconfig.py b/lib/lp/archivepublisher/tests/test_publisherconfig.py
index 023a287..63f652c 100644
--- a/lib/lp/archivepublisher/tests/test_publisherconfig.py
+++ b/lib/lp/archivepublisher/tests/test_publisherconfig.py
@@ -3,8 +3,6 @@
"""Tests for publisherConfig model class."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
diff --git a/lib/lp/archivepublisher/tests/test_repositoryindexfile.py b/lib/lp/archivepublisher/tests/test_repositoryindexfile.py
index 55808d2..b7ebac3 100644
--- a/lib/lp/archivepublisher/tests/test_repositoryindexfile.py
+++ b/lib/lp/archivepublisher/tests/test_repositoryindexfile.py
@@ -3,8 +3,6 @@
"""Tests for `RepositoryIndexFile`."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import bz2
diff --git a/lib/lp/archivepublisher/tests/test_rosetta_translations.py b/lib/lp/archivepublisher/tests/test_rosetta_translations.py
index 8812ef8..d90a471 100644
--- a/lib/lp/archivepublisher/tests/test_rosetta_translations.py
+++ b/lib/lp/archivepublisher/tests/test_rosetta_translations.py
@@ -7,8 +7,6 @@ See also lp.soyuz.tests.test_distroseriesqueue_rosetta_translations for
high-level tests of rosetta-translations upload and queue manipulation.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
from storm.expr import Desc
import transaction
from zope.component import getUtility
diff --git a/lib/lp/archivepublisher/tests/test_run_parts.py b/lib/lp/archivepublisher/tests/test_run_parts.py
index 2acf23a..b0753a3 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import os.path
diff --git a/lib/lp/archivepublisher/tests/test_signing.py b/lib/lp/archivepublisher/tests/test_signing.py
index e57ae72..f13ba3a 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import datetime
diff --git a/lib/lp/archivepublisher/tests/test_sync_signingkeys.py b/lib/lp/archivepublisher/tests/test_sync_signingkeys.py
index 8a8d758..24dd57f 100644
--- a/lib/lp/archivepublisher/tests/test_sync_signingkeys.py
+++ b/lib/lp/archivepublisher/tests/test_sync_signingkeys.py
@@ -7,8 +7,6 @@
"""Test cases for the script that injects signing keys into signing service."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'SyncSigningKeysScript',
diff --git a/lib/lp/archiveuploader/charmrecipeupload.py b/lib/lp/archiveuploader/charmrecipeupload.py
index a8d7dcf..d31e8f1 100644
--- a/lib/lp/archiveuploader/charmrecipeupload.py
+++ b/lib/lp/archiveuploader/charmrecipeupload.py
@@ -3,8 +3,6 @@
"""Process a charm recipe upload."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
"CharmRecipeUpload",
diff --git a/lib/lp/archiveuploader/ocirecipeupload.py b/lib/lp/archiveuploader/ocirecipeupload.py
index 3ace0da..cd99962 100644
--- a/lib/lp/archiveuploader/ocirecipeupload.py
+++ b/lib/lp/archiveuploader/ocirecipeupload.py
@@ -3,8 +3,6 @@
"""Upload OCI build artifacts to the librarian."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = ['OCIRecipeUpload']
diff --git a/lib/lp/archiveuploader/tests/__init__.py b/lib/lp/archiveuploader/tests/__init__.py
index e5abd8d..19a65f2 100644
--- a/lib/lp/archiveuploader/tests/__init__.py
+++ b/lib/lp/archiveuploader/tests/__init__.py
@@ -3,11 +3,6 @@
"""Tests for the archive uploader."""
-# XXX cjwatson 2018-05-03: We should use unicode_literals too, but this
-# requires a version of zope.configuration that includes
-# https://github.com/zopefoundation/zope.configuration/pull/19.
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = [
diff --git a/lib/lp/archiveuploader/tests/test_buildduploads.py b/lib/lp/archiveuploader/tests/test_buildduploads.py
index 87066dd..3b764d0 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import os
diff --git a/lib/lp/archiveuploader/tests/test_buildinfofile.py b/lib/lp/archiveuploader/tests/test_buildinfofile.py
index 59a1451..2724ab7 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from debian.deb822 import Changes
diff --git a/lib/lp/archiveuploader/tests/test_changesfile.py b/lib/lp/archiveuploader/tests/test_changesfile.py
index 8f76d23..4e1e318 100644
--- a/lib/lp/archiveuploader/tests/test_changesfile.py
+++ b/lib/lp/archiveuploader/tests/test_changesfile.py
@@ -3,8 +3,6 @@
"""Test ChangesFile functionality."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import os
diff --git a/lib/lp/archiveuploader/tests/test_charmrecipeupload.py b/lib/lp/archiveuploader/tests/test_charmrecipeupload.py
index 72c14be..da801c4 100644
--- a/lib/lp/archiveuploader/tests/test_charmrecipeupload.py
+++ b/lib/lp/archiveuploader/tests/test_charmrecipeupload.py
@@ -3,8 +3,6 @@
"""Tests for `CharmRecipeUpload`."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import os
diff --git a/lib/lp/archiveuploader/tests/test_dscfile.py b/lib/lp/archiveuploader/tests/test_dscfile.py
index 3414a40..64c0cbf 100644
--- a/lib/lp/archiveuploader/tests/test_dscfile.py
+++ b/lib/lp/archiveuploader/tests/test_dscfile.py
@@ -3,8 +3,6 @@
"""Test dscfile.py"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from collections import namedtuple
diff --git a/lib/lp/archiveuploader/tests/test_livefsupload.py b/lib/lp/archiveuploader/tests/test_livefsupload.py
index b794785..a54c08a 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import os
diff --git a/lib/lp/archiveuploader/tests/test_nascentupload.py b/lib/lp/archiveuploader/tests/test_nascentupload.py
index 821e7b4..a599a7b 100644
--- a/lib/lp/archiveuploader/tests/test_nascentupload.py
+++ b/lib/lp/archiveuploader/tests/test_nascentupload.py
@@ -3,8 +3,6 @@
"""Test NascentUpload functionality."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from testtools import TestCase
diff --git a/lib/lp/archiveuploader/tests/test_nascentupload_documentation.py b/lib/lp/archiveuploader/tests/test_nascentupload_documentation.py
index bc18b56..311b84e 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import os
diff --git a/lib/lp/archiveuploader/tests/test_nascentuploadfile.py b/lib/lp/archiveuploader/tests/test_nascentuploadfile.py
index b43d762..1d0df62 100644
--- a/lib/lp/archiveuploader/tests/test_nascentuploadfile.py
+++ b/lib/lp/archiveuploader/tests/test_nascentuploadfile.py
@@ -3,8 +3,6 @@
"""Test NascentUploadFile functionality."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from functools import partial
diff --git a/lib/lp/archiveuploader/tests/test_ocirecipeupload.py b/lib/lp/archiveuploader/tests/test_ocirecipeupload.py
index b36d2c6..8ec2be1 100644
--- a/lib/lp/archiveuploader/tests/test_ocirecipeupload.py
+++ b/lib/lp/archiveuploader/tests/test_ocirecipeupload.py
@@ -3,8 +3,6 @@
"""Tests for `OCIRecipeUpload`."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import json
diff --git a/lib/lp/archiveuploader/tests/test_ppauploadprocessor.py b/lib/lp/archiveuploader/tests/test_ppauploadprocessor.py
index 3c91839..7e79bf1 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from operator import itemgetter
diff --git a/lib/lp/archiveuploader/tests/test_private_maintainers.py b/lib/lp/archiveuploader/tests/test_private_maintainers.py
index f55f8ed..093aa00 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lp.archiveuploader.dscfile import SignableTagFile
diff --git a/lib/lp/archiveuploader/tests/test_processupload.py b/lib/lp/archiveuploader/tests/test_processupload.py
index cf941bb..29917b5 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import os
diff --git a/lib/lp/archiveuploader/tests/test_recipeuploads.py b/lib/lp/archiveuploader/tests/test_recipeuploads.py
index d064fda..a915fcf 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import os
diff --git a/lib/lp/archiveuploader/tests/test_snapupload.py b/lib/lp/archiveuploader/tests/test_snapupload.py
index 9791a35..ffb5997 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import os
diff --git a/lib/lp/archiveuploader/tests/test_sync_notification.py b/lib/lp/archiveuploader/tests/test_sync_notification.py
index 4eb00f0..c2e0952 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import os.path
diff --git a/lib/lp/archiveuploader/tests/test_tagfiles.py b/lib/lp/archiveuploader/tests/test_tagfiles.py
index 766438d..522ad64 100755
--- a/lib/lp/archiveuploader/tests/test_tagfiles.py
+++ b/lib/lp/archiveuploader/tests/test_tagfiles.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
import unittest
import apt_pkg
diff --git a/lib/lp/archiveuploader/tests/test_uploadpolicy.py b/lib/lp/archiveuploader/tests/test_uploadpolicy.py
index 0f2bab7..1885e6e 100644
--- a/lib/lp/archiveuploader/tests/test_uploadpolicy.py
+++ b/lib/lp/archiveuploader/tests/test_uploadpolicy.py
@@ -3,8 +3,6 @@
# Copyright 2010-2018 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-from __future__ import absolute_import, print_function, unicode_literals
-
from zope.component import getUtility
from zope.component.interfaces import ComponentLookupError
diff --git a/lib/lp/archiveuploader/tests/test_uploadprocessor.py b/lib/lp/archiveuploader/tests/test_uploadprocessor.py
index efd1cb3..5613177 100644
--- a/lib/lp/archiveuploader/tests/test_uploadprocessor.py
+++ b/lib/lp/archiveuploader/tests/test_uploadprocessor.py
@@ -3,8 +3,6 @@
"""Functional tests for uploadprocessor.py."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
"MockOptions",
diff --git a/lib/lp/archiveuploader/tests/test_utils.py b/lib/lp/archiveuploader/tests/test_utils.py
index 3b538fd..d14cad0 100755
--- a/lib/lp/archiveuploader/tests/test_utils.py
+++ b/lib/lp/archiveuploader/tests/test_utils.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
import os
import six
diff --git a/lib/lp/blueprints/browser/tests/test_breadcrumbs.py b/lib/lp/blueprints/browser/tests/test_breadcrumbs.py
index c997762..3f63cc4 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lp.services.webapp.publisher import canonical_url
diff --git a/lib/lp/blueprints/browser/tests/test_hasspecifications.py b/lib/lp/blueprints/browser/tests/test_hasspecifications.py
index 9169b2c..4cfcd44 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lp.testing import (
diff --git a/lib/lp/blueprints/browser/tests/test_menus.py b/lib/lp/blueprints/browser/tests/test_menus.py
index 2b07dc1..e35d40e 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lp.blueprints.browser.specification import (
diff --git a/lib/lp/blueprints/browser/tests/test_person_upcomingwork.py b/lib/lp/blueprints/browser/tests/test_person_upcomingwork.py
index e5c79b2..26bf983 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/blueprints/browser/tests/test_specification.py b/lib/lp/blueprints/browser/tests/test_specification.py
index adfd2f2..6f73882 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import datetime
diff --git a/lib/lp/blueprints/browser/tests/test_specificationdependency.py b/lib/lp/blueprints/browser/tests/test_specificationdependency.py
index 1426a10..05d4426 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.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lp.app.enums import InformationType
diff --git a/lib/lp/blueprints/browser/tests/test_specificationsubscription.py b/lib/lp/blueprints/browser/tests/test_specificationsubscription.py
index 7817d4e..e2a5684 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lp.testing import (
diff --git a/lib/lp/blueprints/browser/tests/test_specificationtarget.py b/lib/lp/blueprints/browser/tests/test_specificationtarget.py
index aca15b6..58eb759 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from fixtures import FakeLogger
diff --git a/lib/lp/blueprints/browser/tests/test_sprint.py b/lib/lp/blueprints/browser/tests/test_sprint.py
index 066d235..8364761 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from fixtures import FakeLogger
diff --git a/lib/lp/blueprints/browser/tests/test_views.py b/lib/lp/blueprints/browser/tests/test_views.py
index cbbe2e5..cd51d18 100644
--- a/lib/lp/blueprints/browser/tests/test_views.py
+++ b/lib/lp/blueprints/browser/tests/test_views.py
@@ -3,8 +3,6 @@
"""Run the view tests."""
-from __future__ import absolute_import, print_function, unicode_literals
-
import logging
import os
import unittest
diff --git a/lib/lp/blueprints/model/specificationbranch.py b/lib/lp/blueprints/model/specificationbranch.py
index 39bfee7..1917c6a 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
diff --git a/lib/lp/blueprints/model/tests/test_specification.py b/lib/lp/blueprints/model/tests/test_specification.py
index 73a8834..b6843ad 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from testtools.matchers import (
diff --git a/lib/lp/blueprints/model/tests/test_sprint.py b/lib/lp/blueprints/model/tests/test_sprint.py
index 2624025..18f3d13 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import datetime
diff --git a/lib/lp/blueprints/model/tests/test_subscription.py b/lib/lp/blueprints/model/tests/test_subscription.py
index c1067de..9efc053 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.component import getUtility
diff --git a/lib/lp/blueprints/tests/test_doc.py b/lib/lp/blueprints/tests/test_doc.py
index 0a21d3d..5eec6ae 100644
--- a/lib/lp/blueprints/tests/test_doc.py
+++ b/lib/lp/blueprints/tests/test_doc.py
@@ -3,8 +3,6 @@
"""Run the doctests and pagetests."""
-from __future__ import absolute_import, print_function, unicode_literals
-
import os
from lp.services.testing import build_test_suite
diff --git a/lib/lp/blueprints/tests/test_hasspecifications.py b/lib/lp/blueprints/tests/test_hasspecifications.py
index be00566..dadfb41 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lp.blueprints.enums import SpecificationDefinitionStatus
diff --git a/lib/lp/blueprints/tests/test_implements.py b/lib/lp/blueprints/tests/test_implements.py
index 8740057..5365733 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lp.blueprints.interfaces.specificationtarget import (
diff --git a/lib/lp/blueprints/tests/test_publisher.py b/lib/lp/blueprints/tests/test_publisher.py
index 821fdfd..5c97bb8 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lp.blueprints.publisher import BlueprintsLayer
diff --git a/lib/lp/blueprints/tests/test_specification.py b/lib/lp/blueprints/tests/test_specification.py
index dcc17b6..4bedc0f 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
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 dd759ba..f022c21 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.component import getUtility
diff --git a/lib/lp/blueprints/tests/test_webservice.py b/lib/lp/blueprints/tests/test_webservice.py
index 39f1b92..2e3216a 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import json
diff --git a/lib/lp/blueprints/vocabularies/tests/test_specificationdependency.py b/lib/lp/blueprints/vocabularies/tests/test_specificationdependency.py
index 4740b74..6584ff3 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.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.schema.vocabulary import getVocabularyRegistry
diff --git a/lib/lp/bugs/browser/tests/test_bugtarget_filebug.py b/lib/lp/bugs/browser/tests/test_bugtarget_filebug.py
index 5e49729..5d04730 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from textwrap import dedent
diff --git a/lib/lp/bugs/browser/tests/test_bugtask.py b/lib/lp/bugs/browser/tests/test_bugtask.py
index d3b37c5..6b03588 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/bugs/browser/tests/test_bugwatch_views.py b/lib/lp/bugs/browser/tests/test_bugwatch_views.py
index 7cd8393..25113bc 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.component import getUtility
diff --git a/lib/lp/bugs/browser/tests/test_cve.py b/lib/lp/bugs/browser/tests/test_cve.py
index 8c4f024..93bc073 100644
--- a/lib/lp/bugs/browser/tests/test_cve.py
+++ b/lib/lp/bugs/browser/tests/test_cve.py
@@ -3,8 +3,6 @@
"""CVE related tests."""
-from __future__ import absolute_import, print_function, unicode_literals
-
from functools import partial
from operator import attrgetter
import re
diff --git a/lib/lp/bugs/externalbugtracker/tests/test_github.py b/lib/lp/bugs/externalbugtracker/tests/test_github.py
index ecc3834..b342872 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import datetime
diff --git a/lib/lp/bugs/externalbugtracker/tests/test_gitlab.py b/lib/lp/bugs/externalbugtracker/tests/test_gitlab.py
index c09c2ab..4978b1f 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import datetime
diff --git a/lib/lp/bugs/mail/bugnotificationrecipients.py b/lib/lp/bugs/mail/bugnotificationrecipients.py
index ff1cf8b..bcec38d 100644
--- a/lib/lp/bugs/mail/bugnotificationrecipients.py
+++ b/lib/lp/bugs/mail/bugnotificationrecipients.py
@@ -3,8 +3,6 @@
"""Code for handling bug notification recipients in bug mail."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'BugNotificationRecipients',
diff --git a/lib/lp/bugs/mail/tests/test_commands.py b/lib/lp/bugs/mail/tests/test_commands.py
index 00721f8..99072ce 100644
--- a/lib/lp/bugs/mail/tests/test_commands.py
+++ b/lib/lp/bugs/mail/tests/test_commands.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
from lazr.lifecycle.interfaces import (
IObjectCreatedEvent,
IObjectModifiedEvent,
diff --git a/lib/lp/bugs/model/bugbranch.py b/lib/lp/bugs/model/bugbranch.py
index 665f177..b5be80f 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
diff --git a/lib/lp/bugs/model/cve.py b/lib/lp/bugs/model/cve.py
index 8f5535d..112f5f9 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
diff --git a/lib/lp/bugs/model/tests/test_bugtasksearch.py b/lib/lp/bugs/model/tests/test_bugtasksearch.py
index 1b2a339..af9f16a 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/bugs/scripts/checkwatches/bugwatchupdater.py b/lib/lp/bugs/scripts/checkwatches/bugwatchupdater.py
index d8cad22..eaa2e79 100644
--- a/lib/lp/bugs/scripts/checkwatches/bugwatchupdater.py
+++ b/lib/lp/bugs/scripts/checkwatches/bugwatchupdater.py
@@ -3,8 +3,6 @@
"""Classes and logic for the checkwatches BugWatchUpdater."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'BugWatchUpdater',
diff --git a/lib/lp/bugs/scripts/checkwatches/tests/test_bugwatchupdater.py b/lib/lp/bugs/scripts/checkwatches/tests/test_bugwatchupdater.py
index 9472091..82da441 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import datetime
diff --git a/lib/lp/bugs/scripts/cveimport.py b/lib/lp/bugs/scripts/cveimport.py
index 3730fef..b29040f 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import gzip
diff --git a/lib/lp/bugs/scripts/debbugs.py b/lib/lp/bugs/scripts/debbugs.py
index c1c6b39..a15a73b 100644
--- a/lib/lp/bugs/scripts/debbugs.py
+++ b/lib/lp/bugs/scripts/debbugs.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).
-from __future__ import absolute_import, print_function
-
from datetime import datetime
import email
import io
diff --git a/lib/lp/bugs/scripts/tests/test_bugnotification.py b/lib/lp/bugs/scripts/tests/test_bugnotification.py
index 9973981..7f61e4c 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/bugs/scripts/tests/test_cveimport.py b/lib/lp/bugs/scripts/tests/test_cveimport.py
index ba23db5..c2ea76c 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import gzip
diff --git a/lib/lp/bugs/tests/bug.py b/lib/lp/bugs/tests/bug.py
index 9653159..4ac066d 100644
--- a/lib/lp/bugs/tests/bug.py
+++ b/lib/lp/bugs/tests/bug.py
@@ -3,8 +3,6 @@
"""Helper functions for bug-related doctests and pagetests."""
-from __future__ import absolute_import, print_function
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/bugs/tests/externalbugtracker.py b/lib/lp/bugs/tests/externalbugtracker.py
index fe969fe..5050f76 100644
--- a/lib/lp/bugs/tests/externalbugtracker.py
+++ b/lib/lp/bugs/tests/externalbugtracker.py
@@ -3,8 +3,6 @@
"""Helper classes for testing ExternalSystem."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
from contextlib import contextmanager
diff --git a/lib/lp/bugs/tests/test_bug.py b/lib/lp/bugs/tests/test_bug.py
index 2d76d10..dacbea9 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import timedelta
diff --git a/lib/lp/bugs/tests/test_bugchanges.py b/lib/lp/bugs/tests/test_bugchanges.py
index 2c43f97..bd13985 100644
--- a/lib/lp/bugs/tests/test_bugchanges.py
+++ b/lib/lp/bugs/tests/test_bugchanges.py
@@ -3,8 +3,6 @@
"""Tests for recording changes done to a bug."""
-from __future__ import absolute_import, print_function, unicode_literals
-
from lazr.lifecycle.event import ObjectCreatedEvent
from testtools.matchers import (
MatchesStructure,
diff --git a/lib/lp/bugs/tests/test_buglinktarget.py b/lib/lp/bugs/tests/test_buglinktarget.py
index ccccc38..b5f5352 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.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = []
diff --git a/lib/lp/bugs/tests/test_bugsubscription.py b/lib/lp/bugs/tests/test_bugsubscription.py
index a554cfc..d665841 100644
--- a/lib/lp/bugs/tests/test_bugsubscription.py
+++ b/lib/lp/bugs/tests/test_bugsubscription.py
@@ -3,8 +3,6 @@
"""Tests for BugSubscriptions."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import json
diff --git a/lib/lp/bugs/tests/test_bugtracker.py b/lib/lp/bugs/tests/test_bugtracker.py
index 67c6114..bd78368 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/bugs/tests/test_bugtracker_vocabulary.py b/lib/lp/bugs/tests/test_bugtracker_vocabulary.py
index e766cd0..883f0ce 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.schema.vocabulary import getVocabularyRegistry
diff --git a/lib/lp/bugs/tests/test_cve.py b/lib/lp/bugs/tests/test_cve.py
index 60d2d61..e131bb5 100644
--- a/lib/lp/bugs/tests/test_cve.py
+++ b/lib/lp/bugs/tests/test_cve.py
@@ -3,8 +3,6 @@
"""CVE related tests."""
-from __future__ import absolute_import, print_function, unicode_literals
-
from zope.component import getUtility
from lp.bugs.interfaces.bugtasksearch import BugTaskSearchParams
diff --git a/lib/lp/bugs/utilities/tests/test_filebugdataparser.py b/lib/lp/bugs/utilities/tests/test_filebugdataparser.py
index 10858f7..d0d3734 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.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import base64
diff --git a/lib/lp/buildmaster/browser/tests/test_builder.py b/lib/lp/buildmaster/browser/tests/test_builder.py
index a2d2408..9072c47 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import timedelta
diff --git a/lib/lp/buildmaster/browser/tests/test_builder_views.py b/lib/lp/buildmaster/browser/tests/test_builder_views.py
index 24a735b..4d5c76e 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from functools import partial
diff --git a/lib/lp/buildmaster/browser/tests/test_processor.py b/lib/lp/buildmaster/browser/tests/test_processor.py
index bddcc04..0fa3928 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lp.services.webapp.publisher import canonical_url
diff --git a/lib/lp/buildmaster/builderproxy.py b/lib/lp/buildmaster/builderproxy.py
index 6b1e7e0..7ff9870 100644
--- a/lib/lp/buildmaster/builderproxy.py
+++ b/lib/lp/buildmaster/builderproxy.py
@@ -10,8 +10,6 @@ authenticated proxy; we provide builds with the necessary authentication
token if and only if they are allowed general internet access.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
"BuilderProxyMixin",
diff --git a/lib/lp/buildmaster/downloader.py b/lib/lp/buildmaster/downloader.py
index 0e1f28f..214918b 100644
--- a/lib/lp/buildmaster/downloader.py
+++ b/lib/lp/buildmaster/downloader.py
@@ -7,8 +7,6 @@ To minimise subprocess memory use, this intentionally avoids importing
anything from the rest of Launchpad.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'DownloadCommand',
diff --git a/lib/lp/buildmaster/tests/builderproxy.py b/lib/lp/buildmaster/tests/builderproxy.py
index 4c9a326..96a6a4b 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import datetime
diff --git a/lib/lp/buildmaster/tests/harness.py b/lib/lp/buildmaster/tests/harness.py
index 0cb68df..0c55b81 100644
--- a/lib/lp/buildmaster/tests/harness.py
+++ b/lib/lp/buildmaster/tests/harness.py
@@ -3,8 +3,6 @@
"""TacHandler for `buildd-manager` daemon."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
diff --git a/lib/lp/buildmaster/tests/mock_slaves.py b/lib/lp/buildmaster/tests/mock_slaves.py
index f1de4cb..f419b25 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
diff --git a/lib/lp/buildmaster/tests/test_builder.py b/lib/lp/buildmaster/tests/test_builder.py
index 33c4ca1..a1111d5 100644
--- a/lib/lp/buildmaster/tests/test_builder.py
+++ b/lib/lp/buildmaster/tests/test_builder.py
@@ -3,8 +3,6 @@
"""Test Builder features."""
-from __future__ import absolute_import, print_function, unicode_literals
-
from fixtures import FakeLogger
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
diff --git a/lib/lp/buildmaster/tests/test_buildfarmjob.py b/lib/lp/buildmaster/tests/test_buildfarmjob.py
index 401f8ff..85a49a9 100644
--- a/lib/lp/buildmaster/tests/test_buildfarmjob.py
+++ b/lib/lp/buildmaster/tests/test_buildfarmjob.py
@@ -3,8 +3,6 @@
"""Tests for `IBuildFarmJob`."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/buildmaster/tests/test_buildfarmjobbehaviour.py b/lib/lp/buildmaster/tests/test_buildfarmjobbehaviour.py
index dc548c4..8b80346 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from collections import OrderedDict
diff --git a/lib/lp/buildmaster/tests/test_buildqueue.py b/lib/lp/buildmaster/tests/test_buildqueue.py
index 77ed62a..da11e87 100644
--- a/lib/lp/buildmaster/tests/test_buildqueue.py
+++ b/lib/lp/buildmaster/tests/test_buildqueue.py
@@ -2,8 +2,6 @@
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Test BuildQueue features."""
-from __future__ import absolute_import, print_function, unicode_literals
-
from datetime import timedelta
from zope.component import getUtility
diff --git a/lib/lp/buildmaster/tests/test_doc.py b/lib/lp/buildmaster/tests/test_doc.py
index 0630514..ba56281 100644
--- a/lib/lp/buildmaster/tests/test_doc.py
+++ b/lib/lp/buildmaster/tests/test_doc.py
@@ -3,8 +3,6 @@
"""Run doctests and pagetests."""
-from __future__ import absolute_import, print_function, unicode_literals
-
import os
from lp.services.testing import build_test_suite
diff --git a/lib/lp/buildmaster/tests/test_interactor.py b/lib/lp/buildmaster/tests/test_interactor.py
index 3abbed3..19572f2 100644
--- a/lib/lp/buildmaster/tests/test_interactor.py
+++ b/lib/lp/buildmaster/tests/test_interactor.py
@@ -3,8 +3,6 @@
"""Test BuilderInteractor features."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__all__ = [
'FakeBuildQueue',
'MockBuilderFactory',
diff --git a/lib/lp/buildmaster/tests/test_manager.py b/lib/lp/buildmaster/tests/test_manager.py
index 2da4753..9f49176 100644
--- a/lib/lp/buildmaster/tests/test_manager.py
+++ b/lib/lp/buildmaster/tests/test_manager.py
@@ -7,8 +7,6 @@
"""Tests for the renovated slave scanner aka BuilddManager."""
-from __future__ import absolute_import, print_function, unicode_literals
-
import os
import signal
import time
diff --git a/lib/lp/buildmaster/tests/test_packagebuild.py b/lib/lp/buildmaster/tests/test_packagebuild.py
index 9ff5f97..ea171f8 100644
--- a/lib/lp/buildmaster/tests/test_packagebuild.py
+++ b/lib/lp/buildmaster/tests/test_packagebuild.py
@@ -3,8 +3,6 @@
"""Tests for `IPackageBuild`."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import hashlib
diff --git a/lib/lp/buildmaster/tests/test_processor.py b/lib/lp/buildmaster/tests/test_processor.py
index 7bd8269..756dfda 100644
--- a/lib/lp/buildmaster/tests/test_processor.py
+++ b/lib/lp/buildmaster/tests/test_processor.py
@@ -3,8 +3,6 @@
"""Test Processor features."""
-from __future__ import absolute_import, print_function, unicode_literals
-
from zope.component import getUtility
from lp.buildmaster.interfaces.processor import (
diff --git a/lib/lp/buildmaster/tests/test_queuedepth.py b/lib/lp/buildmaster/tests/test_queuedepth.py
index b9198e1..87bb318 100644
--- a/lib/lp/buildmaster/tests/test_queuedepth.py
+++ b/lib/lp/buildmaster/tests/test_queuedepth.py
@@ -2,8 +2,6 @@
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Test BuildQueue start time estimation."""
-from __future__ import absolute_import, print_function, unicode_literals
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/buildmaster/tests/test_webservice.py b/lib/lp/buildmaster/tests/test_webservice.py
index 5534c09..36a6350 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 ."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from json import dumps
diff --git a/lib/lp/charms/adapters/buildarch.py b/lib/lp/charms/adapters/buildarch.py
index 5c76fa9..ac32d86 100644
--- a/lib/lp/charms/adapters/buildarch.py
+++ b/lib/lp/charms/adapters/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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__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 7511f67..569ad02 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from functools import partial
diff --git a/lib/lp/charms/browser/charmrecipe.py b/lib/lp/charms/browser/charmrecipe.py
index 1f6a9d8..501f700 100644
--- a/lib/lp/charms/browser/charmrecipe.py
+++ b/lib/lp/charms/browser/charmrecipe.py
@@ -3,8 +3,6 @@
"""Charm recipe views."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
"CharmRecipeAddView",
diff --git a/lib/lp/charms/browser/charmrecipebuild.py b/lib/lp/charms/browser/charmrecipebuild.py
index f695084..5addc5b 100644
--- a/lib/lp/charms/browser/charmrecipebuild.py
+++ b/lib/lp/charms/browser/charmrecipebuild.py
@@ -3,8 +3,6 @@
"""Charm recipe build views."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
"CharmRecipeBuildContextMenu",
diff --git a/lib/lp/charms/browser/charmrecipelisting.py b/lib/lp/charms/browser/charmrecipelisting.py
index d9b3edd..4105419 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
diff --git a/lib/lp/charms/browser/hascharmrecipes.py b/lib/lp/charms/browser/hascharmrecipes.py
index 16f6f4c..7243201 100644
--- a/lib/lp/charms/browser/hascharmrecipes.py
+++ b/lib/lp/charms/browser/hascharmrecipes.py
@@ -3,8 +3,6 @@
"""Mixins for browser classes for objects that have charm recipes."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
"HasCharmRecipesMenuMixin",
diff --git a/lib/lp/charms/browser/tests/test_charmrecipe.py b/lib/lp/charms/browser/tests/test_charmrecipe.py
index 8b95ff8..6dc4a2d 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/charms/browser/tests/test_charmrecipebuild.py b/lib/lp/charms/browser/tests/test_charmrecipebuild.py
index d9c6ebd..08c13a1 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import re
diff --git a/lib/lp/charms/browser/tests/test_charmrecipelisting.py b/lib/lp/charms/browser/tests/test_charmrecipelisting.py
index 5bfd233..792ca1f 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/charms/browser/tests/test_hascharmrecipes.py b/lib/lp/charms/browser/tests/test_hascharmrecipes.py
index 6cc7bf7..ff00c6e 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import soupmatchers
diff --git a/lib/lp/charms/browser/widgets/charmrecipebuildchannels.py b/lib/lp/charms/browser/widgets/charmrecipebuildchannels.py
index b1512ed..f5b2861 100644
--- a/lib/lp/charms/browser/widgets/charmrecipebuildchannels.py
+++ b/lib/lp/charms/browser/widgets/charmrecipebuildchannels.py
@@ -3,8 +3,6 @@
"""A widget for selecting source snap channels for charm recipe builds."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__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 67b2040..b20d944 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import re
diff --git a/lib/lp/charms/interfaces/charmrecipe.py b/lib/lp/charms/interfaces/charmrecipe.py
index c7b7dd6..0f55360 100644
--- a/lib/lp/charms/interfaces/charmrecipe.py
+++ b/lib/lp/charms/interfaces/charmrecipe.py
@@ -3,8 +3,6 @@
"""Charm recipe interfaces."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
"BadCharmRecipeSource",
diff --git a/lib/lp/charms/interfaces/charmrecipebuild.py b/lib/lp/charms/interfaces/charmrecipebuild.py
index 077ccce..8b678bb 100644
--- a/lib/lp/charms/interfaces/charmrecipebuild.py
+++ b/lib/lp/charms/interfaces/charmrecipebuild.py
@@ -3,8 +3,6 @@
"""Charm recipe build interfaces."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
"ICharmFile",
diff --git a/lib/lp/charms/interfaces/charmrecipejob.py b/lib/lp/charms/interfaces/charmrecipejob.py
index 1094e5a..08eedc5 100644
--- a/lib/lp/charms/interfaces/charmrecipejob.py
+++ b/lib/lp/charms/interfaces/charmrecipejob.py
@@ -3,8 +3,6 @@
"""Charm recipe job interfaces."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
"ICharmRecipeJob",
diff --git a/lib/lp/charms/mail/charmrecipebuild.py b/lib/lp/charms/mail/charmrecipebuild.py
index 4486809..9f997cb 100644
--- a/lib/lp/charms/mail/charmrecipebuild.py
+++ b/lib/lp/charms/mail/charmrecipebuild.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
"CharmRecipeBuildMailer",
diff --git a/lib/lp/charms/model/charmrecipe.py b/lib/lp/charms/model/charmrecipe.py
index 163d393..1231749 100644
--- a/lib/lp/charms/model/charmrecipe.py
+++ b/lib/lp/charms/model/charmrecipe.py
@@ -3,8 +3,6 @@
"""Charm recipes."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
"CharmRecipe",
diff --git a/lib/lp/charms/model/charmrecipebuild.py b/lib/lp/charms/model/charmrecipebuild.py
index 088b7b1..3a38f2a 100644
--- a/lib/lp/charms/model/charmrecipebuild.py
+++ b/lib/lp/charms/model/charmrecipebuild.py
@@ -3,8 +3,6 @@
"""Charm recipe builds."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
"CharmFile",
diff --git a/lib/lp/charms/model/charmrecipebuildbehaviour.py b/lib/lp/charms/model/charmrecipebuildbehaviour.py
index e66545b..f5cc34d 100644
--- a/lib/lp/charms/model/charmrecipebuildbehaviour.py
+++ b/lib/lp/charms/model/charmrecipebuildbehaviour.py
@@ -6,8 +6,6 @@
Dispatches charm recipe build jobs to build-farm slaves.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
"CharmRecipeBuildBehaviour",
diff --git a/lib/lp/charms/model/charmrecipejob.py b/lib/lp/charms/model/charmrecipejob.py
index 555311d..354ce54 100644
--- a/lib/lp/charms/model/charmrecipejob.py
+++ b/lib/lp/charms/model/charmrecipejob.py
@@ -3,8 +3,6 @@
"""Charm recipe jobs."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
"CharmRecipeJob",
diff --git a/lib/lp/charms/tests/test_charmrecipe.py b/lib/lp/charms/tests/test_charmrecipe.py
index d4efb7c..21b7a50 100644
--- a/lib/lp/charms/tests/test_charmrecipe.py
+++ b/lib/lp/charms/tests/test_charmrecipe.py
@@ -3,8 +3,6 @@
"""Test charm recipes."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from textwrap import dedent
diff --git a/lib/lp/charms/tests/test_charmrecipebuild.py b/lib/lp/charms/tests/test_charmrecipebuild.py
index 7258d3a..0bc600a 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/charms/tests/test_charmrecipebuildbehaviour.py b/lib/lp/charms/tests/test_charmrecipebuildbehaviour.py
index 16c9dad..ea310a1 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import base64
diff --git a/lib/lp/charms/tests/test_charmrecipejob.py b/lib/lp/charms/tests/test_charmrecipejob.py
index 6dbd168..ff93436 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from textwrap import dedent
diff --git a/lib/lp/code/browser/tests/test_bazaar.py b/lib/lp/code/browser/tests/test_bazaar.py
index 5f63d76..42209d4 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.security.proxy import removeSecurityProxy
diff --git a/lib/lp/code/browser/tests/test_branch.py b/lib/lp/code/browser/tests/test_branch.py
index 2727002..e5f41fb 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import datetime
diff --git a/lib/lp/code/browser/tests/test_branchlisting.py b/lib/lp/code/browser/tests/test_branchlisting.py
index 5aed624..04afdc2 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import timedelta
diff --git a/lib/lp/code/browser/tests/test_branchmergeproposal.py b/lib/lp/code/browser/tests/test_branchmergeproposal.py
index ba2ee85..c4a776d 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/code/browser/tests/test_branchmergeproposallisting.py b/lib/lp/code/browser/tests/test_branchmergeproposallisting.py
index b083358..c1346c3 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import datetime
diff --git a/lib/lp/code/browser/tests/test_branchsubscription.py b/lib/lp/code/browser/tests/test_branchsubscription.py
index e75aac3..e901130 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lp.app.enums import InformationType
diff --git a/lib/lp/code/browser/tests/test_branchtraversal.py b/lib/lp/code/browser/tests/test_branchtraversal.py
index c26a699..1129034 100644
--- a/lib/lp/code/browser/tests/test_branchtraversal.py
+++ b/lib/lp/code/browser/tests/test_branchtraversal.py
@@ -3,8 +3,6 @@
"""Tests for branch traversal."""
-from __future__ import absolute_import, print_function, unicode_literals
-
from zope.component import getUtility
from zope.publisher.interfaces import NotFound
from zope.security.proxy import removeSecurityProxy
diff --git a/lib/lp/code/browser/tests/test_breadcrumbs.py b/lib/lp/code/browser/tests/test_breadcrumbs.py
index af9c33a..494ea67 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__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 86cf64c..f8b1470 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import re
diff --git a/lib/lp/code/browser/tests/test_codereviewcomment.py b/lib/lp/code/browser/tests/test_codereviewcomment.py
index e74e310..fb38ae1 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import re
diff --git a/lib/lp/code/browser/tests/test_codereviewvote.py b/lib/lp/code/browser/tests/test_codereviewvote.py
index 7dbcf0c..f1cc64e 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lp.services.webapp import canonical_url
diff --git a/lib/lp/code/browser/tests/test_diff.py b/lib/lp/code/browser/tests/test_diff.py
index 0270e90..8538437 100644
--- a/lib/lp/code/browser/tests/test_diff.py
+++ b/lib/lp/code/browser/tests/test_diff.py
@@ -3,8 +3,6 @@
"""Unit tests for DiffView."""
-from __future__ import absolute_import, print_function, unicode_literals
-
from lp.code.browser.diff import PreviewDiffFormatterAPI
from lp.testing import TestCaseWithFactory
from lp.testing.layers import LaunchpadFunctionalLayer
diff --git a/lib/lp/code/browser/tests/test_gitlisting.py b/lib/lp/code/browser/tests/test_gitlisting.py
index fab5cd4..7856dd0 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.component import getUtility
diff --git a/lib/lp/code/browser/tests/test_gitref.py b/lib/lp/code/browser/tests/test_gitref.py
index 4ded628..59120fd 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import datetime
diff --git a/lib/lp/code/browser/tests/test_gitrepository.py b/lib/lp/code/browser/tests/test_gitrepository.py
index 843d60a..94bf2ce 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import base64
diff --git a/lib/lp/code/browser/tests/test_gitsubscription.py b/lib/lp/code/browser/tests/test_gitsubscription.py
index 17c9136..54283c5 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from fixtures import FakeLogger
diff --git a/lib/lp/code/browser/tests/test_product.py b/lib/lp/code/browser/tests/test_product.py
index 61a6240..32c6549 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/code/browser/tests/test_revisionauthor.py b/lib/lp/code/browser/tests/test_revisionauthor.py
index 891409e..7321e4c 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`."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lp.app.browser.tales import (
diff --git a/lib/lp/code/browser/tests/test_sourcepackagerecipe.py b/lib/lp/code/browser/tests/test_sourcepackagerecipe.py
index 5ab4908..4dbe2be 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/code/browser/tests/test_sourcepackagerecipebuild.py b/lib/lp/code/browser/tests/test_sourcepackagerecipebuild.py
index 3f3ec4f..8bb1345 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from fixtures import FakeLogger
diff --git a/lib/lp/code/browser/tests/test_sourcepackagerecipelisting.py b/lib/lp/code/browser/tests/test_sourcepackagerecipelisting.py
index 8e6c963..63c623b 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lp.testing import (
diff --git a/lib/lp/code/browser/tests/test_tales.py b/lib/lp/code/browser/tests/test_tales.py
index dbd2f52..fc55ea3 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from difflib import unified_diff
diff --git a/lib/lp/code/browser/tests/test_vcslisting.py b/lib/lp/code/browser/tests/test_vcslisting.py
index 127d9d3..d636010 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.publisher.interfaces import NotFound
diff --git a/lib/lp/code/browser/widgets/gitgrantee.py b/lib/lp/code/browser/widgets/gitgrantee.py
index 3720cf0..c4913dd 100644
--- a/lib/lp/code/browser/widgets/gitgrantee.py
+++ b/lib/lp/code/browser/widgets/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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'GitGranteeDisplayWidget',
diff --git a/lib/lp/code/browser/widgets/tests/test_gitgrantee.py b/lib/lp/code/browser/widgets/tests/test_gitgrantee.py
index 28d0011..6d9bf55 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import re
diff --git a/lib/lp/code/browser/widgets/tests/test_gitrepositorytargetwidget.py b/lib/lp/code/browser/widgets/tests/test_gitrepositorytargetwidget.py
index 3d1c5b7..bcae3fd 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import re
diff --git a/lib/lp/code/interfaces/gitactivity.py b/lib/lp/code/interfaces/gitactivity.py
index 00c3b26..ae1217c 100644
--- a/lib/lp/code/interfaces/gitactivity.py
+++ b/lib/lp/code/interfaces/gitactivity.py
@@ -3,8 +3,6 @@
"""Git repository activity logs."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'IGitActivity',
diff --git a/lib/lp/code/interfaces/gitrule.py b/lib/lp/code/interfaces/gitrule.py
index 7b3c117..61ea290 100644
--- a/lib/lp/code/interfaces/gitrule.py
+++ b/lib/lp/code/interfaces/gitrule.py
@@ -3,8 +3,6 @@
"""Git repository access rules."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'describe_git_permissions',
diff --git a/lib/lp/code/mail/patches.py b/lib/lp/code/mail/patches.py
index 51cf325..091dbc0 100644
--- a/lib/lp/code/mail/patches.py
+++ b/lib/lp/code/mail/patches.py
@@ -18,8 +18,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-from __future__ import absolute_import
-
from breezy.patches import (
binary_files_re,
hunk_from_header,
diff --git a/lib/lp/code/mail/tests/test_codehandler.py b/lib/lp/code/mail/tests/test_codehandler.py
index d826925..3ab963d 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from textwrap import dedent
diff --git a/lib/lp/code/mail/tests/test_codeimport.py b/lib/lp/code/mail/tests/test_codeimport.py
index 03411f5..18ecb59 100644
--- a/lib/lp/code/mail/tests/test_codeimport.py
+++ b/lib/lp/code/mail/tests/test_codeimport.py
@@ -3,8 +3,6 @@
"""Tests for code import related mailings"""
-from __future__ import absolute_import, print_function, unicode_literals
-
import textwrap
import six
diff --git a/lib/lp/code/mail/tests/test_codereviewcomment.py b/lib/lp/code/mail/tests/test_codereviewcomment.py
index 8c65a49..eca27d0 100644
--- a/lib/lp/code/mail/tests/test_codereviewcomment.py
+++ b/lib/lp/code/mail/tests/test_codereviewcomment.py
@@ -3,8 +3,6 @@
"""Test CodeReviewComment emailing functionality."""
-from __future__ import absolute_import, print_function, unicode_literals
-
import testtools
import transaction
from zope.component import getUtility
diff --git a/lib/lp/code/model/branchhosting.py b/lib/lp/code/model/branchhosting.py
index 57e373c..79f1e49 100644
--- a/lib/lp/code/model/branchhosting.py
+++ b/lib/lp/code/model/branchhosting.py
@@ -3,8 +3,6 @@
"""Communication with the Loggerhead API for Bazaar code hosting."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'BranchHostingClient',
diff --git a/lib/lp/code/model/branchsubscription.py b/lib/lp/code/model/branchsubscription.py
index 74ac06f..070e62f 100644
--- a/lib/lp/code/model/branchsubscription.py
+++ b/lib/lp/code/model/branchsubscription.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = ['BranchSubscription']
diff --git a/lib/lp/code/model/codeimport.py b/lib/lp/code/model/codeimport.py
index 95d0b99..57dcb2f 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
diff --git a/lib/lp/code/model/codeimportevent.py b/lib/lp/code/model/codeimportevent.py
index 2cb2b4d..fef2ab8 100644
--- a/lib/lp/code/model/codeimportevent.py
+++ b/lib/lp/code/model/codeimportevent.py
@@ -3,8 +3,6 @@
"""Database classes related to and including CodeImportEvent."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'CodeImportEvent',
diff --git a/lib/lp/code/model/codeimportjob.py b/lib/lp/code/model/codeimportjob.py
index 3afe6b4..989bc73 100644
--- a/lib/lp/code/model/codeimportjob.py
+++ b/lib/lp/code/model/codeimportjob.py
@@ -3,8 +3,6 @@
"""Database classes for the CodeImportJob table."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'CodeImportJob',
diff --git a/lib/lp/code/model/codeimportmachine.py b/lib/lp/code/model/codeimportmachine.py
index 07d0028..eb66f0a 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
diff --git a/lib/lp/code/model/codeimportresult.py b/lib/lp/code/model/codeimportresult.py
index 6c1a81f..d50928f 100644
--- a/lib/lp/code/model/codeimportresult.py
+++ b/lib/lp/code/model/codeimportresult.py
@@ -3,8 +3,6 @@
"""Database classes for the CodeImportResult table."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = ['CodeImportResult', 'CodeImportResultSet']
diff --git a/lib/lp/code/model/gitactivity.py b/lib/lp/code/model/gitactivity.py
index 8f17372..9ac33c6 100644
--- a/lib/lp/code/model/gitactivity.py
+++ b/lib/lp/code/model/gitactivity.py
@@ -3,8 +3,6 @@
"""Git repository activity logs."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'GitActivity',
diff --git a/lib/lp/code/model/gitrule.py b/lib/lp/code/model/gitrule.py
index 52818bb..16b4b26 100644
--- a/lib/lp/code/model/gitrule.py
+++ b/lib/lp/code/model/gitrule.py
@@ -3,8 +3,6 @@
"""Git repository access rules."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'GitRule',
diff --git a/lib/lp/code/model/sourcepackagerecipe.py b/lib/lp/code/model/sourcepackagerecipe.py
index 9eba658..a98f839 100644
--- a/lib/lp/code/model/sourcepackagerecipe.py
+++ b/lib/lp/code/model/sourcepackagerecipe.py
@@ -3,8 +3,6 @@
"""Implementation of the `SourcePackageRecipe` content type."""
-from __future__ import division
-
__metaclass__ = type
__all__ = [
'SourcePackageRecipe',
diff --git a/lib/lp/code/model/tests/test_branch.py b/lib/lp/code/model/tests/test_branch.py
index d69c650..37299d9 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/code/model/tests/test_branchcloud.py b/lib/lp/code/model/tests/test_branchcloud.py
index 6c9cfbf..5406e1c 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/code/model/tests/test_branchcollection.py b/lib/lp/code/model/tests/test_branchcollection.py
index b02a942..bba26b9 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/code/model/tests/test_branchhosting.py b/lib/lp/code/model/tests/test_branchhosting.py
index 4fe2ee6..56e0f1c 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.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from contextlib import contextmanager
diff --git a/lib/lp/code/model/tests/test_branchjob.py b/lib/lp/code/model/tests/test_branchjob.py
index d731310..f8e8ca0 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import datetime
diff --git a/lib/lp/code/model/tests/test_branchlistingqueryoptimiser.py b/lib/lp/code/model/tests/test_branchlistingqueryoptimiser.py
index debec5e..64ad1b9 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from storm.store import Store
diff --git a/lib/lp/code/model/tests/test_branchlookup.py b/lib/lp/code/model/tests/test_branchlookup.py
index c44c7a7..7c8903e 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lazr.uri import URI
diff --git a/lib/lp/code/model/tests/test_branchmergeproposal.py b/lib/lp/code/model/tests/test_branchmergeproposal.py
index 2f6fa07..945e28d 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/code/model/tests/test_branchmergeproposaljobs.py b/lib/lp/code/model/tests/test_branchmergeproposaljobs.py
index 77a6ead..49d84c1 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/code/model/tests/test_branchnamespace.py b/lib/lp/code/model/tests/test_branchnamespace.py
index 668363a..7eb53bb 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import six
diff --git a/lib/lp/code/model/tests/test_branchpuller.py b/lib/lp/code/model/tests/test_branchpuller.py
index b295bb3..9e0ab5d 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/code/model/tests/test_branchset.py b/lib/lp/code/model/tests/test_branchset.py
index 6f742eb..e79e43d 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import datetime
diff --git a/lib/lp/code/model/tests/test_branchsubscription.py b/lib/lp/code/model/tests/test_branchsubscription.py
index 9b13adf..955aaf3 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.component import getUtility
diff --git a/lib/lp/code/model/tests/test_branchtarget.py b/lib/lp/code/model/tests/test_branchtarget.py
index 376e39b..76fcc35 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.security.proxy import removeSecurityProxy
diff --git a/lib/lp/code/model/tests/test_branchvisibility.py b/lib/lp/code/model/tests/test_branchvisibility.py
index f977d7b..2170c7c 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.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.component import (
diff --git a/lib/lp/code/model/tests/test_codeimport.py b/lib/lp/code/model/tests/test_codeimport.py
index 5943d2b..22fbe77 100644
--- a/lib/lp/code/model/tests/test_codeimport.py
+++ b/lib/lp/code/model/tests/test_codeimport.py
@@ -3,8 +3,6 @@
"""Unit tests for methods of CodeImport and CodeImportSet."""
-from __future__ import absolute_import, print_function, unicode_literals
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/code/model/tests/test_codeimportjob.py b/lib/lp/code/model/tests/test_codeimportjob.py
index a5f3e6e..83b0091 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
diff --git a/lib/lp/code/model/tests/test_codeimportmachine.py b/lib/lp/code/model/tests/test_codeimportmachine.py
index 5f688d4..1070610 100644
--- a/lib/lp/code/model/tests/test_codeimportmachine.py
+++ b/lib/lp/code/model/tests/test_codeimportmachine.py
@@ -5,8 +5,6 @@
Other tests are in codeimport-machine.txt."""
-from __future__ import absolute_import, print_function, unicode_literals
-
from zope.component import getUtility
from lp.code.enums import (
diff --git a/lib/lp/code/model/tests/test_codeimportresult.py b/lib/lp/code/model/tests/test_codeimportresult.py
index 0ccae83..a717bb4 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import datetime
diff --git a/lib/lp/code/model/tests/test_codereviewcomment.py b/lib/lp/code/model/tests/test_codereviewcomment.py
index 3669169..4ec62d8 100644
--- a/lib/lp/code/model/tests/test_codereviewcomment.py
+++ b/lib/lp/code/model/tests/test_codereviewcomment.py
@@ -3,8 +3,6 @@
"""Unit tests for CodeReviewComment"""
-from __future__ import absolute_import, print_function, unicode_literals
-
from textwrap import dedent
from lazr.lifecycle.event import ObjectCreatedEvent
diff --git a/lib/lp/code/model/tests/test_codereviewinlinecomment.py b/lib/lp/code/model/tests/test_codereviewinlinecomment.py
index 9e292d6..27f8caa 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}"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import datetime
diff --git a/lib/lp/code/model/tests/test_codereviewkarma.py b/lib/lp/code/model/tests/test_codereviewkarma.py
index d763ba5..0db1b76 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lp.code.adapters.branch import BranchMergeProposalNoPreviewDiffDelta
diff --git a/lib/lp/code/model/tests/test_codereviewvote.py b/lib/lp/code/model/tests/test_codereviewvote.py
index 8a2edde..be47765 100644
--- a/lib/lp/code/model/tests/test_codereviewvote.py
+++ b/lib/lp/code/model/tests/test_codereviewvote.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
from zope.security.interfaces import Unauthorized
from lp.app.enums import InformationType
diff --git a/lib/lp/code/model/tests/test_diff.py b/lib/lp/code/model/tests/test_diff.py
index 71510b3..1c1827f 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from difflib import unified_diff
diff --git a/lib/lp/code/model/tests/test_gitactivity.py b/lib/lp/code/model/tests/test_gitactivity.py
index 2c6e24b..c71394c 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from storm.store import Store
diff --git a/lib/lp/code/model/tests/test_gitcollection.py b/lib/lp/code/model/tests/test_gitcollection.py
index 2c72590..d78ecf8 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/code/model/tests/test_githosting.py b/lib/lp/code/model/tests/test_githosting.py
index b2060fe..242552a 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.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import base64
diff --git a/lib/lp/code/model/tests/test_gitjob.py b/lib/lp/code/model/tests/test_gitjob.py
index 1b41b35..ce11ee2 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/code/model/tests/test_gitlookup.py b/lib/lp/code/model/tests/test_gitlookup.py
index 2ec1e62..1aa7c39 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lazr.uri import URI
diff --git a/lib/lp/code/model/tests/test_gitnamespace.py b/lib/lp/code/model/tests/test_gitnamespace.py
index 5c12dbb..3b7bfcd 100644
--- a/lib/lp/code/model/tests/test_gitnamespace.py
+++ b/lib/lp/code/model/tests/test_gitnamespace.py
@@ -3,8 +3,6 @@
"""Tests for `IGitNamespace` implementations."""
-from __future__ import absolute_import, print_function, unicode_literals
-
import six
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
diff --git a/lib/lp/code/model/tests/test_gitref.py b/lib/lp/code/model/tests/test_gitref.py
index 1cef9df..e2eac23 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/code/model/tests/test_gitrepository.py b/lib/lp/code/model/tests/test_gitrepository.py
index 69d0595..203ceda 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/code/model/tests/test_gitrule.py b/lib/lp/code/model/tests/test_gitrule.py
index 31c3786..82b6b1a 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from storm.store import Store
diff --git a/lib/lp/code/model/tests/test_gitsubscription.py b/lib/lp/code/model/tests/test_gitsubscription.py
index 37f7550..489a556 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lp.app.enums import InformationType
diff --git a/lib/lp/code/model/tests/test_hasbranches.py b/lib/lp/code/model/tests/test_hasbranches.py
index e92daae..dd9d596 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from functools import partial
diff --git a/lib/lp/code/model/tests/test_hasgitrepositories.py b/lib/lp/code/model/tests/test_hasgitrepositories.py
index 4878f4d..4f34bb0 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lp.code.interfaces.hasgitrepositories import IHasGitRepositories
diff --git a/lib/lp/code/model/tests/test_hasmergeproposals.py b/lib/lp/code/model/tests/test_hasmergeproposals.py
index 2ecf4c9..42e7fcf 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.interface.verify import verifyObject
diff --git a/lib/lp/code/model/tests/test_hasrecipes.py b/lib/lp/code/model/tests/test_hasrecipes.py
index 376ffec..d24b8d7 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lp.code.interfaces.hasrecipes import IHasRecipes
diff --git a/lib/lp/code/model/tests/test_linkedbranch.py b/lib/lp/code/model/tests/test_linkedbranch.py
index c731847..87b1ef8 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.security.proxy import removeSecurityProxy
diff --git a/lib/lp/code/model/tests/test_recipebuilder.py b/lib/lp/code/model/tests/test_recipebuilder.py
index b578a5f..3a97747 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import os.path
diff --git a/lib/lp/code/model/tests/test_revision.py b/lib/lp/code/model/tests/test_revision.py
index 67fd745..43c1fe5 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/code/model/tests/test_revisionauthor.py b/lib/lp/code/model/tests/test_revisionauthor.py
index f68e8a5..e7fe785 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import transaction
diff --git a/lib/lp/code/model/tests/test_revisioncache.py b/lib/lp/code/model/tests/test_revisioncache.py
index 9f531c3..3de1d53 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/code/model/tests/test_seriessourcepackagebranch.py b/lib/lp/code/model/tests/test_seriessourcepackagebranch.py
index b03f860..0e9d4a3 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lp.code.model.seriessourcepackagebranch import (
diff --git a/lib/lp/code/model/tests/test_sourcepackagerecipe.py b/lib/lp/code/model/tests/test_sourcepackagerecipe.py
index b14b8ab..51b463c 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/code/model/tests/test_sourcepackagerecipebuild.py b/lib/lp/code/model/tests/test_sourcepackagerecipebuild.py
index d7c8595..98447ed 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/code/tests/branch_helper.py b/lib/lp/code/tests/branch_helper.py
index ba869e2..0bc5495 100644
--- a/lib/lp/code/tests/branch_helper.py
+++ b/lib/lp/code/tests/branch_helper.py
@@ -3,8 +3,6 @@
"""Helper methods for branch tests and pagetest."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__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 3e177f6..15431d8 100644
--- a/lib/lp/code/tests/codeimporthelpers.py
+++ b/lib/lp/code/tests/codeimporthelpers.py
@@ -3,8 +3,6 @@
"""Helpers for Code Import page tests."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'get_import_for_branch_name',
diff --git a/lib/lp/code/tests/helpers.py b/lib/lp/code/tests/helpers.py
index 11361ec..e479b87 100644
--- a/lib/lp/code/tests/helpers.py
+++ b/lib/lp/code/tests/helpers.py
@@ -3,13 +3,6 @@
"""Helper functions for code testing live here."""
-from __future__ import (
- absolute_import,
- division,
- print_function,
- unicode_literals,
- )
-
__metaclass__ = type
__all__ = [
'add_revision_to_branch',
diff --git a/lib/lp/code/tests/test_branch.py b/lib/lp/code/tests/test_branch.py
index c95515e..a9e704d 100644
--- a/lib/lp/code/tests/test_branch.py
+++ b/lib/lp/code/tests/test_branch.py
@@ -3,8 +3,6 @@
"""Unit tests for methods of Branch and BranchSet."""
-from __future__ import absolute_import, print_function, unicode_literals
-
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
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 7b7cc98..5476d81 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.component import getUtility
diff --git a/lib/lp/code/tests/test_branch_webservice.py b/lib/lp/code/tests/test_branch_webservice.py
index 9f41d98..ae44516 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lazr.restfulclient.errors import BadRequest
diff --git a/lib/lp/code/tests/test_branchmergeproposal.py b/lib/lp/code/tests/test_branchmergeproposal.py
index 92767d0..be5c4d1 100644
--- a/lib/lp/code/tests/test_branchmergeproposal.py
+++ b/lib/lp/code/tests/test_branchmergeproposal.py
@@ -3,8 +3,6 @@
"""Unit tests for methods of BranchMergeProposal."""
-from __future__ import absolute_import, print_function, unicode_literals
-
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
diff --git a/lib/lp/code/tests/test_branchurifield.py b/lib/lp/code/tests/test_branchurifield.py
index 6ef004e..08f2243 100644
--- a/lib/lp/code/tests/test_branchurifield.py
+++ b/lib/lp/code/tests/test_branchurifield.py
@@ -3,8 +3,6 @@
"""Tests for BranchURIField."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lp.app.validators import LaunchpadValidationError
diff --git a/lib/lp/code/tests/test_bzr.py b/lib/lp/code/tests/test_bzr.py
index 6a62463..36b29a4 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from breezy.errors import NoSuchRevision
diff --git a/lib/lp/code/tests/test_directbranchcommit.py b/lib/lp/code/tests/test_directbranchcommit.py
index 9930b67..e39b755 100644
--- a/lib/lp/code/tests/test_directbranchcommit.py
+++ b/lib/lp/code/tests/test_directbranchcommit.py
@@ -3,8 +3,6 @@
"""Tests for `DirectBranchCommit`."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import six
diff --git a/lib/lp/code/tests/test_doc.py b/lib/lp/code/tests/test_doc.py
index a3752ad..1ae5514 100644
--- a/lib/lp/code/tests/test_doc.py
+++ b/lib/lp/code/tests/test_doc.py
@@ -5,8 +5,6 @@
Run the doctests and pagetests.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
import os
from zope.security.management import setSecurityPolicy
diff --git a/lib/lp/code/tests/test_helpers.py b/lib/lp/code/tests/test_helpers.py
index 2bcb443..df86fb7 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/code/tests/test_project.py b/lib/lp/code/tests/test_project.py
index e7cfe4b..61dd965 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lp.testing import TestCaseWithFactory
diff --git a/lib/lp/code/tests/test_publisher.py b/lib/lp/code/tests/test_publisher.py
index c2dcb10..fedded0 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lp.code.publisher import CodeLayer
diff --git a/lib/lp/code/tests/test_seriessourcepackagebranch.py b/lib/lp/code/tests/test_seriessourcepackagebranch.py
index 2874686..45e8dbf 100644
--- a/lib/lp/code/tests/test_seriessourcepackagebranch.py
+++ b/lib/lp/code/tests/test_seriessourcepackagebranch.py
@@ -3,8 +3,6 @@
"""Tests for ISeriesSourcePackageBranch."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import datetime
diff --git a/lib/lp/code/tests/test_yuitests.py b/lib/lp/code/tests/test_yuitests.py
index db563af..4e9ad9c 100644
--- a/lib/lp/code/tests/test_yuitests.py
+++ b/lib/lp/code/tests/test_yuitests.py
@@ -3,8 +3,6 @@
"""Run YUI.test tests."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = []
diff --git a/lib/lp/code/vocabularies/gitref.py b/lib/lp/code/vocabularies/gitref.py
index 3c2bf4a..865bc3e 100644
--- a/lib/lp/code/vocabularies/gitref.py
+++ b/lib/lp/code/vocabularies/gitref.py
@@ -3,9 +3,6 @@
"""Vocabularies that contain Git references."""
-from __future__ import absolute_import, print_function, unicode_literals
-
-
__metaclass__ = type
__all__ = [
"GitBranchVocabulary",
diff --git a/lib/lp/code/vocabularies/gitrule.py b/lib/lp/code/vocabularies/gitrule.py
index b07e7b4..3758228 100644
--- a/lib/lp/code/vocabularies/gitrule.py
+++ b/lib/lp/code/vocabularies/gitrule.py
@@ -3,8 +3,6 @@
"""Vocabularies related to Git access rules."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'GitPermissionsVocabulary',
diff --git a/lib/lp/code/vocabularies/tests/test_gitref_vocabularies.py b/lib/lp/code/vocabularies/tests/test_gitref_vocabularies.py
index 9edbff9..971ad7d 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/code/vocabularies/tests/test_gitrule_vocabularies.py b/lib/lp/code/vocabularies/tests/test_gitrule_vocabularies.py
index a2cb584..8782768 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lp.code.enums import GitPermissionType
diff --git a/lib/lp/code/xmlrpc/tests/test_git.py b/lib/lp/code/xmlrpc/tests/test_git.py
index dbfe4ba..efc1087 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import datetime
diff --git a/lib/lp/codehosting/__init__.py b/lib/lp/codehosting/__init__.py
index 0731704..c194128 100644
--- a/lib/lp/codehosting/__init__.py
+++ b/lib/lp/codehosting/__init__.py
@@ -7,8 +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.
"""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = [
'get_brz_path',
diff --git a/lib/lp/codehosting/bzrutils.py b/lib/lp/codehosting/bzrutils.py
index 3793be7..ee7efd6 100644
--- a/lib/lp/codehosting/bzrutils.py
+++ b/lib/lp/codehosting/bzrutils.py
@@ -7,8 +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.
"""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = [
'add_exception_logging_hook',
diff --git a/lib/lp/codehosting/inmemory.py b/lib/lp/codehosting/inmemory.py
index 54ac995..2ac0c58 100644
--- a/lib/lp/codehosting/inmemory.py
+++ b/lib/lp/codehosting/inmemory.py
@@ -3,8 +3,6 @@
"""In-memory doubles of core codehosting objects."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = [
'InMemoryFrontend',
diff --git a/lib/lp/codehosting/puller/__init__.py b/lib/lp/codehosting/puller/__init__.py
index a7e963e..48ec941 100644
--- a/lib/lp/codehosting/puller/__init__.py
+++ b/lib/lp/codehosting/puller/__init__.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).
-from __future__ import absolute_import, print_function
-
__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 e2fbf88..e0b8363 100644
--- a/lib/lp/codehosting/puller/scheduler.py
+++ b/lib/lp/codehosting/puller/scheduler.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).
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = [
'BadMessage',
diff --git a/lib/lp/codehosting/puller/tests/__init__.py b/lib/lp/codehosting/puller/tests/__init__.py
index d0e8566..350eda7 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."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
import io
diff --git a/lib/lp/codehosting/puller/tests/test_acceptance.py b/lib/lp/codehosting/puller/tests/test_acceptance.py
index e40dc37..1f59b12 100644
--- a/lib/lp/codehosting/puller/tests/test_acceptance.py
+++ b/lib/lp/codehosting/puller/tests/test_acceptance.py
@@ -3,8 +3,6 @@
"""End-to-end tests for the branch puller."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = []
diff --git a/lib/lp/codehosting/puller/tests/test_errors.py b/lib/lp/codehosting/puller/tests/test_errors.py
index bd9abfa..18ae10e 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."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
import os
diff --git a/lib/lp/codehosting/puller/tests/test_scheduler.py b/lib/lp/codehosting/puller/tests/test_scheduler.py
index 6aabd08..f2a3f0a 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).
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
import logging
diff --git a/lib/lp/codehosting/puller/tests/test_worker.py b/lib/lp/codehosting/puller/tests/test_worker.py
index e011e54..bdef0a4 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."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
import gc
diff --git a/lib/lp/codehosting/puller/tests/test_worker_formats.py b/lib/lp/codehosting/puller/tests/test_worker_formats.py
index a3c9e14..6996659 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."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
from breezy.branch import Branch
diff --git a/lib/lp/codehosting/puller/worker.py b/lib/lp/codehosting/puller/worker.py
index 10e38f0..4ccfcbe 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).
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
import socket
diff --git a/lib/lp/codehosting/rewrite.py b/lib/lp/codehosting/rewrite.py
index 43f608e..f59520b 100644
--- a/lib/lp/codehosting/rewrite.py
+++ b/lib/lp/codehosting/rewrite.py
@@ -4,8 +4,6 @@
"""Implementation of the dynamic RewriteMap used to serve branches over HTTP.
"""
-from __future__ import absolute_import, print_function
-
import time
from breezy import urlutils
diff --git a/lib/lp/codehosting/scanner/buglinks.py b/lib/lp/codehosting/scanner/buglinks.py
index ece2d0e..116fb90 100644
--- a/lib/lp/codehosting/scanner/buglinks.py
+++ b/lib/lp/codehosting/scanner/buglinks.py
@@ -3,8 +3,6 @@
"""Bugs support for the scanner."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = [
'BugBranchLinker',
diff --git a/lib/lp/codehosting/scanner/bzrsync.py b/lib/lp/codehosting/scanner/bzrsync.py
index bcf8960..158f222 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."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = [
diff --git a/lib/lp/codehosting/scanner/email.py b/lib/lp/codehosting/scanner/email.py
index 914b380..7a184b4 100644
--- a/lib/lp/codehosting/scanner/email.py
+++ b/lib/lp/codehosting/scanner/email.py
@@ -3,8 +3,6 @@
"""Email code for the branch scanner."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = [
'send_removed_revision_emails',
diff --git a/lib/lp/codehosting/scanner/events.py b/lib/lp/codehosting/scanner/events.py
index c5754c9..5687c33 100644
--- a/lib/lp/codehosting/scanner/events.py
+++ b/lib/lp/codehosting/scanner/events.py
@@ -3,8 +3,6 @@
"""Events generated by the scanner."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = [
'NewMainlineRevisions',
diff --git a/lib/lp/codehosting/scanner/mergedetection.py b/lib/lp/codehosting/scanner/mergedetection.py
index 4811b40..135b64f 100644
--- a/lib/lp/codehosting/scanner/mergedetection.py
+++ b/lib/lp/codehosting/scanner/mergedetection.py
@@ -3,8 +3,6 @@
"""The way the branch scanner handles merges."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = [
'auto_merge_branches',
diff --git a/lib/lp/codehosting/scanner/tests/test_buglinks.py b/lib/lp/codehosting/scanner/tests/test_buglinks.py
index a2286ac..bc78cc5 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."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
from breezy.revision import Revision
diff --git a/lib/lp/codehosting/scanner/tests/test_bzrsync.py b/lib/lp/codehosting/scanner/tests/test_bzrsync.py
index 4650909..77ef3d5 100644
--- a/lib/lp/codehosting/scanner/tests/test_bzrsync.py
+++ b/lib/lp/codehosting/scanner/tests/test_bzrsync.py
@@ -3,8 +3,6 @@
# Copyright 2009-2019 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-from __future__ import absolute_import, print_function
-
import datetime
import os
import random
diff --git a/lib/lp/codehosting/scanner/tests/test_email.py b/lib/lp/codehosting/scanner/tests/test_email.py
index 5fb3a8b..3072ec2 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."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
import os
diff --git a/lib/lp/codehosting/scanner/tests/test_mergedetection.py b/lib/lp/codehosting/scanner/tests/test_mergedetection.py
index 2268ca8..023c831 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."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
import logging
diff --git a/lib/lp/codehosting/scripts/modifiedbranches.py b/lib/lp/codehosting/scripts/modifiedbranches.py
index 5ea0255..93acf1a 100644
--- a/lib/lp/codehosting/scripts/modifiedbranches.py
+++ b/lib/lp/codehosting/scripts/modifiedbranches.py
@@ -3,8 +3,6 @@
"""Implementation of the Launchpad script to list modified branches."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = ['ModifiedBranchesScript']
diff --git a/lib/lp/codehosting/scripts/sync_branches.py b/lib/lp/codehosting/scripts/sync_branches.py
index d138a28..004c8b1 100644
--- a/lib/lp/codehosting/scripts/sync_branches.py
+++ b/lib/lp/codehosting/scripts/sync_branches.py
@@ -3,8 +3,6 @@
"""Sync branches from production to a staging environment."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = ['SyncBranchesScript']
diff --git a/lib/lp/codehosting/scripts/tests/test_modifiedbranches.py b/lib/lp/codehosting/scripts/tests/test_modifiedbranches.py
index f7c9d2c..a42696f 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."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
from datetime import datetime
diff --git a/lib/lp/codehosting/scripts/tests/test_sync_branches.py b/lib/lp/codehosting/scripts/tests/test_sync_branches.py
index 9340e88..899ce67 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import os.path
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 d268b8f..5f9443f 100644
--- a/lib/lp/codehosting/scripts/tests/test_upgrade_all_branches.py
+++ b/lib/lp/codehosting/scripts/tests/test_upgrade_all_branches.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).
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
diff --git a/lib/lp/codehosting/sftp.py b/lib/lp/codehosting/sftp.py
index 3d19a07..d103ace 100644
--- a/lib/lp/codehosting/sftp.py
+++ b/lib/lp/codehosting/sftp.py
@@ -12,8 +12,6 @@ The Bazaar Transport is special in two ways:
We call such a transport a "Twisted Transport".
"""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = [
'avatar_to_sftp_server',
diff --git a/lib/lp/codehosting/sshserver/daemon.py b/lib/lp/codehosting/sshserver/daemon.py
index a5ab6c5..648c597 100644
--- a/lib/lp/codehosting/sshserver/daemon.py
+++ b/lib/lp/codehosting/sshserver/daemon.py
@@ -3,8 +3,6 @@
"""Glues the codehosting SSH daemon together."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = [
'ACCESS_LOG_NAME',
diff --git a/lib/lp/codehosting/sshserver/session.py b/lib/lp/codehosting/sshserver/session.py
index 28a0a69..b7debe4 100644
--- a/lib/lp/codehosting/sshserver/session.py
+++ b/lib/lp/codehosting/sshserver/session.py
@@ -3,8 +3,6 @@
"""SSH session implementations for the codehosting SSH server."""
-from __future__ import absolute_import, print_function
-
__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 5141ab7..f906c57 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."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
from lazr.sshserver.auth import (
diff --git a/lib/lp/codehosting/sshserver/tests/test_session.py b/lib/lp/codehosting/sshserver/tests/test_session.py
index 305c65b..83dc1c6 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."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
from twisted.conch.interfaces import ISession
diff --git a/lib/lp/codehosting/tests/helpers.py b/lib/lp/codehosting/tests/helpers.py
index 1104782..b5094df 100644
--- a/lib/lp/codehosting/tests/helpers.py
+++ b/lib/lp/codehosting/tests/helpers.py
@@ -3,8 +3,6 @@
"""Common helpers for codehosting tests."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = [
'AvatarTestCase',
diff --git a/lib/lp/codehosting/tests/servers.py b/lib/lp/codehosting/tests/servers.py
index ad46357..68c4a73 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."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = [
diff --git a/lib/lp/codehosting/tests/test_acceptance.py b/lib/lp/codehosting/tests/test_acceptance.py
index 97a9ec7..df60291 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."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
import os
diff --git a/lib/lp/codehosting/tests/test_breezy.py b/lib/lp/codehosting/tests/test_breezy.py
index 04096d5..7d87efc 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."""
-from __future__ import absolute_import, print_function
-
__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 df421e7..0beeb72 100644
--- a/lib/lp/codehosting/tests/test_bzrutils.py
+++ b/lib/lp/codehosting/tests/test_bzrutils.py
@@ -3,8 +3,6 @@
"""Tests for bzrutils."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
import gc
diff --git a/lib/lp/codehosting/tests/test_format_comparison.py b/lib/lp/codehosting/tests/test_format_comparison.py
index 2f067c8..de06e64 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."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
import unittest
diff --git a/lib/lp/codehosting/tests/test_lpserve.py b/lib/lp/codehosting/tests/test_lpserve.py
index 307a401..6b615d4 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."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
from breezy import errors
diff --git a/lib/lp/codehosting/tests/test_rewrite.py b/lib/lp/codehosting/tests/test_rewrite.py
index 9daa088..7f97deb 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."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
import os
diff --git a/lib/lp/codehosting/tests/test_sftp.py b/lib/lp/codehosting/tests/test_sftp.py
index 0324b89..5d022dd 100644
--- a/lib/lp/codehosting/tests/test_sftp.py
+++ b/lib/lp/codehosting/tests/test_sftp.py
@@ -3,8 +3,6 @@
"""Tests for the transport-backed SFTP server implementation."""
-from __future__ import absolute_import, print_function
-
from contextlib import closing
import os
diff --git a/lib/lp/codehosting/tests/test_upgrade.py b/lib/lp/codehosting/tests/test_upgrade.py
index e27d1cb..1f2843a 100644
--- a/lib/lp/codehosting/tests/test_upgrade.py
+++ b/lib/lp/codehosting/tests/test_upgrade.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).
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
diff --git a/lib/lp/codehosting/upgrade.py b/lib/lp/codehosting/upgrade.py
index 343083b..2159871 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.
"""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = ['Upgrader']
diff --git a/lib/lp/codehosting/vfs/__init__.py b/lib/lp/codehosting/vfs/__init__.py
index 66fbbee..fd82790 100644
--- a/lib/lp/codehosting/vfs/__init__.py
+++ b/lib/lp/codehosting/vfs/__init__.py
@@ -3,8 +3,6 @@
"""A virtual filesystem for hosting Bazaar branches."""
-from __future__ import absolute_import, print_function
-
__all__ = [
'AsyncLaunchpadTransport',
'branch_id_to_path',
diff --git a/lib/lp/codehosting/vfs/branchfs.py b/lib/lp/codehosting/vfs/branchfs.py
index 4604789..7af499f 100644
--- a/lib/lp/codehosting/vfs/branchfs.py
+++ b/lib/lp/codehosting/vfs/branchfs.py
@@ -40,8 +40,6 @@ hooks into operations like `mkdir` and ask the `LaunchpadServer` to make a
branch if appropriate.
"""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = [
'AsyncLaunchpadTransport',
diff --git a/lib/lp/codehosting/vfs/branchfsclient.py b/lib/lp/codehosting/vfs/branchfsclient.py
index aade58e..3307830 100644
--- a/lib/lp/codehosting/vfs/branchfsclient.py
+++ b/lib/lp/codehosting/vfs/branchfsclient.py
@@ -6,8 +6,6 @@
This code talks to the internal XML-RPC server for the branch filesystem.
"""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = [
'BranchFileSystemClient',
diff --git a/lib/lp/codehosting/vfs/hooks.py b/lib/lp/codehosting/vfs/hooks.py
index 044add8..f0dc274 100644
--- a/lib/lp/codehosting/vfs/hooks.py
+++ b/lib/lp/codehosting/vfs/hooks.py
@@ -4,8 +4,6 @@
"""Implementations for the `seen_new_branch_hook` of `BranchFileSystemClient`.
"""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = ['SetProcTitleHook']
diff --git a/lib/lp/codehosting/vfs/tests/test_branchfs.py b/lib/lp/codehosting/vfs/tests/test_branchfs.py
index dabd4ec..72b3677 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."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
import os
diff --git a/lib/lp/codehosting/vfs/tests/test_branchfsclient.py b/lib/lp/codehosting/vfs/tests/test_branchfsclient.py
index e05fce6..3417608 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."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
from testtools.twistedsupport import AsynchronousDeferredRunTest
diff --git a/lib/lp/codehosting/vfs/tests/test_filesystem.py b/lib/lp/codehosting/vfs/tests/test_filesystem.py
index 3f955d6..8101f1b 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."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
import stat
diff --git a/lib/lp/codehosting/vfs/tests/test_hooks.py b/lib/lp/codehosting/vfs/tests/test_hooks.py
index b1bfa07..c6ad986 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."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
from lp.codehosting.vfs.hooks import SetProcTitleHook
diff --git a/lib/lp/codehosting/vfs/tests/test_transport.py b/lib/lp/codehosting/vfs/tests/test_transport.py
index 3f01473..45c155a 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."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
from breezy.tests import per_transport
diff --git a/lib/lp/codehosting/vfs/tests/test_transport_extensions.py b/lib/lp/codehosting/vfs/tests/test_transport_extensions.py
index e6c90b2..56b587f 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."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
from breezy.transport.memory import MemoryTransport
diff --git a/lib/lp/codehosting/vfs/transport.py b/lib/lp/codehosting/vfs/transport.py
index 03192cb..f4248f7 100644
--- a/lib/lp/codehosting/vfs/transport.py
+++ b/lib/lp/codehosting/vfs/transport.py
@@ -8,8 +8,6 @@ module contains utilities for implementing virtual filesystems using
breezy.transport classes.
"""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = [
'AsyncVirtualServer',
diff --git a/lib/lp/oci/browser/hasocirecipes.py b/lib/lp/oci/browser/hasocirecipes.py
index 2df4148..64ed5c9 100644
--- a/lib/lp/oci/browser/hasocirecipes.py
+++ b/lib/lp/oci/browser/hasocirecipes.py
@@ -3,8 +3,6 @@
"""Mixins for browser classes for objects related to OCI recipe."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'HasOCIRecipesMenuMixin',
diff --git a/lib/lp/oci/browser/ocirecipe.py b/lib/lp/oci/browser/ocirecipe.py
index bc978e7..46a4db1 100644
--- a/lib/lp/oci/browser/ocirecipe.py
+++ b/lib/lp/oci/browser/ocirecipe.py
@@ -3,8 +3,6 @@
"""OCI recipe views."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'OCIRecipeAddView',
diff --git a/lib/lp/oci/browser/ocirecipebuild.py b/lib/lp/oci/browser/ocirecipebuild.py
index e6b4003..893212a 100644
--- a/lib/lp/oci/browser/ocirecipebuild.py
+++ b/lib/lp/oci/browser/ocirecipebuild.py
@@ -3,8 +3,6 @@
"""OCI recipe build views."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'OCIRecipeBuildCancelView',
diff --git a/lib/lp/oci/browser/ocirecipesubscription.py b/lib/lp/oci/browser/ocirecipesubscription.py
index c51d303..06086ac 100644
--- a/lib/lp/oci/browser/ocirecipesubscription.py
+++ b/lib/lp/oci/browser/ocirecipesubscription.py
@@ -3,8 +3,6 @@
"""OCI recipe subscription views."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__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 718bc7e..913b849 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/oci/browser/tests/test_ocirecipebuild.py b/lib/lp/oci/browser/tests/test_ocirecipebuild.py
index 25533cf..06f1f8e 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import re
diff --git a/lib/lp/oci/browser/tests/test_ocirecipesubscription.py b/lib/lp/oci/browser/tests/test_ocirecipesubscription.py
index 1f60710..fadb8f7 100644
--- a/lib/lp/oci/browser/tests/test_ocirecipesubscription.py
+++ b/lib/lp/oci/browser/tests/test_ocirecipesubscription.py
@@ -3,8 +3,6 @@
"""Test OCI recipe subscription views."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
diff --git a/lib/lp/oci/interfaces/ocipushrule.py b/lib/lp/oci/interfaces/ocipushrule.py
index 15dddb4..b5dfc77 100644
--- a/lib/lp/oci/interfaces/ocipushrule.py
+++ b/lib/lp/oci/interfaces/ocipushrule.py
@@ -3,8 +3,6 @@
"""Interfaces for handling credentials for OCI registry actions."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'IOCIPushRule',
diff --git a/lib/lp/oci/interfaces/ocirecipe.py b/lib/lp/oci/interfaces/ocirecipe.py
index 827a2cd..98631f6 100644
--- a/lib/lp/oci/interfaces/ocirecipe.py
+++ b/lib/lp/oci/interfaces/ocirecipe.py
@@ -3,8 +3,6 @@
"""Interfaces related to recipes for OCI Images."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'CannotModifyOCIRecipeProcessor',
diff --git a/lib/lp/oci/interfaces/ocirecipebuild.py b/lib/lp/oci/interfaces/ocirecipebuild.py
index 2065558..022f7f8 100644
--- a/lib/lp/oci/interfaces/ocirecipebuild.py
+++ b/lib/lp/oci/interfaces/ocirecipebuild.py
@@ -3,8 +3,6 @@
"""Interfaces for a build record for OCI recipes."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'CannotScheduleRegistryUpload',
diff --git a/lib/lp/oci/interfaces/ocirecipebuildjob.py b/lib/lp/oci/interfaces/ocirecipebuildjob.py
index c0fada6..7d5c885 100644
--- a/lib/lp/oci/interfaces/ocirecipebuildjob.py
+++ b/lib/lp/oci/interfaces/ocirecipebuildjob.py
@@ -3,8 +3,6 @@
"""OCIRecipe build job interfaces"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'IOCIRecipeBuildJob',
diff --git a/lib/lp/oci/interfaces/ocirecipejob.py b/lib/lp/oci/interfaces/ocirecipejob.py
index 5fac142..bc7fd60 100644
--- a/lib/lp/oci/interfaces/ocirecipejob.py
+++ b/lib/lp/oci/interfaces/ocirecipejob.py
@@ -3,8 +3,6 @@
"""Interfaces related to OCI recipe jobs."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'IOCIRecipeJob',
diff --git a/lib/lp/oci/interfaces/ocirecipesubscription.py b/lib/lp/oci/interfaces/ocirecipesubscription.py
index 01bfe4e..511f410 100644
--- a/lib/lp/oci/interfaces/ocirecipesubscription.py
+++ b/lib/lp/oci/interfaces/ocirecipesubscription.py
@@ -3,8 +3,6 @@
"""OCIRecipe subscription model."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'IOCIRecipeSubscription'
diff --git a/lib/lp/oci/interfaces/ociregistryclient.py b/lib/lp/oci/interfaces/ociregistryclient.py
index 71af23a..2a60285 100644
--- a/lib/lp/oci/interfaces/ociregistryclient.py
+++ b/lib/lp/oci/interfaces/ociregistryclient.py
@@ -3,8 +3,6 @@
"""Interface for communication with an OCI registry."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'BlobUploadFailed',
diff --git a/lib/lp/oci/interfaces/ociregistrycredentials.py b/lib/lp/oci/interfaces/ociregistrycredentials.py
index 2388fd9..ec094f7 100644
--- a/lib/lp/oci/interfaces/ociregistrycredentials.py
+++ b/lib/lp/oci/interfaces/ociregistrycredentials.py
@@ -3,8 +3,6 @@
"""Interfaces for handling credentials for OCI registry actions."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'IOCIRegistryCredentials',
diff --git a/lib/lp/oci/model/ocipushrule.py b/lib/lp/oci/model/ocipushrule.py
index ad9dd30..e4a8270 100644
--- a/lib/lp/oci/model/ocipushrule.py
+++ b/lib/lp/oci/model/ocipushrule.py
@@ -3,8 +3,6 @@
"""Registry credentials for use by an `OCIPushRule`."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'OCIDistributionPushRule',
diff --git a/lib/lp/oci/model/ocirecipe.py b/lib/lp/oci/model/ocirecipe.py
index c16be3e..b033aed 100644
--- a/lib/lp/oci/model/ocirecipe.py
+++ b/lib/lp/oci/model/ocirecipe.py
@@ -3,8 +3,6 @@
"""A recipe for building Open Container Initiative images."""
-from __future__ import absolute_import, print_function, unicode_literals
-
from lp.soyuz.interfaces.binarypackagebuild import BuildSetStatus
diff --git a/lib/lp/oci/model/ocirecipebuild.py b/lib/lp/oci/model/ocirecipebuild.py
index e24abb7..9ba77e2 100644
--- a/lib/lp/oci/model/ocirecipebuild.py
+++ b/lib/lp/oci/model/ocirecipebuild.py
@@ -3,8 +3,6 @@
"""A build record for OCI Recipes."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'OCIFile',
diff --git a/lib/lp/oci/model/ocirecipebuildbehaviour.py b/lib/lp/oci/model/ocirecipebuildbehaviour.py
index 86ecceb..8147c77 100644
--- a/lib/lp/oci/model/ocirecipebuildbehaviour.py
+++ b/lib/lp/oci/model/ocirecipebuildbehaviour.py
@@ -6,8 +6,6 @@
Dispatches OCI image build jobs to build-farm slaves.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'OCIRecipeBuildBehaviour',
diff --git a/lib/lp/oci/model/ocirecipebuildjob.py b/lib/lp/oci/model/ocirecipebuildjob.py
index 9ec2e91..09dbc10 100644
--- a/lib/lp/oci/model/ocirecipebuildjob.py
+++ b/lib/lp/oci/model/ocirecipebuildjob.py
@@ -3,8 +3,6 @@
"""OCIRecipe build jobs."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'OCIRecipeBuildJob',
diff --git a/lib/lp/oci/model/ocirecipejob.py b/lib/lp/oci/model/ocirecipejob.py
index dd57542..00fbe2a 100644
--- a/lib/lp/oci/model/ocirecipejob.py
+++ b/lib/lp/oci/model/ocirecipejob.py
@@ -3,7 +3,6 @@
"""A build job for OCI Recipe."""
-from __future__ import absolute_import, print_function, unicode_literals
from lp.buildmaster.model.processor import Processor
from lp.oci.interfaces.ocirecipe import IOCIRecipeSet
diff --git a/lib/lp/oci/model/ocirecipesubscription.py b/lib/lp/oci/model/ocirecipesubscription.py
index 6c17b07..3c9d210 100644
--- a/lib/lp/oci/model/ocirecipesubscription.py
+++ b/lib/lp/oci/model/ocirecipesubscription.py
@@ -3,8 +3,6 @@
"""OCIRecipe subscription model."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'OCIRecipeSubscription'
diff --git a/lib/lp/oci/model/ociregistryclient.py b/lib/lp/oci/model/ociregistryclient.py
index 3de83b0..2c92c1b 100644
--- a/lib/lp/oci/model/ociregistryclient.py
+++ b/lib/lp/oci/model/ociregistryclient.py
@@ -3,8 +3,6 @@
"""Client for talking to an OCI registry."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'OCIRegistryClient'
diff --git a/lib/lp/oci/model/ociregistrycredentials.py b/lib/lp/oci/model/ociregistrycredentials.py
index c5a1a88..771b1b8 100644
--- a/lib/lp/oci/model/ociregistrycredentials.py
+++ b/lib/lp/oci/model/ociregistrycredentials.py
@@ -3,8 +3,6 @@
"""Registry credentials for use by an `OCIPushRule`."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'OCIRegistryCredentials',
diff --git a/lib/lp/oci/subscribers/ocirecipebuild.py b/lib/lp/oci/subscribers/ocirecipebuild.py
index 606157f..d6e0a3b 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.component import getUtility
diff --git a/lib/lp/oci/tests/helpers.py b/lib/lp/oci/tests/helpers.py
index b656ca6..751bd9f 100644
--- a/lib/lp/oci/tests/helpers.py
+++ b/lib/lp/oci/tests/helpers.py
@@ -3,8 +3,6 @@
"""Helper methods and mixins for OCI tests."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = []
diff --git a/lib/lp/oci/tests/test_ocipushrule.py b/lib/lp/oci/tests/test_ocipushrule.py
index 4c6db56..52fee49 100644
--- a/lib/lp/oci/tests/test_ocipushrule.py
+++ b/lib/lp/oci/tests/test_ocipushrule.py
@@ -3,8 +3,6 @@
"""Tests for OCI registry push rules."""
-from __future__ import absolute_import, print_function, unicode_literals
-
from storm.store import Store
from testtools.matchers import MatchesStructure
from zope.component import getUtility
diff --git a/lib/lp/oci/tests/test_ocirecipe.py b/lib/lp/oci/tests/test_ocirecipe.py
index c3bb8f8..6bab89e 100644
--- a/lib/lp/oci/tests/test_ocirecipe.py
+++ b/lib/lp/oci/tests/test_ocirecipe.py
@@ -3,8 +3,6 @@
"""Tests for OCI image building recipe functionality."""
-from __future__ import absolute_import, print_function, unicode_literals
-
from datetime import datetime
import json
diff --git a/lib/lp/oci/tests/test_ocirecipebuild.py b/lib/lp/oci/tests/test_ocirecipebuild.py
index 46aa803..c86169e 100644
--- a/lib/lp/oci/tests/test_ocirecipebuild.py
+++ b/lib/lp/oci/tests/test_ocirecipebuild.py
@@ -3,8 +3,6 @@
"""Tests for OCI image building recipe functionality."""
-from __future__ import absolute_import, print_function, unicode_literals
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/oci/tests/test_ocirecipebuildbehaviour.py b/lib/lp/oci/tests/test_ocirecipebuildbehaviour.py
index a7058d4..a29408b 100644
--- a/lib/lp/oci/tests/test_ocirecipebuildbehaviour.py
+++ b/lib/lp/oci/tests/test_ocirecipebuildbehaviour.py
@@ -3,8 +3,6 @@
"""Tests for `OCIRecipeBuildBehaviour`."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import base64
diff --git a/lib/lp/oci/tests/test_ocirecipebuildjob.py b/lib/lp/oci/tests/test_ocirecipebuildjob.py
index 9dfb785..d2b3929 100644
--- a/lib/lp/oci/tests/test_ocirecipebuildjob.py
+++ b/lib/lp/oci/tests/test_ocirecipebuildjob.py
@@ -3,8 +3,6 @@
"""OCIRecipeBuildJob tests"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import os
diff --git a/lib/lp/oci/tests/test_ocirecipejob.py b/lib/lp/oci/tests/test_ocirecipejob.py
index 962d442..f61e90b 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.component import getUtility
diff --git a/lib/lp/oci/tests/test_ociregistryclient.py b/lib/lp/oci/tests/test_ociregistryclient.py
index e4799c4..c5b1118 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import base64
diff --git a/lib/lp/oci/tests/test_ociregistrycredentials.py b/lib/lp/oci/tests/test_ociregistrycredentials.py
index 33bebd7..1680091 100644
--- a/lib/lp/oci/tests/test_ociregistrycredentials.py
+++ b/lib/lp/oci/tests/test_ociregistrycredentials.py
@@ -3,8 +3,6 @@
"""Tests for OCI image registry credential storage."""
-from __future__ import absolute_import, print_function, unicode_literals
-
import json
from testtools import ExpectedException
diff --git a/lib/lp/oci/vocabularies.py b/lib/lp/oci/vocabularies.py
index 250d24b..27b9d59 100644
--- a/lib/lp/oci/vocabularies.py
+++ b/lib/lp/oci/vocabularies.py
@@ -3,8 +3,6 @@
"""OCI vocabularies."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = []
diff --git a/lib/lp/registry/browser/distribution.py b/lib/lp/registry/browser/distribution.py
index aa8a74c..f6e47cf 100644
--- a/lib/lp/registry/browser/distribution.py
+++ b/lib/lp/registry/browser/distribution.py
@@ -3,8 +3,6 @@
"""Browser views for distributions."""
-from __future__ import division
-
__metaclass__ = type
__all__ = [
diff --git a/lib/lp/registry/browser/ociproject.py b/lib/lp/registry/browser/ociproject.py
index 6126566..756703e 100644
--- a/lib/lp/registry/browser/ociproject.py
+++ b/lib/lp/registry/browser/ociproject.py
@@ -3,8 +3,6 @@
"""Views, menus, and traversal related to `OCIProject`s."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'OCIProjectBreadcrumb',
diff --git a/lib/lp/registry/browser/personociproject.py b/lib/lp/registry/browser/personociproject.py
index 3b81dba..6e4c4af 100644
--- a/lib/lp/registry/browser/personociproject.py
+++ b/lib/lp/registry/browser/personociproject.py
@@ -3,8 +3,6 @@
"""Views, menus, and traversal related to `PersonOCIProject`s."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'PersonOCIProjectNavigation',
diff --git a/lib/lp/registry/browser/tests/test_announcements.py b/lib/lp/registry/browser/tests/test_announcements.py
index 1178d4a..6667f25 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import datetime
diff --git a/lib/lp/registry/browser/tests/test_breadcrumbs.py b/lib/lp/registry/browser/tests/test_breadcrumbs.py
index 6c30093..a0ca5bf 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.component import getUtility
diff --git a/lib/lp/registry/browser/tests/test_codeofconduct.py b/lib/lp/registry/browser/tests/test_codeofconduct.py
index fb2cc0a..4547250 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from testtools.matchers import MatchesRegex
diff --git a/lib/lp/registry/browser/tests/test_distribution.py b/lib/lp/registry/browser/tests/test_distribution.py
index ec2d8d0..5e3f7bf 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from fixtures import FakeLogger
diff --git a/lib/lp/registry/browser/tests/test_ociproject.py b/lib/lp/registry/browser/tests/test_ociproject.py
index e08267f..23a6ec6 100644
--- a/lib/lp/registry/browser/tests/test_ociproject.py
+++ b/lib/lp/registry/browser/tests/test_ociproject.py
@@ -4,8 +4,6 @@
"""Test OCI project views."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = []
diff --git a/lib/lp/registry/browser/tests/test_person.py b/lib/lp/registry/browser/tests/test_person.py
index beb6b9e..2b015ce 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).
-from __future__ import unicode_literals
-
__metaclass__ = type
import doctest
diff --git a/lib/lp/registry/browser/tests/test_poll.py b/lib/lp/registry/browser/tests/test_poll.py
index 7da8c34..d4bf0d1 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/registry/browser/tests/test_team.py b/lib/lp/registry/browser/tests/test_team.py
index 03a7d3f..07cb918 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import contextlib
diff --git a/lib/lp/registry/browser/widgets/ocicredentialswidget.py b/lib/lp/registry/browser/widgets/ocicredentialswidget.py
index d6ccdad..90105f6 100644
--- a/lib/lp/registry/browser/widgets/ocicredentialswidget.py
+++ b/lib/lp/registry/browser/widgets/ocicredentialswidget.py
@@ -3,8 +3,6 @@
"""Browser widget for handling a single `IOCICredentials`."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__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 d7c09cf..a6c6dd2 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"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lazr.restful.fields import Reference
diff --git a/lib/lp/registry/interfaces/ociproject.py b/lib/lp/registry/interfaces/ociproject.py
index df95639..e650c75 100644
--- a/lib/lp/registry/interfaces/ociproject.py
+++ b/lib/lp/registry/interfaces/ociproject.py
@@ -3,8 +3,6 @@
"""OCI Project interfaces."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'CannotDeleteOCIProject',
diff --git a/lib/lp/registry/interfaces/ociprojectname.py b/lib/lp/registry/interfaces/ociprojectname.py
index e2ed738..694c3ee 100644
--- a/lib/lp/registry/interfaces/ociprojectname.py
+++ b/lib/lp/registry/interfaces/ociprojectname.py
@@ -3,8 +3,6 @@
"""OCI Project Name interfaces."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'IOCIProjectName',
diff --git a/lib/lp/registry/interfaces/ociprojectseries.py b/lib/lp/registry/interfaces/ociprojectseries.py
index ee20e4b..27de38b 100644
--- a/lib/lp/registry/interfaces/ociprojectseries.py
+++ b/lib/lp/registry/interfaces/ociprojectseries.py
@@ -3,8 +3,6 @@
"""Interfaces to allow bug filing on multiple versions of an OCI Project."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'IOCIProjectSeries',
diff --git a/lib/lp/registry/interfaces/personociproject.py b/lib/lp/registry/interfaces/personociproject.py
index b676239..1f4a106 100644
--- a/lib/lp/registry/interfaces/personociproject.py
+++ b/lib/lp/registry/interfaces/personociproject.py
@@ -3,8 +3,6 @@
"""A person's view on an OCI project."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'IPersonOCIProject',
diff --git a/lib/lp/registry/model/ociproject.py b/lib/lp/registry/model/ociproject.py
index 965c83c..1f99135 100644
--- a/lib/lp/registry/model/ociproject.py
+++ b/lib/lp/registry/model/ociproject.py
@@ -3,8 +3,6 @@
"""OCI Project implementation."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'OCIProject',
diff --git a/lib/lp/registry/model/ociprojectname.py b/lib/lp/registry/model/ociprojectname.py
index 5591bd8..517a0b4 100644
--- a/lib/lp/registry/model/ociprojectname.py
+++ b/lib/lp/registry/model/ociprojectname.py
@@ -3,8 +3,6 @@
"""OCI Project Name implementation."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'OCIProjectName',
diff --git a/lib/lp/registry/model/ociprojectseries.py b/lib/lp/registry/model/ociprojectseries.py
index 5d935d6..b57e5cd 100644
--- a/lib/lp/registry/model/ociprojectseries.py
+++ b/lib/lp/registry/model/ociprojectseries.py
@@ -3,8 +3,6 @@
"""Model implementing `IOCIProjectSeries`."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'OCIProjectSeries',
diff --git a/lib/lp/registry/model/personnotification.py b/lib/lp/registry/model/personnotification.py
index 0f03322..a6b0f8a 100644
--- a/lib/lp/registry/model/personnotification.py
+++ b/lib/lp/registry/model/personnotification.py
@@ -3,8 +3,6 @@
"""Person notifications."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'PersonNotification',
diff --git a/lib/lp/registry/model/personociproject.py b/lib/lp/registry/model/personociproject.py
index 3a1ec86..64a7d95 100644
--- a/lib/lp/registry/model/personociproject.py
+++ b/lib/lp/registry/model/personociproject.py
@@ -3,8 +3,6 @@
"""A person's view on an OCI project."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = []
diff --git a/lib/lp/registry/model/poll.py b/lib/lp/registry/model/poll.py
index 7f9a626..d4b6878 100644
--- a/lib/lp/registry/model/poll.py
+++ b/lib/lp/registry/model/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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'Poll',
diff --git a/lib/lp/registry/scripts/productreleasefinder/path.py b/lib/lp/registry/scripts/productreleasefinder/path.py
index c86a75e..defdf13 100644
--- a/lib/lp/registry/scripts/productreleasefinder/path.py
+++ b/lib/lp/registry/scripts/productreleasefinder/path.py
@@ -8,8 +8,6 @@ extracting useful information out of them. It was extracted from cscvs, and
cut down to only what Launchpad's product release finder needs.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
import os
import re
import stat
diff --git a/lib/lp/registry/scripts/tests/test_closeaccount.py b/lib/lp/registry/scripts/tests/test_closeaccount.py
index 33ccd7a..205ef41 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import six
diff --git a/lib/lp/registry/tests/test_codeofconduct.py b/lib/lp/registry/tests/test_codeofconduct.py
index baf64a2..0fd03e8 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from textwrap import dedent
diff --git a/lib/lp/registry/tests/test_mailinglist.py b/lib/lp/registry/tests/test_mailinglist.py
index f29d036..3ac95f5 100644
--- a/lib/lp/registry/tests/test_mailinglist.py
+++ b/lib/lp/registry/tests/test_mailinglist.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = []
diff --git a/lib/lp/registry/tests/test_mailinglistapi.py b/lib/lp/registry/tests/test_mailinglistapi.py
index 43178f6..c52fef0 100644
--- a/lib/lp/registry/tests/test_mailinglistapi.py
+++ b/lib/lp/registry/tests/test_mailinglistapi.py
@@ -3,8 +3,6 @@
"""Unit tests for the private MailingList API."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = []
diff --git a/lib/lp/registry/tests/test_mlists.py b/lib/lp/registry/tests/test_mlists.py
index f7325c8..a656372 100644
--- a/lib/lp/registry/tests/test_mlists.py
+++ b/lib/lp/registry/tests/test_mlists.py
@@ -3,8 +3,6 @@
"""Test mailing list stuff."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
diff --git a/lib/lp/registry/tests/test_ociproject.py b/lib/lp/registry/tests/test_ociproject.py
index f345d3f..df8858a 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`."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import json
diff --git a/lib/lp/registry/tests/test_ociprojectname.py b/lib/lp/registry/tests/test_ociprojectname.py
index 09411f5..b59f027 100644
--- a/lib/lp/registry/tests/test_ociprojectname.py
+++ b/lib/lp/registry/tests/test_ociprojectname.py
@@ -3,8 +3,6 @@
"""Test OCIProjectName."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.component import getUtility
diff --git a/lib/lp/registry/tests/test_ociprojectseries.py b/lib/lp/registry/tests/test_ociprojectseries.py
index 4f51fd1..78c4445 100644
--- a/lib/lp/registry/tests/test_ociprojectseries.py
+++ b/lib/lp/registry/tests/test_ociprojectseries.py
@@ -3,8 +3,6 @@
"""Test OCIProjectSeries."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from six import string_types
diff --git a/lib/lp/registry/tests/test_personociproject.py b/lib/lp/registry/tests/test_personociproject.py
index 650fa84..25c9517 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.component import getUtility
diff --git a/lib/lp/registry/tests/test_poll.py b/lib/lp/registry/tests/test_poll.py
index 1ec211f..ebd2dde 100644
--- a/lib/lp/registry/tests/test_poll.py
+++ b/lib/lp/registry/tests/test_poll.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/registry/tests/test_team_webservice.py b/lib/lp/registry/tests/test_team_webservice.py
index 533a8f9..1525f85 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).
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
from lazr.restfulclient.errors import (
diff --git a/lib/lp/scripts/garbo.py b/lib/lp/scripts/garbo.py
index 1d1a8da..fba6c29 100644
--- a/lib/lp/scripts/garbo.py
+++ b/lib/lp/scripts/garbo.py
@@ -3,8 +3,6 @@
"""Database garbage collection."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'DailyDatabaseGarbageCollector',
diff --git a/lib/lp/scripts/harness.py b/lib/lp/scripts/harness.py
index 037c7c8..c94d382 100644
--- a/lib/lp/scripts/harness.py
+++ b/lib/lp/scripts/harness.py
@@ -9,8 +9,6 @@ launchpad_dev or the database specified on the command line.
One uses Python, the other iPython.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = ['python', 'ipython']
diff --git a/lib/lp/scripts/helpers.py b/lib/lp/scripts/helpers.py
index 99922c3..a534c6c 100644
--- a/lib/lp/scripts/helpers.py
+++ b/lib/lp/scripts/helpers.py
@@ -3,8 +3,6 @@
"""Helpers for command line tools."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = ["LPOptionParser", "TransactionFreeOperation", ]
diff --git a/lib/lp/scripts/runlaunchpad.py b/lib/lp/scripts/runlaunchpad.py
index 7a26b6d..7115a81 100644
--- a/lib/lp/scripts/runlaunchpad.py
+++ b/lib/lp/scripts/runlaunchpad.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = ['start_launchpad']
diff --git a/lib/lp/scripts/scriptmonitor.py b/lib/lp/scripts/scriptmonitor.py
index 57b1426..72dad3e 100644
--- a/lib/lp/scripts/scriptmonitor.py
+++ b/lib/lp/scripts/scriptmonitor.py
@@ -3,8 +3,6 @@
"""Monitor whether scripts have run between specified time periods."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = ['check_script']
diff --git a/lib/lp/scripts/tests/test_garbo.py b/lib/lp/scripts/tests/test_garbo.py
index fc7fb34..287960d 100644
--- a/lib/lp/scripts/tests/test_garbo.py
+++ b/lib/lp/scripts/tests/test_garbo.py
@@ -3,8 +3,6 @@
"""Test the database garbage collector."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = []
diff --git a/lib/lp/scripts/tests/test_helpers.py b/lib/lp/scripts/tests/test_helpers.py
index b2e442d..8dda0d5 100644
--- a/lib/lp/scripts/tests/test_helpers.py
+++ b/lib/lp/scripts/tests/test_helpers.py
@@ -3,8 +3,6 @@
"""Test the helpers."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from testtools.testcase import ExpectedException
diff --git a/lib/lp/scripts/tests/test_runlaunchpad.py b/lib/lp/scripts/tests/test_runlaunchpad.py
index e2d429f..bd9d540 100644
--- a/lib/lp/scripts/tests/test_runlaunchpad.py
+++ b/lib/lp/scripts/tests/test_runlaunchpad.py
@@ -3,8 +3,6 @@
"""Tests for runlaunchpad.py"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'CommandLineArgumentProcessing',
diff --git a/lib/lp/scripts/tests/test_scriptmonitor.py b/lib/lp/scripts/tests/test_scriptmonitor.py
index 058ee97..95e8b43 100644
--- a/lib/lp/scripts/tests/test_scriptmonitor.py
+++ b/lib/lp/scripts/tests/test_scriptmonitor.py
@@ -3,8 +3,6 @@
"""Test scriptmonitor.py."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from unittest import TestCase
diff --git a/lib/lp/scripts/tests/test_sphinxdocs.py b/lib/lp/scripts/tests/test_sphinxdocs.py
index fe3db6d..30fb601 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import os
diff --git a/lib/lp/scripts/utilities/importpedant.py b/lib/lp/scripts/utilities/importpedant.py
index e19b5f1..dc837e5 100644
--- a/lib/lp/scripts/utilities/importpedant.py
+++ b/lib/lp/scripts/utilities/importpedant.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
import atexit
import itertools
from operator import attrgetter
diff --git a/lib/lp/scripts/utilities/js/jsbuild.py b/lib/lp/scripts/utilities/js/jsbuild.py
index 22f7220..5b7bde8 100644
--- a/lib/lp/scripts/utilities/js/jsbuild.py
+++ b/lib/lp/scripts/utilities/js/jsbuild.py
@@ -3,8 +3,6 @@
"""build.py - Minifies and creates the JS build directory."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'CSSComboFile',
diff --git a/lib/lp/scripts/utilities/js/watchjsbuild.py b/lib/lp/scripts/utilities/js/watchjsbuild.py
index 2b03974..3897128 100755
--- a/lib/lp/scripts/utilities/js/watchjsbuild.py
+++ b/lib/lp/scripts/utilities/js/watchjsbuild.py
@@ -3,8 +3,6 @@
"""Automatically rebuild the JavaScript bundle when source files change."""
-from __future__ import absolute_import, print_function
-
import os
import re
diff --git a/lib/lp/scripts/utilities/killservice.py b/lib/lp/scripts/utilities/killservice.py
index a284ea8..d899ce2 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import logging
diff --git a/lib/lp/scripts/utilities/killtestservices.py b/lib/lp/scripts/utilities/killtestservices.py
index ecf3ddd..c341f64 100755
--- a/lib/lp/scripts/utilities/killtestservices.py
+++ b/lib/lp/scripts/utilities/killtestservices.py
@@ -3,8 +3,6 @@
"""Kill all the test services that may persist between test runs."""
-from __future__ import print_function
-
import sys
from lp.services.config import config
diff --git a/lib/lp/scripts/utilities/settingsauditor.py b/lib/lp/scripts/utilities/settingsauditor.py
index 32794eb..2637aa0 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
diff --git a/lib/lp/scripts/utilities/spriteutil.py b/lib/lp/scripts/utilities/spriteutil.py
index e9f36a5..45fba0b 100755
--- a/lib/lp/scripts/utilities/spriteutil.py
+++ b/lib/lp/scripts/utilities/spriteutil.py
@@ -3,8 +3,6 @@
"""Create sprites."""
-from __future__ import absolute_import, print_function
-
import os
import sys
diff --git a/lib/lp/scripts/utilities/test.py b/lib/lp/scripts/utilities/test.py
index 5805258..0f1c9ac 100755
--- a/lib/lp/scripts/utilities/test.py
+++ b/lib/lp/scripts/utilities/test.py
@@ -13,8 +13,6 @@
##############################################################################
"""Test script."""
-from __future__ import absolute_import, print_function, unicode_literals
-
import argparse
import doctest
import os
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 87a5388..3a0e13d 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lp.scripts.utilities.settingsauditor import SettingsAuditor
diff --git a/lib/lp/scripts/utilities/tests/test_shhh.py b/lib/lp/scripts/utilities/tests/test_shhh.py
index c00e2f8..4908e22 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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from doctest import DocTestSuite
diff --git a/lib/lp/scripts/utilities/tests/test_versioninfo.py b/lib/lp/scripts/utilities/tests/test_versioninfo.py
index 1c45181..a23100c 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from textwrap import dedent
diff --git a/lib/lp/scripts/utilities/versioninfo.py b/lib/lp/scripts/utilities/versioninfo.py
index ad1b86a..d59042e 100644
--- a/lib/lp/scripts/utilities/versioninfo.py
+++ b/lib/lp/scripts/utilities/versioninfo.py
@@ -6,8 +6,6 @@
This is useful in deployment scripts.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = ['main']
diff --git a/lib/lp/scripts/utilities/warninghandler.py b/lib/lp/scripts/utilities/warninghandler.py
index fb6373b..3620a1c 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."""
-from __future__ import print_function
-
__metaclass__ = type
import inspect
diff --git a/lib/lp/scripts/utilities/withxvfb.py b/lib/lp/scripts/utilities/withxvfb.py
index c541016..c466d82 100755
--- a/lib/lp/scripts/utilities/withxvfb.py
+++ b/lib/lp/scripts/utilities/withxvfb.py
@@ -10,8 +10,6 @@ Follows sinzui's advice to the launchpad-dev list:
https://lists.launchpad.net/launchpad-dev/msg07879.html
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
import os
import sys
diff --git a/lib/lp/services/authserver/testing.py b/lib/lp/services/authserver/testing.py
index ab47c87..5c47d78 100644
--- a/lib/lp/services/authserver/testing.py
+++ b/lib/lp/services/authserver/testing.py
@@ -3,8 +3,6 @@
"""In-process authserver fixture."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'InProcessAuthServerFixture',
diff --git a/lib/lp/services/beautifulsoup.py b/lib/lp/services/beautifulsoup.py
index c1b5b44..9266ad3 100644
--- a/lib/lp/services/beautifulsoup.py
+++ b/lib/lp/services/beautifulsoup.py
@@ -3,8 +3,6 @@
"""Beautiful Soup wrapper for Launchpad."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'BeautifulSoup',
diff --git a/lib/lp/services/compat.py b/lib/lp/services/compat.py
index 887651c..9f6d16a 100644
--- a/lib/lp/services/compat.py
+++ b/lib/lp/services/compat.py
@@ -6,8 +6,6 @@
Use this for things that six doesn't provide.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'escape',
diff --git a/lib/lp/services/config/__init__.py b/lib/lp/services/config/__init__.py
index 0a0df59..b045e11 100644
--- a/lib/lp/services/config/__init__.py
+++ b/lib/lp/services/config/__init__.py
@@ -8,8 +8,6 @@ The configuration section used is specified using the LPCONFIG
environment variable, and defaults to 'development'
'''
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
diff --git a/lib/lp/services/crypto/interfaces.py b/lib/lp/services/crypto/interfaces.py
index 32a9a62..f7bcb80 100644
--- a/lib/lp/services/crypto/interfaces.py
+++ b/lib/lp/services/crypto/interfaces.py
@@ -3,8 +3,6 @@
"""Interface to data encrypted at rest using configured keys."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'CryptoError',
diff --git a/lib/lp/services/crypto/model.py b/lib/lp/services/crypto/model.py
index f66bbbb..a7dc377 100644
--- a/lib/lp/services/crypto/model.py
+++ b/lib/lp/services/crypto/model.py
@@ -3,8 +3,6 @@
"""A container for data encrypted at rest using configured keys."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'NaClEncryptedContainerBase',
diff --git a/lib/lp/services/crypto/scripts/generatekeypair.py b/lib/lp/services/crypto/scripts/generatekeypair.py
index 3fca73e..6420358 100644
--- a/lib/lp/services/crypto/scripts/generatekeypair.py
+++ b/lib/lp/services/crypto/scripts/generatekeypair.py
@@ -8,8 +8,6 @@ in Launchpad configuration files. The private key should only be stored in
secret overlays on systems that need it.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = ['main']
diff --git a/lib/lp/services/crypto/scripts/tests/test_generatekeypair.py b/lib/lp/services/crypto/scripts/tests/test_generatekeypair.py
index 343b918..fc6727c 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import base64
diff --git a/lib/lp/services/crypto/tests/test_model.py b/lib/lp/services/crypto/tests/test_model.py
index 4039df1..c7843c0 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from nacl.public import PrivateKey
diff --git a/lib/lp/services/database/debug.py b/lib/lp/services/database/debug.py
index fef9033..2c0e5ea 100644
--- a/lib/lp/services/database/debug.py
+++ b/lib/lp/services/database/debug.py
@@ -5,8 +5,6 @@
Replace the psycopg connect method with one that returns a wrapped connection.
'''
-from __future__ import absolute_import, print_function
-
import logging
import textwrap
import traceback
diff --git a/lib/lp/services/database/postgresql.py b/lib/lp/services/database/postgresql.py
index f11afac..462edc6 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
"""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
import re
diff --git a/lib/lp/services/database/sort_sql.py b/lib/lp/services/database/sort_sql.py
index 360e5a4..a981423 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/.
"""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
import re
diff --git a/lib/lp/services/database/sqlbase.py b/lib/lp/services/database/sqlbase.py
index 9d53175..cf7d5d5 100644
--- a/lib/lp/services/database/sqlbase.py
+++ b/lib/lp/services/database/sqlbase.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).
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = [
'block_implicit_flushes',
diff --git a/lib/lp/services/database/tests/script_isolation.py b/lib/lp/services/database/tests/script_isolation.py
index 9857c13..a3385c1 100644
--- a/lib/lp/services/database/tests/script_isolation.py
+++ b/lib/lp/services/database/tests/script_isolation.py
@@ -5,8 +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."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = []
diff --git a/lib/lp/services/database/tests/test_indexes.py b/lib/lp/services/database/tests/test_indexes.py
index f19c9ff..1d1e8c1 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from testscenarios import (
diff --git a/lib/lp/services/database/tests/test_stormbase.py b/lib/lp/services/database/tests/test_stormbase.py
index 6abfa1f..711c274 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."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from storm.locals import Int
diff --git a/lib/lp/services/feeds/tests/helper.py b/lib/lp/services/feeds/tests/helper.py
index 69221e7..ffa84a4 100644
--- a/lib/lp/services/feeds/tests/helper.py
+++ b/lib/lp/services/feeds/tests/helper.py
@@ -3,8 +3,6 @@
"""Helper functions for testing feeds."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = [
'IThing',
diff --git a/lib/lp/services/inlinehelp/browser.py b/lib/lp/services/inlinehelp/browser.py
index a851ad1..d553934 100644
--- a/lib/lp/services/inlinehelp/browser.py
+++ b/lib/lp/services/inlinehelp/browser.py
@@ -7,8 +7,6 @@ This package contains a base Help Folder implementation along a ZCML directive
for registering help folders.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'HelpFolder',
diff --git a/lib/lp/services/inlinehelp/tests/test_doc.py b/lib/lp/services/inlinehelp/tests/test_doc.py
index fe8955d..2bb6519 100644
--- a/lib/lp/services/inlinehelp/tests/test_doc.py
+++ b/lib/lp/services/inlinehelp/tests/test_doc.py
@@ -5,8 +5,6 @@
Run the doctests.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
from lp.testing.systemdocs import (
LayeredDocFileSuite,
setGlobs,
diff --git a/lib/lp/services/inlinehelp/zcml.py b/lib/lp/services/inlinehelp/zcml.py
index 13909f7..a2754da 100644
--- a/lib/lp/services/inlinehelp/zcml.py
+++ b/lib/lp/services/inlinehelp/zcml.py
@@ -3,8 +3,6 @@
"""ZCML directive for help folder registrations."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = []
diff --git a/lib/lp/services/job/celeryconfig.py b/lib/lp/services/job/celeryconfig.py
index aee9919..e218c6a 100644
--- a/lib/lp/services/job/celeryconfig.py
+++ b/lib/lp/services/job/celeryconfig.py
@@ -1,8 +1,6 @@
# Copyright 2012-2019 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-from __future__ import absolute_import, print_function
-
from datetime import timedelta
import sys
diff --git a/lib/lp/services/librarian/tests/test_smoketest.py b/lib/lp/services/librarian/tests/test_smoketest.py
index 992cf38..70c6973 100644
--- a/lib/lp/services/librarian/tests/test_smoketest.py
+++ b/lib/lp/services/librarian/tests/test_smoketest.py
@@ -3,8 +3,6 @@
"""Test the script that does a smoke-test of the librarian."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from functools import partial
diff --git a/lib/lp/services/librarianserver/apachelogparser.py b/lib/lp/services/librarianserver/apachelogparser.py
index d967a0a..478bdab 100644
--- a/lib/lp/services/librarianserver/apachelogparser.py
+++ b/lib/lp/services/librarianserver/apachelogparser.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
import re
diff --git a/lib/lp/services/librarianserver/db.py b/lib/lp/services/librarianserver/db.py
index 41119df..dc59db5 100644
--- a/lib/lp/services/librarianserver/db.py
+++ b/lib/lp/services/librarianserver/db.py
@@ -3,8 +3,6 @@
"""Database access layer for the Librarian."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'Library',
diff --git a/lib/lp/services/librarianserver/librariangc.py b/lib/lp/services/librarianserver/librariangc.py
index e9f0f11..74d1a01 100644
--- a/lib/lp/services/librarianserver/librariangc.py
+++ b/lib/lp/services/librarianserver/librariangc.py
@@ -3,8 +3,6 @@
"""Librarian garbage collection routines"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
try:
diff --git a/lib/lp/services/librarianserver/libraryprotocol.py b/lib/lp/services/librarianserver/libraryprotocol.py
index 5d49257..c59ca28 100644
--- a/lib/lp/services/librarianserver/libraryprotocol.py
+++ b/lib/lp/services/librarianserver/libraryprotocol.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import datetime
diff --git a/lib/lp/services/librarianserver/storage.py b/lib/lp/services/librarianserver/storage.py
index a79df08..053f37d 100644
--- a/lib/lp/services/librarianserver/storage.py
+++ b/lib/lp/services/librarianserver/storage.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import errno
diff --git a/lib/lp/services/librarianserver/swift.py b/lib/lp/services/librarianserver/swift.py
index 662b2fa..3f0c6eb 100644
--- a/lib/lp/services/librarianserver/swift.py
+++ b/lib/lp/services/librarianserver/swift.py
@@ -3,8 +3,6 @@
"""Move files from Librarian disk storage into Swift."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'SWIFT_CONTAINER_PREFIX',
diff --git a/lib/lp/services/librarianserver/testing/fake.py b/lib/lp/services/librarianserver/testing/fake.py
index 46ca6f1..c482abe 100644
--- a/lib/lp/services/librarianserver/testing/fake.py
+++ b/lib/lp/services/librarianserver/testing/fake.py
@@ -10,8 +10,6 @@ provides a simple and fast alternative to the full Librarian in unit
tests.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'FakeLibrarian',
diff --git a/lib/lp/services/librarianserver/testing/server.py b/lib/lp/services/librarianserver/testing/server.py
index 535d504..47e0749 100644
--- a/lib/lp/services/librarianserver/testing/server.py
+++ b/lib/lp/services/librarianserver/testing/server.py
@@ -3,8 +3,6 @@
"""Fixture for the librarians."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'fillLibrarianFile',
diff --git a/lib/lp/services/librarianserver/testing/tests/test_fakelibrarian.py b/lib/lp/services/librarianserver/testing/tests/test_fakelibrarian.py
index d4cc436..ac849c5 100644
--- a/lib/lp/services/librarianserver/testing/tests/test_fakelibrarian.py
+++ b/lib/lp/services/librarianserver/testing/tests/test_fakelibrarian.py
@@ -3,8 +3,6 @@
"""Test the fake librarian."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import io
diff --git a/lib/lp/services/librarianserver/testing/tests/test_server_fixture.py b/lib/lp/services/librarianserver/testing/tests/test_server_fixture.py
index 421e4a4..c315ca4 100644
--- a/lib/lp/services/librarianserver/testing/tests/test_server_fixture.py
+++ b/lib/lp/services/librarianserver/testing/tests/test_server_fixture.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).
-from __future__ import with_statement
-
"""Test the LibrarianServerFixture."""
__metaclass__ = type
diff --git a/lib/lp/services/librarianserver/tests/test_apachelogparser.py b/lib/lp/services/librarianserver/tests/test_apachelogparser.py
index 12dccf3..6d30c26 100644
--- a/lib/lp/services/librarianserver/tests/test_apachelogparser.py
+++ b/lib/lp/services/librarianserver/tests/test_apachelogparser.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
from datetime import datetime
import io
import os
diff --git a/lib/lp/services/librarianserver/tests/test_db.py b/lib/lp/services/librarianserver/tests/test_db.py
index 5329ae4..e6b8ad5 100644
--- a/lib/lp/services/librarianserver/tests/test_db.py
+++ b/lib/lp/services/librarianserver/tests/test_db.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from fixtures import MockPatchObject
diff --git a/lib/lp/services/librarianserver/tests/test_db_outage.py b/lib/lp/services/librarianserver/tests/test_db_outage.py
index 8642ace..d6fa401 100644
--- a/lib/lp/services/librarianserver/tests/test_db_outage.py
+++ b/lib/lp/services/librarianserver/tests/test_db_outage.py
@@ -5,8 +5,6 @@
Database outages happen by accident and during fastdowntime deployments."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import io
diff --git a/lib/lp/services/librarianserver/tests/test_doc.py b/lib/lp/services/librarianserver/tests/test_doc.py
index 77a3844..f77fef5 100644
--- a/lib/lp/services/librarianserver/tests/test_doc.py
+++ b/lib/lp/services/librarianserver/tests/test_doc.py
@@ -5,8 +5,6 @@
Run the doctests and pagetests.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import os
diff --git a/lib/lp/services/librarianserver/tests/test_gc.py b/lib/lp/services/librarianserver/tests/test_gc.py
index ff4d696..9163899 100644
--- a/lib/lp/services/librarianserver/tests/test_gc.py
+++ b/lib/lp/services/librarianserver/tests/test_gc.py
@@ -3,8 +3,6 @@
"""Librarian garbage collection tests"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import calendar
diff --git a/lib/lp/services/librarianserver/tests/test_sigdumpmem.py b/lib/lp/services/librarianserver/tests/test_sigdumpmem.py
index 8bb7443..65801be 100644
--- a/lib/lp/services/librarianserver/tests/test_sigdumpmem.py
+++ b/lib/lp/services/librarianserver/tests/test_sigdumpmem.py
@@ -3,8 +3,6 @@
"""Test the SIGDUMPMEM signal handler."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import os
diff --git a/lib/lp/services/librarianserver/tests/test_storage.py b/lib/lp/services/librarianserver/tests/test_storage.py
index 59b7cda..c71a056 100644
--- a/lib/lp/services/librarianserver/tests/test_storage.py
+++ b/lib/lp/services/librarianserver/tests/test_storage.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
import hashlib
import shutil
import tempfile
diff --git a/lib/lp/services/librarianserver/tests/test_storage_db.py b/lib/lp/services/librarianserver/tests/test_storage_db.py
index 94dbec6..dd78f09 100644
--- a/lib/lp/services/librarianserver/tests/test_storage_db.py
+++ b/lib/lp/services/librarianserver/tests/test_storage_db.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
import hashlib
import os.path
diff --git a/lib/lp/services/librarianserver/tests/test_swift.py b/lib/lp/services/librarianserver/tests/test_swift.py
index 61a4a3d..f3513e7 100644
--- a/lib/lp/services/librarianserver/tests/test_swift.py
+++ b/lib/lp/services/librarianserver/tests/test_swift.py
@@ -3,8 +3,6 @@
"""Librarian disk to Swift storage tests."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import hashlib
diff --git a/lib/lp/services/librarianserver/tests/test_web.py b/lib/lp/services/librarianserver/tests/test_web.py
index 4366f07..5a326f8 100644
--- a/lib/lp/services/librarianserver/tests/test_web.py
+++ b/lib/lp/services/librarianserver/tests/test_web.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import datetime
diff --git a/lib/lp/services/librarianserver/web.py b/lib/lp/services/librarianserver/web.py
index 4bd8cce..5f9ff1c 100644
--- a/lib/lp/services/librarianserver/web.py
+++ b/lib/lp/services/librarianserver/web.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import datetime
diff --git a/lib/lp/services/log/logger.py b/lib/lp/services/log/logger.py
index 07ddd84..050295f 100644
--- a/lib/lp/services/log/logger.py
+++ b/lib/lp/services/log/logger.py
@@ -3,8 +3,6 @@
"""Loggers."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = [
'BufferLogger',
diff --git a/lib/lp/services/macaroons/interfaces.py b/lib/lp/services/macaroons/interfaces.py
index cb4d70d..b3eb98e 100644
--- a/lib/lp/services/macaroons/interfaces.py
+++ b/lib/lp/services/macaroons/interfaces.py
@@ -3,8 +3,6 @@
"""Interface to a policy for issuing and verifying macaroons."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'BadMacaroonContext',
diff --git a/lib/lp/services/macaroons/model.py b/lib/lp/services/macaroons/model.py
index e24f8e8..80af063 100644
--- a/lib/lp/services/macaroons/model.py
+++ b/lib/lp/services/macaroons/model.py
@@ -3,8 +3,6 @@
"""Policies for issuing and verifying macaroons."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
"MacaroonIssuerBase",
diff --git a/lib/lp/services/macaroons/testing.py b/lib/lp/services/macaroons/testing.py
index c4952f2..b86ed3d 100644
--- a/lib/lp/services/macaroons/testing.py
+++ b/lib/lp/services/macaroons/testing.py
@@ -3,8 +3,6 @@
"""Macaroon testing helpers."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'find_caveats_by_name',
diff --git a/lib/lp/services/mail/mbox.py b/lib/lp/services/mail/mbox.py
index 8cb2942..d0e2137 100644
--- a/lib/lp/services/mail/mbox.py
+++ b/lib/lp/services/mail/mbox.py
@@ -3,8 +3,6 @@
"""An IMailer that stores messages in a specified mbox file."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from contextlib import closing
diff --git a/lib/lp/services/mail/notification.py b/lib/lp/services/mail/notification.py
index 784a20e..1d55202 100644
--- a/lib/lp/services/mail/notification.py
+++ b/lib/lp/services/mail/notification.py
@@ -2,8 +2,6 @@
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Event handlers that send email notifications."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = [
'send_process_error_notification',
diff --git a/lib/lp/services/mail/tests/test_stub.py b/lib/lp/services/mail/tests/test_stub.py
index f3b1c01..85a549f 100644
--- a/lib/lp/services/mail/tests/test_stub.py
+++ b/lib/lp/services/mail/tests/test_stub.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).
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
from doctest import DocTestSuite
diff --git a/lib/lp/services/memoizer.py b/lib/lp/services/memoizer.py
index ba6f58d..573c89c 100644
--- a/lib/lp/services/memoizer.py
+++ b/lib/lp/services/memoizer.py
@@ -3,8 +3,6 @@
"""Simple memoization decorator for functions and methods"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'memoize',
diff --git a/lib/lp/services/messages/interfaces/messagerevision.py b/lib/lp/services/messages/interfaces/messagerevision.py
index 43f0c9a..ed50f4b 100644
--- a/lib/lp/services/messages/interfaces/messagerevision.py
+++ b/lib/lp/services/messages/interfaces/messagerevision.py
@@ -3,8 +3,6 @@
"""Message revision history."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__all__ = [
'IMessageRevision',
'IMessageRevisionChunk',
diff --git a/lib/lp/services/messages/model/messagerevision.py b/lib/lp/services/messages/model/messagerevision.py
index 5dc20e3..c289352 100644
--- a/lib/lp/services/messages/model/messagerevision.py
+++ b/lib/lp/services/messages/model/messagerevision.py
@@ -3,8 +3,6 @@
"""Message revision history."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'MessageRevision',
diff --git a/lib/lp/services/openid/extensions/tests/test_macaroon.py b/lib/lp/services/openid/extensions/tests/test_macaroon.py
index c87f6cc..bcbc8a8 100644
--- a/lib/lp/services/openid/extensions/tests/test_macaroon.py
+++ b/lib/lp/services/openid/extensions/tests/test_macaroon.py
@@ -1,8 +1,6 @@
# Copyright 2016 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from openid.consumer.consumer import SuccessResponse
diff --git a/lib/lp/services/openid/fetcher.py b/lib/lp/services/openid/fetcher.py
index 3575124..f4cf360 100644
--- a/lib/lp/services/openid/fetcher.py
+++ b/lib/lp/services/openid/fetcher.py
@@ -3,8 +3,6 @@
"""OpenID consumer configuration."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
diff --git a/lib/lp/services/profile/mem.py b/lib/lp/services/profile/mem.py
index 42deda6..788d1fa 100644
--- a/lib/lp/services/profile/mem.py
+++ b/lib/lp/services/profile/mem.py
@@ -16,8 +16,6 @@ and improve APIs as needed.
"""
-from __future__ import absolute_import, print_function
-
__metatype__ = type
__all__ = [
'classesWithMostRefs',
diff --git a/lib/lp/services/rabbit/server.py b/lib/lp/services/rabbit/server.py
index b446efd..eca1047 100644
--- a/lib/lp/services/rabbit/server.py
+++ b/lib/lp/services/rabbit/server.py
@@ -3,8 +3,6 @@
"""RabbitMQ server fixture."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'RabbitServer',
diff --git a/lib/lp/services/rabbit/tests/test_server.py b/lib/lp/services/rabbit/tests/test_server.py
index 1ab2d5a..ea931d2 100644
--- a/lib/lp/services/rabbit/tests/test_server.py
+++ b/lib/lp/services/rabbit/tests/test_server.py
@@ -3,8 +3,6 @@
"""Tests for lp.services.rabbit.RabbitServer."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import io
diff --git a/lib/lp/services/scripts/doc/scripts-and-zcml.txt b/lib/lp/services/scripts/doc/scripts-and-zcml.txt
index 73386e4..43ec349 100644
--- a/lib/lp/services/scripts/doc/scripts-and-zcml.txt
+++ b/lib/lp/services/scripts/doc/scripts-and-zcml.txt
@@ -13,8 +13,6 @@ to demonstrate this:
>>> from textwrap import dedent
>>> script_file = tempfile.NamedTemporaryFile(mode='w')
>>> _ = script_file.write(dedent("""\
- ... from __future__ import absolute_import, print_function
- ...
... from lp.services.scripts import execute_zcml_for_scripts
... from lp.registry.interfaces.person import IPersonSet
... from zope.component import getUtility
diff --git a/lib/lp/services/scripts/tests/loglevels.py b/lib/lp/services/scripts/tests/loglevels.py
index 947f434..3849fc4 100644
--- a/lib/lp/services/scripts/tests/loglevels.py
+++ b/lib/lp/services/scripts/tests/loglevels.py
@@ -6,8 +6,6 @@
Used by test_logger.txt.
"""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = []
diff --git a/lib/lp/services/signing/proxy.py b/lib/lp/services/signing/proxy.py
index 2cb5393..ea083c7 100644
--- a/lib/lp/services/signing/proxy.py
+++ b/lib/lp/services/signing/proxy.py
@@ -3,8 +3,6 @@
"""Proxy calls to lp-signing service"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import base64
diff --git a/lib/lp/services/signing/testing/fakesigning.py b/lib/lp/services/signing/testing/fakesigning.py
index 91e2e59..9d0def8 100644
--- a/lib/lp/services/signing/testing/fakesigning.py
+++ b/lib/lp/services/signing/testing/fakesigning.py
@@ -3,8 +3,6 @@
"""Twisted resources implementing a fake signing service."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'SigningServiceResource',
diff --git a/lib/lp/services/signing/testing/fakesigning.tac b/lib/lp/services/signing/testing/fakesigning.tac
index d828ba5..74adc1f 100644
--- a/lib/lp/services/signing/testing/fakesigning.tac
+++ b/lib/lp/services/signing/testing/fakesigning.tac
@@ -3,8 +3,6 @@
"""Twisted application configuration file for a fake signing service."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import os
diff --git a/lib/lp/services/signing/testing/fixture.py b/lib/lp/services/signing/testing/fixture.py
index 9b763bb..e6a9034 100644
--- a/lib/lp/services/signing/testing/fixture.py
+++ b/lib/lp/services/signing/testing/fixture.py
@@ -3,8 +3,6 @@
"""Fake signing service fixture."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
"SigningServiceFixture",
diff --git a/lib/lp/services/signing/tests/helpers.py b/lib/lp/services/signing/tests/helpers.py
index 6831edb..ee53228 100644
--- a/lib/lp/services/signing/tests/helpers.py
+++ b/lib/lp/services/signing/tests/helpers.py
@@ -3,8 +3,6 @@
"""Helper functions for code testing live here."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'SigningServiceClientFixture',
diff --git a/lib/lp/services/sitesearch/bingtestservice.py b/lib/lp/services/sitesearch/bingtestservice.py
index 859f980..8ece5eb 100755
--- a/lib/lp/services/sitesearch/bingtestservice.py
+++ b/lib/lp/services/sitesearch/bingtestservice.py
@@ -8,8 +8,6 @@ This script runs a simple HTTP server. The server returns JSON files
when given certain user-configurable URLs.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import logging
diff --git a/lib/lp/services/sitesearch/tests/test_bing.py b/lib/lp/services/sitesearch/tests/test_bing.py
index c7f9e82..4498669 100644
--- a/lib/lp/services/sitesearch/tests/test_bing.py
+++ b/lib/lp/services/sitesearch/tests/test_bing.py
@@ -3,8 +3,6 @@
"""Test the bing search service."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import json
diff --git a/lib/lp/services/sitesearch/tests/test_testservices.py b/lib/lp/services/sitesearch/tests/test_testservices.py
index 2474003..0497ac1 100644
--- a/lib/lp/services/sitesearch/tests/test_testservices.py
+++ b/lib/lp/services/sitesearch/tests/test_testservices.py
@@ -3,8 +3,6 @@
"""Unit tests for sitesearch test service stubs."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
diff --git a/lib/lp/services/spriteutils.py b/lib/lp/services/spriteutils.py
index 826e36a..2ecd703 100644
--- a/lib/lp/services/spriteutils.py
+++ b/lib/lp/services/spriteutils.py
@@ -6,8 +6,6 @@
"""Library to create sprites."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = [
diff --git a/lib/lp/services/statsd/interfaces/statsd_client.py b/lib/lp/services/statsd/interfaces/statsd_client.py
index 1d8d4a9..7957063 100644
--- a/lib/lp/services/statsd/interfaces/statsd_client.py
+++ b/lib/lp/services/statsd/interfaces/statsd_client.py
@@ -3,8 +3,6 @@
"""Interfaces for configuring and retrieving a statsd client."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = ['IStatsdClient']
diff --git a/lib/lp/services/statsd/model/statsd_client.py b/lib/lp/services/statsd/model/statsd_client.py
index 6b924d2..8ecfff3 100644
--- a/lib/lp/services/statsd/model/statsd_client.py
+++ b/lib/lp/services/statsd/model/statsd_client.py
@@ -3,8 +3,6 @@
"""Statsd client wrapper with Launchpad configuration"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = ['StatsdClient']
diff --git a/lib/lp/services/statsd/numbercruncher.py b/lib/lp/services/statsd/numbercruncher.py
index 1a1417a..2d6feaa 100644
--- a/lib/lp/services/statsd/numbercruncher.py
+++ b/lib/lp/services/statsd/numbercruncher.py
@@ -3,8 +3,6 @@
"""Out of process statsd reporting."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = ['NumberCruncher']
diff --git a/lib/lp/services/statsd/tests/__init__.py b/lib/lp/services/statsd/tests/__init__.py
index c9c9ef5..7ab45cc 100644
--- a/lib/lp/services/statsd/tests/__init__.py
+++ b/lib/lp/services/statsd/tests/__init__.py
@@ -3,8 +3,6 @@
"""Utility mixins for testing statsd handling"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = ['StatsMixin']
diff --git a/lib/lp/services/statsd/tests/test_numbercruncher.py b/lib/lp/services/statsd/tests/test_numbercruncher.py
index 2149de1..33d6443 100644
--- a/lib/lp/services/statsd/tests/test_numbercruncher.py
+++ b/lib/lp/services/statsd/tests/test_numbercruncher.py
@@ -3,8 +3,6 @@
"""Tests for the stats number cruncher daemon."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import datetime
diff --git a/lib/lp/services/statsd/tests/test_statsd_client.py b/lib/lp/services/statsd/tests/test_statsd_client.py
index 709b41c..e1af27d 100644
--- a/lib/lp/services/statsd/tests/test_statsd_client.py
+++ b/lib/lp/services/statsd/tests/test_statsd_client.py
@@ -3,8 +3,6 @@
"""Tests for the Launchpad statsd client"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from statsd import StatsClient
diff --git a/lib/lp/services/testing/profiled.py b/lib/lp/services/testing/profiled.py
index 1ab83b8..659e454 100644
--- a/lib/lp/services/testing/profiled.py
+++ b/lib/lp/services/testing/profiled.py
@@ -3,8 +3,6 @@
"""Profile the test layers."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = ['profiled', 'setup_profiling']
diff --git a/lib/lp/services/tests/test_encoding.py b/lib/lp/services/tests/test_encoding.py
index e271e55..4a0e235 100644
--- a/lib/lp/services/tests/test_encoding.py
+++ b/lib/lp/services/tests/test_encoding.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
from doctest import (
DocTestSuite,
ELLIPSIS,
@@ -40,13 +38,7 @@ class TestWSGINativeString(TestCase):
def test_suite():
- globs = {
- 'absolute_import': absolute_import,
- 'print_function': print_function,
- 'unicode_literals': unicode_literals,
- }
return unittest.TestSuite((
unittest.TestLoader().loadTestsFromName(__name__),
- DocTestSuite(
- lp.services.encoding, extraglobs=globs, optionflags=ELLIPSIS),
+ DocTestSuite(lp.services.encoding, optionflags=ELLIPSIS),
))
diff --git a/lib/lp/services/tests/test_helpers.py b/lib/lp/services/tests/test_helpers.py
index b0383dc..4a1aa84 100644
--- a/lib/lp/services/tests/test_helpers.py
+++ b/lib/lp/services/tests/test_helpers.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).
-from __future__ import absolute_import, print_function
-
from doctest import DocTestSuite
from textwrap import dedent
import unittest
diff --git a/lib/lp/services/tests/test_memoizer.py b/lib/lp/services/tests/test_memoizer.py
index 4c8fa30..42197f3 100644
--- a/lib/lp/services/tests/test_memoizer.py
+++ b/lib/lp/services/tests/test_memoizer.py
@@ -3,8 +3,6 @@
"""Tests memoizer decorators"""
-from __future__ import absolute_import, print_function, unicode_literals
-
from lp.services.compat import mock
from lp.services.memoizer import memoize
from lp.testing import TestCase
diff --git a/lib/lp/services/twistedsupport/plugincache.py b/lib/lp/services/twistedsupport/plugincache.py
index 7cf1f2a..76dc8fa 100644
--- a/lib/lp/services/twistedsupport/plugincache.py
+++ b/lib/lp/services/twistedsupport/plugincache.py
@@ -10,8 +10,6 @@ fail if any part of the process of importing the plugin installs a default
reactor.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from twisted.plugin import (
diff --git a/lib/lp/services/twistedsupport/testing.py b/lib/lp/services/twistedsupport/testing.py
index 968dea4..4817c38 100644
--- a/lib/lp/services/twistedsupport/testing.py
+++ b/lib/lp/services/twistedsupport/testing.py
@@ -3,8 +3,6 @@
"""Test-specific Twisted utilities."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'TReqFixture',
diff --git a/lib/lp/services/twistedsupport/treq.py b/lib/lp/services/twistedsupport/treq.py
index dde49a8..8949632 100644
--- a/lib/lp/services/twistedsupport/treq.py
+++ b/lib/lp/services/twistedsupport/treq.py
@@ -3,8 +3,6 @@
"""Utilities for HTTP request handling with Twisted and treq."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'check_status',
diff --git a/lib/lp/services/webapp/login.py b/lib/lp/services/webapp/login.py
index 0e914f5..551c304 100644
--- a/lib/lp/services/webapp/login.py
+++ b/lib/lp/services/webapp/login.py
@@ -2,8 +2,6 @@
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Stuff to do with logging in and logging out."""
-from __future__ import absolute_import
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/services/webapp/notifications.py b/lib/lp/services/webapp/notifications.py
index 151ab02..9b48a68 100644
--- a/lib/lp/services/webapp/notifications.py
+++ b/lib/lp/services/webapp/notifications.py
@@ -12,8 +12,6 @@ to do this correctly is by passing a token in the URL to identify the
browser window the request came from.
"""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
from datetime import datetime
diff --git a/lib/lp/services/webapp/opstats.py b/lib/lp/services/webapp/opstats.py
index 6b626ce..943e334 100644
--- a/lib/lp/services/webapp/opstats.py
+++ b/lib/lp/services/webapp/opstats.py
@@ -3,8 +3,6 @@
"""XML-RPC interface for extracting real time stats from the appserver."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = ["OpStats"]
diff --git a/lib/lp/services/webapp/servers.py b/lib/lp/services/webapp/servers.py
index 69a443c..d637916 100644
--- a/lib/lp/services/webapp/servers.py
+++ b/lib/lp/services/webapp/servers.py
@@ -3,8 +3,6 @@
"""Definition of the internet servers that Launchpad uses."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
import threading
diff --git a/lib/lp/services/webapp/sorting.py b/lib/lp/services/webapp/sorting.py
index 81a907f..7aca0e5 100644
--- a/lib/lp/services/webapp/sorting.py
+++ b/lib/lp/services/webapp/sorting.py
@@ -3,8 +3,6 @@
"""This module contains sorting utility functions."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = ['expand_numbers',
'sorted_version_numbers',
diff --git a/lib/lp/services/webapp/status.py b/lib/lp/services/webapp/status.py
index 684dd69..60209fe 100644
--- a/lib/lp/services/webapp/status.py
+++ b/lib/lp/services/webapp/status.py
@@ -3,8 +3,6 @@
"""Health check view for Talisker."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
"StatusCheckView",
diff --git a/lib/lp/services/webapp/tests/test_notifications.py b/lib/lp/services/webapp/tests/test_notifications.py
index 1b9b335..ea20d0d 100644
--- a/lib/lp/services/webapp/tests/test_notifications.py
+++ b/lib/lp/services/webapp/tests/test_notifications.py
@@ -3,11 +3,8 @@
"""Module docstring goes here."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
-import __future__
from doctest import DocTestSuite
import unittest
@@ -87,8 +84,6 @@ def setUp(test):
lambda x: mock_browser_request, (INotificationRequest,),
IBrowserRequest)
- for future_item in 'absolute_import', 'print_function':
- test.globs[future_item] = getattr(__future__, future_item)
test.globs['MockResponse'] = MockHTTPApplicationResponse
test.globs['structured'] = structured
diff --git a/lib/lp/services/webapp/tests/test_snapshot.py b/lib/lp/services/webapp/tests/test_snapshot.py
index 3d0f6c5..7b7f131 100644
--- a/lib/lp/services/webapp/tests/test_snapshot.py
+++ b/lib/lp/services/webapp/tests/test_snapshot.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lazr.lifecycle.interfaces import IObjectModifiedEvent
diff --git a/lib/lp/services/webapp/tests/test_status.py b/lib/lp/services/webapp/tests/test_status.py
index 2e22da5..64ea450 100644
--- a/lib/lp/services/webapp/tests/test_status.py
+++ b/lib/lp/services/webapp/tests/test_status.py
@@ -3,8 +3,6 @@
"""Test the health check view for Talisker."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from fixtures import FakeLogger
diff --git a/lib/lp/services/webapp/wsgi.py b/lib/lp/services/webapp/wsgi.py
index 4a68591..8749a80 100644
--- a/lib/lp/services/webapp/wsgi.py
+++ b/lib/lp/services/webapp/wsgi.py
@@ -3,8 +3,6 @@
"""Main Launchpad WSGI application."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
"get_wsgi_application",
diff --git a/lib/lp/services/webhooks/testing.py b/lib/lp/services/webhooks/testing.py
index fbf8c2f..602edba 100644
--- a/lib/lp/services/webhooks/testing.py
+++ b/lib/lp/services/webhooks/testing.py
@@ -3,8 +3,6 @@
"""Webhook testing helpers."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'LogsScheduledWebhooks',
diff --git a/lib/lp/services/webservice/tests/test_wadllib.py b/lib/lp/services/webservice/tests/test_wadllib.py
index 07134b4..bda0f27 100644
--- a/lib/lp/services/webservice/tests/test_wadllib.py
+++ b/lib/lp/services/webservice/tests/test_wadllib.py
@@ -3,12 +3,9 @@
"""Run the standalone wadllib tests."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = ['test_suite']
-import __future__
import os
import unittest
@@ -21,11 +18,6 @@ from lp.testing.systemdocs import LayeredDocFileSuite
topdir = os.path.dirname(wadllib.__file__)
-def setUp(test):
- for future_item in 'absolute_import', 'print_function':
- test.globs[future_item] = getattr(__future__, future_item)
-
-
def test_suite():
suite = unittest.TestSuite()
@@ -43,7 +35,7 @@ def test_suite():
# Sort the tests.
for filename in sorted(doctest_files):
path = doctest_files[filename]
- doctest = LayeredDocFileSuite(path, package=wadllib, setUp=setUp)
+ doctest = LayeredDocFileSuite(path, package=wadllib)
suite.addTest(doctest)
return suite
diff --git a/lib/lp/services/worlddata/browser/country.py b/lib/lp/services/worlddata/browser/country.py
index 0641ff1..61cb1be 100644
--- a/lib/lp/services/worlddata/browser/country.py
+++ b/lib/lp/services/worlddata/browser/country.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
from lp.services.webapp import GetitemNavigation
from lp.services.worlddata.interfaces.country import ICountrySet
diff --git a/lib/lp/services/worlddata/helpers.py b/lib/lp/services/worlddata/helpers.py
index 4c7643d..18c38c4 100644
--- a/lib/lp/services/worlddata/helpers.py
+++ b/lib/lp/services/worlddata/helpers.py
@@ -3,8 +3,6 @@
"""Worlddata helper functions."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'browser_languages',
diff --git a/lib/lp/services/worlddata/interfaces/country.py b/lib/lp/services/worlddata/interfaces/country.py
index 1ded91a..a7e087a 100644
--- a/lib/lp/services/worlddata/interfaces/country.py
+++ b/lib/lp/services/worlddata/interfaces/country.py
@@ -3,8 +3,6 @@
"""Country interfaces."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
diff --git a/lib/lp/services/worlddata/interfaces/language.py b/lib/lp/services/worlddata/interfaces/language.py
index 82038ac..b3879ec 100644
--- a/lib/lp/services/worlddata/interfaces/language.py
+++ b/lib/lp/services/worlddata/interfaces/language.py
@@ -3,8 +3,6 @@
"""Language interfaces."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
diff --git a/lib/lp/services/worlddata/interfaces/spokenin.py b/lib/lp/services/worlddata/interfaces/spokenin.py
index 6546067..d9d5818 100644
--- a/lib/lp/services/worlddata/interfaces/spokenin.py
+++ b/lib/lp/services/worlddata/interfaces/spokenin.py
@@ -5,8 +5,6 @@
countries..
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = ['ISpokenIn']
diff --git a/lib/lp/services/worlddata/interfaces/timezone.py b/lib/lp/services/worlddata/interfaces/timezone.py
index 25ed2ab..435e503 100644
--- a/lib/lp/services/worlddata/interfaces/timezone.py
+++ b/lib/lp/services/worlddata/interfaces/timezone.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'ITimezoneNameVocabulary',
diff --git a/lib/lp/services/worlddata/interfaces/webservice.py b/lib/lp/services/worlddata/interfaces/webservice.py
index dc3b900..009ffca 100644
--- a/lib/lp/services/worlddata/interfaces/webservice.py
+++ b/lib/lp/services/worlddata/interfaces/webservice.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.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__all__ = [
'ICountry',
'ICountrySet',
diff --git a/lib/lp/services/worlddata/model/country.py b/lib/lp/services/worlddata/model/country.py
index 387a84a..8ced15c 100644
--- a/lib/lp/services/worlddata/model/country.py
+++ b/lib/lp/services/worlddata/model/country.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = ['Country', 'CountrySet', 'Continent']
diff --git a/lib/lp/services/worlddata/model/language.py b/lib/lp/services/worlddata/model/language.py
index 8edad4f..81c4e5b 100644
--- a/lib/lp/services/worlddata/model/language.py
+++ b/lib/lp/services/worlddata/model/language.py
@@ -2,8 +2,6 @@
# the GNU Affero General Public License version 3 (see the file
# LICENSE).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'Language',
diff --git a/lib/lp/services/worlddata/model/spokenin.py b/lib/lp/services/worlddata/model/spokenin.py
index 6d2f06c..ab51568 100644
--- a/lib/lp/services/worlddata/model/spokenin.py
+++ b/lib/lp/services/worlddata/model/spokenin.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = ['SpokenIn']
diff --git a/lib/lp/services/worlddata/tests/test_doc.py b/lib/lp/services/worlddata/tests/test_doc.py
index 39f6412..a786fdf 100644
--- a/lib/lp/services/worlddata/tests/test_doc.py
+++ b/lib/lp/services/worlddata/tests/test_doc.py
@@ -5,8 +5,6 @@
Run the doctests and pagetests.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
import os
from lp.services.testing import build_test_suite
diff --git a/lib/lp/services/worlddata/tests/test_helpers.py b/lib/lp/services/worlddata/tests/test_helpers.py
index a3b8429..d5e1580 100644
--- a/lib/lp/services/worlddata/tests/test_helpers.py
+++ b/lib/lp/services/worlddata/tests/test_helpers.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
from doctest import DocTestSuite
import unittest
diff --git a/lib/lp/services/worlddata/tests/test_language.py b/lib/lp/services/worlddata/tests/test_language.py
index 797d3d2..b5eafea 100644
--- a/lib/lp/services/worlddata/tests/test_language.py
+++ b/lib/lp/services/worlddata/tests/test_language.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lazr.lifecycle.interfaces import IDoNotSnapshot
diff --git a/lib/lp/services/worlddata/vocabularies.py b/lib/lp/services/worlddata/vocabularies.py
index 6c96021..59a51ff 100644
--- a/lib/lp/services/worlddata/vocabularies.py
+++ b/lib/lp/services/worlddata/vocabularies.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__all__ = [
'CountryNameVocabulary',
'LanguageVocabulary',
diff --git a/lib/lp/services/xref/__init__.py b/lib/lp/services/xref/__init__.py
index f9c6abf..52be813 100644
--- a/lib/lp/services/xref/__init__.py
+++ b/lib/lp/services/xref/__init__.py
@@ -7,7 +7,5 @@ Provides infrastructure for generic information references between
artifacts, easing weak coupling of apps.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = []
diff --git a/lib/lp/services/xref/interfaces.py b/lib/lp/services/xref/interfaces.py
index 32d8ca3..144809f 100644
--- a/lib/lp/services/xref/interfaces.py
+++ b/lib/lp/services/xref/interfaces.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'IXRefSet',
diff --git a/lib/lp/services/xref/model.py b/lib/lp/services/xref/model.py
index 53fad96..233ae02 100644
--- a/lib/lp/services/xref/model.py
+++ b/lib/lp/services/xref/model.py
@@ -1,8 +1,6 @@
# Copyright 2015 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
"XRef",
diff --git a/lib/lp/services/xref/tests/__init__.py b/lib/lp/services/xref/tests/__init__.py
index f625cd9..8501f7c 100644
--- a/lib/lp/services/xref/tests/__init__.py
+++ b/lib/lp/services/xref/tests/__init__.py
@@ -1,7 +1,5 @@
# Copyright 2015 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = []
diff --git a/lib/lp/services/xref/tests/test_model.py b/lib/lp/services/xref/tests/test_model.py
index fd1c455..93b6bc0 100644
--- a/lib/lp/services/xref/tests/test_model.py
+++ b/lib/lp/services/xref/tests/test_model.py
@@ -1,8 +1,6 @@
# Copyright 2015 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import datetime
diff --git a/lib/lp/snappy/adapters/buildarch.py b/lib/lp/snappy/adapters/buildarch.py
index e2c51ce..b10ea24 100644
--- a/lib/lp/snappy/adapters/buildarch.py
+++ b/lib/lp/snappy/adapters/buildarch.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'determine_architectures_to_build',
diff --git a/lib/lp/snappy/adapters/tests/test_buildarch.py b/lib/lp/snappy/adapters/tests/test_buildarch.py
index d4e3926..cbf5eff 100644
--- a/lib/lp/snappy/adapters/tests/test_buildarch.py
+++ b/lib/lp/snappy/adapters/tests/test_buildarch.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from testscenarios import (
diff --git a/lib/lp/snappy/browser/hassnaps.py b/lib/lp/snappy/browser/hassnaps.py
index 9fa983d..2e2d1b0 100644
--- a/lib/lp/snappy/browser/hassnaps.py
+++ b/lib/lp/snappy/browser/hassnaps.py
@@ -3,8 +3,6 @@
"""Mixins for browser classes for objects that implement IHasSnaps."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'HasSnapsMenuMixin',
diff --git a/lib/lp/snappy/browser/snap.py b/lib/lp/snappy/browser/snap.py
index c7b0ea3..9ada661 100644
--- a/lib/lp/snappy/browser/snap.py
+++ b/lib/lp/snappy/browser/snap.py
@@ -3,8 +3,6 @@
"""Snap views."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'SnapAddView',
diff --git a/lib/lp/snappy/browser/snapbase.py b/lib/lp/snappy/browser/snapbase.py
index 73d1139..8eae009 100644
--- a/lib/lp/snappy/browser/snapbase.py
+++ b/lib/lp/snappy/browser/snapbase.py
@@ -3,8 +3,6 @@
"""Views of bases for snaps."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
"SnapBaseNavigation",
diff --git a/lib/lp/snappy/browser/snapbuild.py b/lib/lp/snappy/browser/snapbuild.py
index 7ad92b5..55b3b33 100644
--- a/lib/lp/snappy/browser/snapbuild.py
+++ b/lib/lp/snappy/browser/snapbuild.py
@@ -3,8 +3,6 @@
"""SnapBuild views."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'SnapBuildContextMenu',
diff --git a/lib/lp/snappy/browser/snaplisting.py b/lib/lp/snappy/browser/snaplisting.py
index e59fd29..608bece 100644
--- a/lib/lp/snappy/browser/snaplisting.py
+++ b/lib/lp/snappy/browser/snaplisting.py
@@ -3,8 +3,6 @@
"""Base class view for snap listings."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
diff --git a/lib/lp/snappy/browser/snappyseries.py b/lib/lp/snappy/browser/snappyseries.py
index bea30fb..8fe74bf 100644
--- a/lib/lp/snappy/browser/snappyseries.py
+++ b/lib/lp/snappy/browser/snappyseries.py
@@ -3,8 +3,6 @@
"""SnappySeries views."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'SnappySeriesSetNavigation',
diff --git a/lib/lp/snappy/browser/snapsubscription.py b/lib/lp/snappy/browser/snapsubscription.py
index 4f11ac2..2456f62 100644
--- a/lib/lp/snappy/browser/snapsubscription.py
+++ b/lib/lp/snappy/browser/snapsubscription.py
@@ -3,8 +3,6 @@
"""Snap subscription views."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'SnapPortletSubscribersContent'
diff --git a/lib/lp/snappy/browser/tests/test_hassnaps.py b/lib/lp/snappy/browser/tests/test_hassnaps.py
index d62f8ba..738ef0d 100644
--- a/lib/lp/snappy/browser/tests/test_hassnaps.py
+++ b/lib/lp/snappy/browser/tests/test_hassnaps.py
@@ -3,8 +3,6 @@
"""Test views for objects that have snap packages."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import soupmatchers
diff --git a/lib/lp/snappy/browser/tests/test_snap.py b/lib/lp/snappy/browser/tests/test_snap.py
index 8a96e17..762783d 100644
--- a/lib/lp/snappy/browser/tests/test_snap.py
+++ b/lib/lp/snappy/browser/tests/test_snap.py
@@ -7,8 +7,6 @@
"""Test snap package views."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/snappy/browser/tests/test_snapbuild.py b/lib/lp/snappy/browser/tests/test_snapbuild.py
index 5d6b1b6..13e0a6b 100644
--- a/lib/lp/snappy/browser/tests/test_snapbuild.py
+++ b/lib/lp/snappy/browser/tests/test_snapbuild.py
@@ -3,8 +3,6 @@
"""Test snap package build views."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import re
diff --git a/lib/lp/snappy/browser/tests/test_snaplisting.py b/lib/lp/snappy/browser/tests/test_snaplisting.py
index 9216c91..71a5567 100644
--- a/lib/lp/snappy/browser/tests/test_snaplisting.py
+++ b/lib/lp/snappy/browser/tests/test_snaplisting.py
@@ -3,8 +3,6 @@
"""Test snap package listings."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/snappy/browser/tests/test_snapsubscription.py b/lib/lp/snappy/browser/tests/test_snapsubscription.py
index aafff72..526b49a 100644
--- a/lib/lp/snappy/browser/tests/test_snapsubscription.py
+++ b/lib/lp/snappy/browser/tests/test_snapsubscription.py
@@ -3,8 +3,6 @@
"""Test snap package views."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
diff --git a/lib/lp/snappy/browser/widgets/snaparchive.py b/lib/lp/snappy/browser/widgets/snaparchive.py
index 67a9a6a..52a8b97 100644
--- a/lib/lp/snappy/browser/widgets/snaparchive.py
+++ b/lib/lp/snappy/browser/widgets/snaparchive.py
@@ -1,8 +1,6 @@
# Copyright 2015-2019 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
diff --git a/lib/lp/snappy/browser/widgets/snapbuildchannels.py b/lib/lp/snappy/browser/widgets/snapbuildchannels.py
index e73d1ce..f7e3eb5 100644
--- a/lib/lp/snappy/browser/widgets/snapbuildchannels.py
+++ b/lib/lp/snappy/browser/widgets/snapbuildchannels.py
@@ -3,8 +3,6 @@
"""A widget for selecting source snap channels for builds."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'SnapBuildChannelsWidget',
diff --git a/lib/lp/snappy/browser/widgets/storechannels.py b/lib/lp/snappy/browser/widgets/storechannels.py
index 5190f40..5c29e8e 100644
--- a/lib/lp/snappy/browser/widgets/storechannels.py
+++ b/lib/lp/snappy/browser/widgets/storechannels.py
@@ -1,8 +1,6 @@
# Copyright 2017-2018 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
diff --git a/lib/lp/snappy/browser/widgets/tests/test_snaparchivewidget.py b/lib/lp/snappy/browser/widgets/tests/test_snaparchivewidget.py
index 84a601d..e69aed6 100644
--- a/lib/lp/snappy/browser/widgets/tests/test_snaparchivewidget.py
+++ b/lib/lp/snappy/browser/widgets/tests/test_snaparchivewidget.py
@@ -1,8 +1,6 @@
# Copyright 2015-2019 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from functools import partial
diff --git a/lib/lp/snappy/browser/widgets/tests/test_snapbuildchannelswidget.py b/lib/lp/snappy/browser/widgets/tests/test_snapbuildchannelswidget.py
index 201ad85..4a4861c 100644
--- a/lib/lp/snappy/browser/widgets/tests/test_snapbuildchannelswidget.py
+++ b/lib/lp/snappy/browser/widgets/tests/test_snapbuildchannelswidget.py
@@ -1,8 +1,6 @@
# Copyright 2018-2019 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import re
diff --git a/lib/lp/snappy/browser/widgets/tests/test_storechannelswidget.py b/lib/lp/snappy/browser/widgets/tests/test_storechannelswidget.py
index f6e85fa..b7abc08 100644
--- a/lib/lp/snappy/browser/widgets/tests/test_storechannelswidget.py
+++ b/lib/lp/snappy/browser/widgets/tests/test_storechannelswidget.py
@@ -1,8 +1,6 @@
# Copyright 2017-2018 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import re
diff --git a/lib/lp/snappy/interfaces/snap.py b/lib/lp/snappy/interfaces/snap.py
index 16fd213..9d46bb3 100644
--- a/lib/lp/snappy/interfaces/snap.py
+++ b/lib/lp/snappy/interfaces/snap.py
@@ -3,8 +3,6 @@
"""Snap package interfaces."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
diff --git a/lib/lp/snappy/interfaces/snapbase.py b/lib/lp/snappy/interfaces/snapbase.py
index 21e4729..ea164ae 100644
--- a/lib/lp/snappy/interfaces/snapbase.py
+++ b/lib/lp/snappy/interfaces/snapbase.py
@@ -3,8 +3,6 @@
"""Interfaces for bases for snaps."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
"CannotDeleteSnapBase",
diff --git a/lib/lp/snappy/interfaces/snapbuild.py b/lib/lp/snappy/interfaces/snapbuild.py
index ec81231..6236234 100644
--- a/lib/lp/snappy/interfaces/snapbuild.py
+++ b/lib/lp/snappy/interfaces/snapbuild.py
@@ -3,8 +3,6 @@
"""Snap package build interfaces."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
diff --git a/lib/lp/snappy/interfaces/snapbuildjob.py b/lib/lp/snappy/interfaces/snapbuildjob.py
index 6fe925f..3b174f4 100644
--- a/lib/lp/snappy/interfaces/snapbuildjob.py
+++ b/lib/lp/snappy/interfaces/snapbuildjob.py
@@ -3,8 +3,6 @@
"""Snap build job interfaces."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'ISnapBuildJob',
diff --git a/lib/lp/snappy/interfaces/snapjob.py b/lib/lp/snappy/interfaces/snapjob.py
index 8a10143..4f557cf 100644
--- a/lib/lp/snappy/interfaces/snapjob.py
+++ b/lib/lp/snappy/interfaces/snapjob.py
@@ -3,8 +3,6 @@
"""Snap job interfaces."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'ISnapJob',
diff --git a/lib/lp/snappy/interfaces/snappyseries.py b/lib/lp/snappy/interfaces/snappyseries.py
index c8710b7..375a531 100644
--- a/lib/lp/snappy/interfaces/snappyseries.py
+++ b/lib/lp/snappy/interfaces/snappyseries.py
@@ -3,8 +3,6 @@
"""Snappy series interfaces."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'ISnappyDistroSeries',
diff --git a/lib/lp/snappy/interfaces/snapstoreclient.py b/lib/lp/snappy/interfaces/snapstoreclient.py
index b35a38c..e9ff638 100644
--- a/lib/lp/snappy/interfaces/snapstoreclient.py
+++ b/lib/lp/snappy/interfaces/snapstoreclient.py
@@ -3,8 +3,6 @@
"""Interface for communication with the snap store."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'BadRefreshResponse',
diff --git a/lib/lp/snappy/interfaces/snapsubscription.py b/lib/lp/snappy/interfaces/snapsubscription.py
index 58206cc..296991d 100644
--- a/lib/lp/snappy/interfaces/snapsubscription.py
+++ b/lib/lp/snappy/interfaces/snapsubscription.py
@@ -3,8 +3,6 @@
"""Snap subscription model."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'ISnapSubscription'
diff --git a/lib/lp/snappy/interfaces/webservice.py b/lib/lp/snappy/interfaces/webservice.py
index b978965..30def61 100644
--- a/lib/lp/snappy/interfaces/webservice.py
+++ b/lib/lp/snappy/interfaces/webservice.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.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__all__ = [
'ISnap',
'ISnapBase',
diff --git a/lib/lp/snappy/mail/snapbuild.py b/lib/lp/snappy/mail/snapbuild.py
index 1f36e75..fa85a34 100644
--- a/lib/lp/snappy/mail/snapbuild.py
+++ b/lib/lp/snappy/mail/snapbuild.py
@@ -1,8 +1,6 @@
# Copyright 2015-2017 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'SnapBuildMailer',
diff --git a/lib/lp/snappy/model/snap.py b/lib/lp/snappy/model/snap.py
index 6ec4ac5..cf51374 100644
--- a/lib/lp/snappy/model/snap.py
+++ b/lib/lp/snappy/model/snap.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'get_snap_privacy_filter',
diff --git a/lib/lp/snappy/model/snapbase.py b/lib/lp/snappy/model/snapbase.py
index c2f2a76..c48a684 100644
--- a/lib/lp/snappy/model/snapbase.py
+++ b/lib/lp/snappy/model/snapbase.py
@@ -3,8 +3,6 @@
"""Bases for snaps."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
"SnapBase",
diff --git a/lib/lp/snappy/model/snapbuild.py b/lib/lp/snappy/model/snapbuild.py
index d4d1f6c..ca5285a 100644
--- a/lib/lp/snappy/model/snapbuild.py
+++ b/lib/lp/snappy/model/snapbuild.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'SnapBuild',
diff --git a/lib/lp/snappy/model/snapbuildbehaviour.py b/lib/lp/snappy/model/snapbuildbehaviour.py
index 09a9162..b6fd2ee 100644
--- a/lib/lp/snappy/model/snapbuildbehaviour.py
+++ b/lib/lp/snappy/model/snapbuildbehaviour.py
@@ -6,8 +6,6 @@
Dispatches snap package build jobs to build-farm slaves.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'SnapBuildBehaviour',
diff --git a/lib/lp/snappy/model/snapbuildjob.py b/lib/lp/snappy/model/snapbuildjob.py
index bcdbcd2..9634f62 100644
--- a/lib/lp/snappy/model/snapbuildjob.py
+++ b/lib/lp/snappy/model/snapbuildjob.py
@@ -3,8 +3,6 @@
"""Snap build jobs."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'SnapBuildJob',
diff --git a/lib/lp/snappy/model/snapjob.py b/lib/lp/snappy/model/snapjob.py
index 5b1f08d..db95c3c 100644
--- a/lib/lp/snappy/model/snapjob.py
+++ b/lib/lp/snappy/model/snapjob.py
@@ -3,8 +3,6 @@
"""Snap package jobs."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'SnapJob',
diff --git a/lib/lp/snappy/model/snappyseries.py b/lib/lp/snappy/model/snappyseries.py
index c60fe3b..27e3f73 100644
--- a/lib/lp/snappy/model/snappyseries.py
+++ b/lib/lp/snappy/model/snappyseries.py
@@ -3,8 +3,6 @@
"""Snappy series."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'SnappyDistroSeries',
diff --git a/lib/lp/snappy/model/snapstoreclient.py b/lib/lp/snappy/model/snapstoreclient.py
index 8055438..feba714 100644
--- a/lib/lp/snappy/model/snapstoreclient.py
+++ b/lib/lp/snappy/model/snapstoreclient.py
@@ -3,8 +3,6 @@
"""Communication with the snap store."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'SnapStoreClient',
diff --git a/lib/lp/snappy/model/snapsubscription.py b/lib/lp/snappy/model/snapsubscription.py
index 89860d7..e236bad 100644
--- a/lib/lp/snappy/model/snapsubscription.py
+++ b/lib/lp/snappy/model/snapsubscription.py
@@ -3,8 +3,6 @@
"""Snap subscription model."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'SnapSubscription'
diff --git a/lib/lp/snappy/subscribers/snapbuild.py b/lib/lp/snappy/subscribers/snapbuild.py
index 0eaa0dc..3e433f6 100644
--- a/lib/lp/snappy/subscribers/snapbuild.py
+++ b/lib/lp/snappy/subscribers/snapbuild.py
@@ -3,8 +3,6 @@
"""Event subscribers for snap builds."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.component import getUtility
diff --git a/lib/lp/snappy/tests/test_snap.py b/lib/lp/snappy/tests/test_snap.py
index a3d6c68..a946b58 100644
--- a/lib/lp/snappy/tests/test_snap.py
+++ b/lib/lp/snappy/tests/test_snap.py
@@ -3,8 +3,6 @@
"""Test snap packages."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import base64
diff --git a/lib/lp/snappy/tests/test_snapbase.py b/lib/lp/snappy/tests/test_snapbase.py
index c528f40..af1e756 100644
--- a/lib/lp/snappy/tests/test_snapbase.py
+++ b/lib/lp/snappy/tests/test_snapbase.py
@@ -3,8 +3,6 @@
"""Test bases for snaps."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from testtools.matchers import (
diff --git a/lib/lp/snappy/tests/test_snapbuild.py b/lib/lp/snappy/tests/test_snapbuild.py
index 24ecc1a..4ea06e3 100644
--- a/lib/lp/snappy/tests/test_snapbuild.py
+++ b/lib/lp/snappy/tests/test_snapbuild.py
@@ -3,8 +3,6 @@
"""Test snap package build features."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/snappy/tests/test_snapbuildbehaviour.py b/lib/lp/snappy/tests/test_snapbuildbehaviour.py
index 11462de..b5b1326 100644
--- a/lib/lp/snappy/tests/test_snapbuildbehaviour.py
+++ b/lib/lp/snappy/tests/test_snapbuildbehaviour.py
@@ -3,8 +3,6 @@
"""Test snap package build behaviour."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import base64
diff --git a/lib/lp/snappy/tests/test_snapbuildjob.py b/lib/lp/snappy/tests/test_snapbuildjob.py
index 87a5528..3acefa2 100644
--- a/lib/lp/snappy/tests/test_snapbuildjob.py
+++ b/lib/lp/snappy/tests/test_snapbuildjob.py
@@ -3,8 +3,6 @@
"""Tests for snap build jobs."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import timedelta
diff --git a/lib/lp/snappy/tests/test_snapjob.py b/lib/lp/snappy/tests/test_snapjob.py
index 7eea223..503fd10 100644
--- a/lib/lp/snappy/tests/test_snapjob.py
+++ b/lib/lp/snappy/tests/test_snapjob.py
@@ -3,8 +3,6 @@
"""Tests for snap package jobs."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from textwrap import dedent
diff --git a/lib/lp/snappy/tests/test_snappyseries.py b/lib/lp/snappy/tests/test_snappyseries.py
index 173877a..8a279d3 100644
--- a/lib/lp/snappy/tests/test_snappyseries.py
+++ b/lib/lp/snappy/tests/test_snappyseries.py
@@ -3,8 +3,6 @@
"""Test snappy series."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from testtools.matchers import MatchesStructure
diff --git a/lib/lp/snappy/tests/test_snapstoreclient.py b/lib/lp/snappy/tests/test_snapstoreclient.py
index 4b77cf5..c738171 100644
--- a/lib/lp/snappy/tests/test_snapstoreclient.py
+++ b/lib/lp/snappy/tests/test_snapstoreclient.py
@@ -3,8 +3,6 @@
"""Tests for communication with the snap store."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import base64
diff --git a/lib/lp/snappy/tests/test_yuitests.py b/lib/lp/snappy/tests/test_yuitests.py
index 5aced13..9ac5afc 100644
--- a/lib/lp/snappy/tests/test_yuitests.py
+++ b/lib/lp/snappy/tests/test_yuitests.py
@@ -3,8 +3,6 @@
"""Run YUI.test tests."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = []
diff --git a/lib/lp/snappy/validators/channels.py b/lib/lp/snappy/validators/channels.py
index f091857..f6ed93e 100644
--- a/lib/lp/snappy/validators/channels.py
+++ b/lib/lp/snappy/validators/channels.py
@@ -3,8 +3,6 @@
"""Validators for the .store_channels attribute."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.schema.vocabulary import getVocabularyRegistry
diff --git a/lib/lp/snappy/validators/tests/test_channels.py b/lib/lp/snappy/validators/tests/test_channels.py
index 8b7a800..430cd33 100644
--- a/lib/lp/snappy/validators/tests/test_channels.py
+++ b/lib/lp/snappy/validators/tests/test_channels.py
@@ -1,8 +1,6 @@
# Copyright 2017-2018 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lp.app.validators import LaunchpadValidationError
diff --git a/lib/lp/snappy/vocabularies.py b/lib/lp/snappy/vocabularies.py
index 80e8cd3..26dc155 100644
--- a/lib/lp/snappy/vocabularies.py
+++ b/lib/lp/snappy/vocabularies.py
@@ -3,9 +3,6 @@
"""Snappy vocabularies."""
-from __future__ import absolute_import, print_function, unicode_literals
-
-
__metaclass__ = type
__all__ = [
diff --git a/lib/lp/soyuz/adapters/proxiedsourcefiles.py b/lib/lp/soyuz/adapters/proxiedsourcefiles.py
index 915e87d..d171821 100644
--- a/lib/lp/soyuz/adapters/proxiedsourcefiles.py
+++ b/lib/lp/soyuz/adapters/proxiedsourcefiles.py
@@ -3,8 +3,6 @@
"""Proxied source files."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'ProxiedSourceLibraryFileAlias',
diff --git a/lib/lp/soyuz/adapters/tests/test_archivedependencies.py b/lib/lp/soyuz/adapters/tests/test_archivedependencies.py
index 4eaeab0..5a178cc 100644
--- a/lib/lp/soyuz/adapters/tests/test_archivedependencies.py
+++ b/lib/lp/soyuz/adapters/tests/test_archivedependencies.py
@@ -3,8 +3,6 @@
"""Test archive dependencies."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import os.path
diff --git a/lib/lp/soyuz/browser/tests/test_archive.py b/lib/lp/soyuz/browser/tests/test_archive.py
index ebe470b..a3d78ee 100644
--- a/lib/lp/soyuz/browser/tests/test_archive.py
+++ b/lib/lp/soyuz/browser/tests/test_archive.py
@@ -1,8 +1,6 @@
# Copyright 2014-2019 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from fixtures import FakeLogger
diff --git a/lib/lp/soyuz/browser/tests/test_archive_admin_view.py b/lib/lp/soyuz/browser/tests/test_archive_admin_view.py
index f7243bb..8fa4f0d 100644
--- a/lib/lp/soyuz/browser/tests/test_archive_admin_view.py
+++ b/lib/lp/soyuz/browser/tests/test_archive_admin_view.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lp.services.webapp.servers import LaunchpadTestRequest
diff --git a/lib/lp/soyuz/browser/tests/test_archive_packages.py b/lib/lp/soyuz/browser/tests/test_archive_packages.py
index fb0c062..60d7127 100644
--- a/lib/lp/soyuz/browser/tests/test_archive_packages.py
+++ b/lib/lp/soyuz/browser/tests/test_archive_packages.py
@@ -3,8 +3,6 @@
"""Unit tests for TestP3APackages."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'TestP3APackages',
diff --git a/lib/lp/soyuz/browser/tests/test_archive_webservice.py b/lib/lp/soyuz/browser/tests/test_archive_webservice.py
index cf0e850..c404f6e 100644
--- a/lib/lp/soyuz/browser/tests/test_archive_webservice.py
+++ b/lib/lp/soyuz/browser/tests/test_archive_webservice.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import timedelta
diff --git a/lib/lp/soyuz/browser/tests/test_archivesubscription.py b/lib/lp/soyuz/browser/tests/test_archivesubscription.py
index 73d771b..959d49d 100644
--- a/lib/lp/soyuz/browser/tests/test_archivesubscription.py
+++ b/lib/lp/soyuz/browser/tests/test_archivesubscription.py
@@ -3,8 +3,6 @@
"""Unit tests for ArchiveSubscribersView."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from soupmatchers import (
diff --git a/lib/lp/soyuz/browser/tests/test_breadcrumbs.py b/lib/lp/soyuz/browser/tests/test_breadcrumbs.py
index a473300..9e7f502 100644
--- a/lib/lp/soyuz/browser/tests/test_breadcrumbs.py
+++ b/lib/lp/soyuz/browser/tests/test_breadcrumbs.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.component import getUtility
diff --git a/lib/lp/soyuz/browser/tests/test_build_views.py b/lib/lp/soyuz/browser/tests/test_build_views.py
index fd54d9b..0b4fdd4 100644
--- a/lib/lp/soyuz/browser/tests/test_build_views.py
+++ b/lib/lp/soyuz/browser/tests/test_build_views.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import soupmatchers
diff --git a/lib/lp/soyuz/browser/tests/test_distributionsourcepackagerelease.py b/lib/lp/soyuz/browser/tests/test_distributionsourcepackagerelease.py
index a02af17..e80b8e2 100644
--- a/lib/lp/soyuz/browser/tests/test_distributionsourcepackagerelease.py
+++ b/lib/lp/soyuz/browser/tests/test_distributionsourcepackagerelease.py
@@ -3,8 +3,6 @@
"""Unit tests for TestSourcePackageReleaseFiles."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'TestDistributionSourcePackageReleaseFiles',
diff --git a/lib/lp/soyuz/browser/tests/test_distroarchseries_view.py b/lib/lp/soyuz/browser/tests/test_distroarchseries_view.py
index 8516413..16a5c0c 100644
--- a/lib/lp/soyuz/browser/tests/test_distroarchseries_view.py
+++ b/lib/lp/soyuz/browser/tests/test_distroarchseries_view.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lp.services.webapp.servers import LaunchpadTestRequest
diff --git a/lib/lp/soyuz/browser/tests/test_distroarchseries_webservice.py b/lib/lp/soyuz/browser/tests/test_distroarchseries_webservice.py
index 1db0346..49952de 100644
--- a/lib/lp/soyuz/browser/tests/test_distroarchseries_webservice.py
+++ b/lib/lp/soyuz/browser/tests/test_distroarchseries_webservice.py
@@ -1,8 +1,6 @@
# Copyright 2010-2019 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import hashlib
diff --git a/lib/lp/soyuz/browser/tests/test_distrosourcepackagerelease.py b/lib/lp/soyuz/browser/tests/test_distrosourcepackagerelease.py
index 0efdd40..4510206 100644
--- a/lib/lp/soyuz/browser/tests/test_distrosourcepackagerelease.py
+++ b/lib/lp/soyuz/browser/tests/test_distrosourcepackagerelease.py
@@ -3,8 +3,6 @@
"""Unit tests for DistroSourcePackageRelease pages."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.security.proxy import removeSecurityProxy
diff --git a/lib/lp/soyuz/browser/tests/test_livefs.py b/lib/lp/soyuz/browser/tests/test_livefs.py
index 8216674..4b2cc8a 100644
--- a/lib/lp/soyuz/browser/tests/test_livefs.py
+++ b/lib/lp/soyuz/browser/tests/test_livefs.py
@@ -3,8 +3,6 @@
"""Test live filesystem views."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/soyuz/browser/tests/test_livefsbuild.py b/lib/lp/soyuz/browser/tests/test_livefsbuild.py
index b753054..9db04f1 100644
--- a/lib/lp/soyuz/browser/tests/test_livefsbuild.py
+++ b/lib/lp/soyuz/browser/tests/test_livefsbuild.py
@@ -3,8 +3,6 @@
"""Test live filesystem build views."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from fixtures import FakeLogger
diff --git a/lib/lp/soyuz/browser/tests/test_package_copying_mixin.py b/lib/lp/soyuz/browser/tests/test_package_copying_mixin.py
index a005076..8edc6ef 100644
--- a/lib/lp/soyuz/browser/tests/test_package_copying_mixin.py
+++ b/lib/lp/soyuz/browser/tests/test_package_copying_mixin.py
@@ -3,8 +3,6 @@
"""Tests for `PackageCopyingMixin`."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.component import getUtility
diff --git a/lib/lp/soyuz/browser/tests/test_personal_archive_subscription.py b/lib/lp/soyuz/browser/tests/test_personal_archive_subscription.py
index bfd8da6..106c040 100644
--- a/lib/lp/soyuz/browser/tests/test_personal_archive_subscription.py
+++ b/lib/lp/soyuz/browser/tests/test_personal_archive_subscription.py
@@ -3,8 +3,6 @@
"""Tests for the PersonalArchiveSubscription components and view."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lp.app.interfaces.launchpad import IPrivacy
diff --git a/lib/lp/soyuz/browser/tests/test_publishing.py b/lib/lp/soyuz/browser/tests/test_publishing.py
index 24d41dd..7c06a3e 100644
--- a/lib/lp/soyuz/browser/tests/test_publishing.py
+++ b/lib/lp/soyuz/browser/tests/test_publishing.py
@@ -3,8 +3,6 @@
"""Tests for source package publication listing."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import soupmatchers
diff --git a/lib/lp/soyuz/browser/tests/test_publishing_webservice.py b/lib/lp/soyuz/browser/tests/test_publishing_webservice.py
index 5a43e2f..7de4e83 100644
--- a/lib/lp/soyuz/browser/tests/test_publishing_webservice.py
+++ b/lib/lp/soyuz/browser/tests/test_publishing_webservice.py
@@ -3,8 +3,6 @@
"""Test webservice methods related to the publisher."""
-from __future__ import absolute_import, print_function, unicode_literals
-
from functools import partial
from zope.security.proxy import removeSecurityProxy
diff --git a/lib/lp/soyuz/browser/tests/test_queue.py b/lib/lp/soyuz/browser/tests/test_queue.py
index d8be2f6..998c034 100644
--- a/lib/lp/soyuz/browser/tests/test_queue.py
+++ b/lib/lp/soyuz/browser/tests/test_queue.py
@@ -3,8 +3,6 @@
"""Unit tests for QueueItemsView."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lxml import html
diff --git a/lib/lp/soyuz/browser/tests/test_sourcepackagerelease.py b/lib/lp/soyuz/browser/tests/test_sourcepackagerelease.py
index 9c90f2c..97340b7 100644
--- a/lib/lp/soyuz/browser/tests/test_sourcepackagerelease.py
+++ b/lib/lp/soyuz/browser/tests/test_sourcepackagerelease.py
@@ -3,8 +3,6 @@
"""Unit tests for TestSourcePackageReleaseFiles."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'TestSourcePackageReleaseView',
diff --git a/lib/lp/soyuz/browser/tests/test_sourceslistentries.py b/lib/lp/soyuz/browser/tests/test_sourceslistentries.py
index b4ab827..47757bc 100644
--- a/lib/lp/soyuz/browser/tests/test_sourceslistentries.py
+++ b/lib/lp/soyuz/browser/tests/test_sourceslistentries.py
@@ -3,8 +3,6 @@
"""Unit tests for SourceListEntriesView."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'TestDefaultSelectedSeries',
diff --git a/lib/lp/soyuz/browser/tests/test_views.py b/lib/lp/soyuz/browser/tests/test_views.py
index db65ae1..b4256ee 100644
--- a/lib/lp/soyuz/browser/tests/test_views.py
+++ b/lib/lp/soyuz/browser/tests/test_views.py
@@ -3,8 +3,6 @@
"""Run the view tests."""
-from __future__ import absolute_import, print_function, unicode_literals
-
import logging
import os
import unittest
diff --git a/lib/lp/soyuz/interfaces/archiveapi.py b/lib/lp/soyuz/interfaces/archiveapi.py
index f54b958..be61d0b 100644
--- a/lib/lp/soyuz/interfaces/archiveapi.py
+++ b/lib/lp/soyuz/interfaces/archiveapi.py
@@ -3,8 +3,6 @@
"""Interfaces for internal archive APIs."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'IArchiveAPI',
diff --git a/lib/lp/soyuz/interfaces/archivefile.py b/lib/lp/soyuz/interfaces/archivefile.py
index 005a599..461cfe6 100644
--- a/lib/lp/soyuz/interfaces/archivefile.py
+++ b/lib/lp/soyuz/interfaces/archivefile.py
@@ -3,8 +3,6 @@
"""Interface for a file in an archive."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'IArchiveFile',
diff --git a/lib/lp/soyuz/interfaces/binarysourcereference.py b/lib/lp/soyuz/interfaces/binarysourcereference.py
index dc21765..e00c2b3 100644
--- a/lib/lp/soyuz/interfaces/binarysourcereference.py
+++ b/lib/lp/soyuz/interfaces/binarysourcereference.py
@@ -3,8 +3,6 @@
"""Interface for references from binary packages to source packages."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'IBinarySourceReference',
diff --git a/lib/lp/soyuz/interfaces/distroarchseriesfilter.py b/lib/lp/soyuz/interfaces/distroarchseriesfilter.py
index 106bb97..2f72d98 100644
--- a/lib/lp/soyuz/interfaces/distroarchseriesfilter.py
+++ b/lib/lp/soyuz/interfaces/distroarchseriesfilter.py
@@ -3,8 +3,6 @@
"""Distro arch series filter interfaces."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'IDistroArchSeriesFilter',
diff --git a/lib/lp/soyuz/model/archivefile.py b/lib/lp/soyuz/model/archivefile.py
index 50d66ba..14c0367 100644
--- a/lib/lp/soyuz/model/archivefile.py
+++ b/lib/lp/soyuz/model/archivefile.py
@@ -3,8 +3,6 @@
"""A file in an archive."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'ArchiveFile',
diff --git a/lib/lp/soyuz/model/binarysourcereference.py b/lib/lp/soyuz/model/binarysourcereference.py
index adcfb6f..8cd84c7 100644
--- a/lib/lp/soyuz/model/binarysourcereference.py
+++ b/lib/lp/soyuz/model/binarysourcereference.py
@@ -3,8 +3,6 @@
"""References from binary packages to source packages."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'BinarySourceReference',
diff --git a/lib/lp/soyuz/model/distroarchseriesfilter.py b/lib/lp/soyuz/model/distroarchseriesfilter.py
index 46906b8..5acc353 100644
--- a/lib/lp/soyuz/model/distroarchseriesfilter.py
+++ b/lib/lp/soyuz/model/distroarchseriesfilter.py
@@ -3,8 +3,6 @@
"""Distro arch series filters."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'DistroArchSeriesFilter',
diff --git a/lib/lp/soyuz/scripts/expire_archive_files.py b/lib/lp/soyuz/scripts/expire_archive_files.py
index 70cae70..de58d19 100755
--- a/lib/lp/soyuz/scripts/expire_archive_files.py
+++ b/lib/lp/soyuz/scripts/expire_archive_files.py
@@ -3,8 +3,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-from __future__ import absolute_import, print_function, unicode_literals
-
from storm.expr import (
And,
Cast,
diff --git a/lib/lp/soyuz/subscribers/livefsbuild.py b/lib/lp/soyuz/subscribers/livefsbuild.py
index 852f9d3..c2e7479 100644
--- a/lib/lp/soyuz/subscribers/livefsbuild.py
+++ b/lib/lp/soyuz/subscribers/livefsbuild.py
@@ -2,8 +2,6 @@
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Event subscribers for livefs builds."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
diff --git a/lib/lp/soyuz/tests/fakepackager.py b/lib/lp/soyuz/tests/fakepackager.py
index 7a27623..8106d50 100644
--- a/lib/lp/soyuz/tests/fakepackager.py
+++ b/lib/lp/soyuz/tests/fakepackager.py
@@ -7,8 +7,6 @@ It builds small and fully functional packages to be used in launchpad test
suite.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = ['FakePackager']
diff --git a/lib/lp/soyuz/tests/soyuz.py b/lib/lp/soyuz/tests/soyuz.py
index 5e0b9fe..ff8fe6e 100644
--- a/lib/lp/soyuz/tests/soyuz.py
+++ b/lib/lp/soyuz/tests/soyuz.py
@@ -3,8 +3,6 @@
"""Helper functions/classes for Soyuz tests."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
diff --git a/lib/lp/soyuz/tests/test_archive.py b/lib/lp/soyuz/tests/test_archive.py
index c600cde..0348fa7 100644
--- a/lib/lp/soyuz/tests/test_archive.py
+++ b/lib/lp/soyuz/tests/test_archive.py
@@ -3,8 +3,6 @@
"""Test Archive features."""
-from __future__ import absolute_import, print_function, unicode_literals
-
from datetime import (
date,
datetime,
diff --git a/lib/lp/soyuz/tests/test_archive_agent.py b/lib/lp/soyuz/tests/test_archive_agent.py
index 9cc0628..06d192b 100644
--- a/lib/lp/soyuz/tests/test_archive_agent.py
+++ b/lib/lp/soyuz/tests/test_archive_agent.py
@@ -3,8 +3,6 @@
"""Test Archive software center agent celebrity."""
-from __future__ import absolute_import, print_function, unicode_literals
-
from zope.component import getUtility
from zope.security.interfaces import Unauthorized
diff --git a/lib/lp/soyuz/tests/test_archive_privacy.py b/lib/lp/soyuz/tests/test_archive_privacy.py
index 57b1ce9..7ed4cc9 100644
--- a/lib/lp/soyuz/tests/test_archive_privacy.py
+++ b/lib/lp/soyuz/tests/test_archive_privacy.py
@@ -3,8 +3,6 @@
"""Test Archive privacy features."""
-from __future__ import absolute_import, print_function, unicode_literals
-
from zope.security.interfaces import Unauthorized
from lp.soyuz.interfaces.archive import CannotSwitchPrivacy
diff --git a/lib/lp/soyuz/tests/test_archive_subscriptions.py b/lib/lp/soyuz/tests/test_archive_subscriptions.py
index 6fefbb9..04fa7bb 100644
--- a/lib/lp/soyuz/tests/test_archive_subscriptions.py
+++ b/lib/lp/soyuz/tests/test_archive_subscriptions.py
@@ -3,8 +3,6 @@
"""Test Archive features."""
-from __future__ import absolute_import, print_function, unicode_literals
-
from fixtures import FakeLogger
from storm.store import Store
from testtools.matchers import Equals
diff --git a/lib/lp/soyuz/tests/test_archivefile.py b/lib/lp/soyuz/tests/test_archivefile.py
index c1d89e3..c99568d 100644
--- a/lib/lp/soyuz/tests/test_archivefile.py
+++ b/lib/lp/soyuz/tests/test_archivefile.py
@@ -3,8 +3,6 @@
"""ArchiveFile tests."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import timedelta
diff --git a/lib/lp/soyuz/tests/test_archivejob.py b/lib/lp/soyuz/tests/test_archivejob.py
index 70fbe4a..f00e606 100644
--- a/lib/lp/soyuz/tests/test_archivejob.py
+++ b/lib/lp/soyuz/tests/test_archivejob.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
from debian.deb822 import Changes
from lp.services.job.runner import JobRunner
diff --git a/lib/lp/soyuz/tests/test_binaryandsourcepackagename.py b/lib/lp/soyuz/tests/test_binaryandsourcepackagename.py
index 321227c..25b856d 100644
--- a/lib/lp/soyuz/tests/test_binaryandsourcepackagename.py
+++ b/lib/lp/soyuz/tests/test_binaryandsourcepackagename.py
@@ -3,8 +3,6 @@
"""Test the binary and source package name vocabularies."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from storm.store import Store
diff --git a/lib/lp/soyuz/tests/test_binarypackagebuild.py b/lib/lp/soyuz/tests/test_binarypackagebuild.py
index 694ed7d..3a3f21a 100644
--- a/lib/lp/soyuz/tests/test_binarypackagebuild.py
+++ b/lib/lp/soyuz/tests/test_binarypackagebuild.py
@@ -3,8 +3,6 @@
"""Test Build features."""
-from __future__ import absolute_import, print_function, unicode_literals
-
from datetime import (
datetime,
timedelta,
diff --git a/lib/lp/soyuz/tests/test_binarypackagebuildbehaviour.py b/lib/lp/soyuz/tests/test_binarypackagebuildbehaviour.py
index 2ab0429..9dc3aa3 100644
--- a/lib/lp/soyuz/tests/test_binarypackagebuildbehaviour.py
+++ b/lib/lp/soyuz/tests/test_binarypackagebuildbehaviour.py
@@ -3,8 +3,6 @@
"""Tests for BinaryPackageBuildBehaviour."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import gzip
diff --git a/lib/lp/soyuz/tests/test_binarypackagename.py b/lib/lp/soyuz/tests/test_binarypackagename.py
index 4c28abc..5bc26ae 100644
--- a/lib/lp/soyuz/tests/test_binarypackagename.py
+++ b/lib/lp/soyuz/tests/test_binarypackagename.py
@@ -3,8 +3,6 @@
"""Test BinaryPackageName."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.component import getUtility
diff --git a/lib/lp/soyuz/tests/test_binarypackagerelease.py b/lib/lp/soyuz/tests/test_binarypackagerelease.py
index 1685e38..b5d9805 100644
--- a/lib/lp/soyuz/tests/test_binarypackagerelease.py
+++ b/lib/lp/soyuz/tests/test_binarypackagerelease.py
@@ -3,8 +3,6 @@
"""Test BinaryPackageRelease."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from lp.soyuz.enums import BinaryPackageFormat
diff --git a/lib/lp/soyuz/tests/test_binarysourcereference.py b/lib/lp/soyuz/tests/test_binarysourcereference.py
index f682de8..5c849bc 100644
--- a/lib/lp/soyuz/tests/test_binarysourcereference.py
+++ b/lib/lp/soyuz/tests/test_binarysourcereference.py
@@ -3,8 +3,6 @@
"""Test references from binary packages to source packages."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import re
diff --git a/lib/lp/soyuz/tests/test_build.py b/lib/lp/soyuz/tests/test_build.py
index 734ddce..dab2bde 100644
--- a/lib/lp/soyuz/tests/test_build.py
+++ b/lib/lp/soyuz/tests/test_build.py
@@ -1,8 +1,6 @@
# Copyright 2011-2018 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/soyuz/tests/test_build_depwait.py b/lib/lp/soyuz/tests/test_build_depwait.py
index 83b9186..7b4e01c 100644
--- a/lib/lp/soyuz/tests/test_build_depwait.py
+++ b/lib/lp/soyuz/tests/test_build_depwait.py
@@ -1,8 +1,6 @@
# Copyright 2011-2018 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import transaction
diff --git a/lib/lp/soyuz/tests/test_build_notify.py b/lib/lp/soyuz/tests/test_build_notify.py
index 2823531..7b639e2 100644
--- a/lib/lp/soyuz/tests/test_build_notify.py
+++ b/lib/lp/soyuz/tests/test_build_notify.py
@@ -1,8 +1,6 @@
# Copyright 2011-2018 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import timedelta
diff --git a/lib/lp/soyuz/tests/test_build_privacy.py b/lib/lp/soyuz/tests/test_build_privacy.py
index 112085d..5446bbd 100644
--- a/lib/lp/soyuz/tests/test_build_privacy.py
+++ b/lib/lp/soyuz/tests/test_build_privacy.py
@@ -1,8 +1,6 @@
# Copyright 2011-2018 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.component import getUtility
diff --git a/lib/lp/soyuz/tests/test_build_set.py b/lib/lp/soyuz/tests/test_build_set.py
index 1672e73..04dde14 100644
--- a/lib/lp/soyuz/tests/test_build_set.py
+++ b/lib/lp/soyuz/tests/test_build_set.py
@@ -1,8 +1,6 @@
# Copyright 2011-2019 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.component import getUtility
diff --git a/lib/lp/soyuz/tests/test_build_start_estimation.py b/lib/lp/soyuz/tests/test_build_start_estimation.py
index c3c9870..963b526 100644
--- a/lib/lp/soyuz/tests/test_build_start_estimation.py
+++ b/lib/lp/soyuz/tests/test_build_start_estimation.py
@@ -1,8 +1,6 @@
# Copyright 2011-2018 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/soyuz/tests/test_distributionsourcepackagerelease.py b/lib/lp/soyuz/tests/test_distributionsourcepackagerelease.py
index b715d7e..5abdd67 100644
--- a/lib/lp/soyuz/tests/test_distributionsourcepackagerelease.py
+++ b/lib/lp/soyuz/tests/test_distributionsourcepackagerelease.py
@@ -3,8 +3,6 @@
"""Tests of DistributionSourcePackageRelease."""
-from __future__ import absolute_import, print_function, unicode_literals
-
from storm.store import Store
from testtools.matchers import (
Equals,
diff --git a/lib/lp/soyuz/tests/test_distroarchseriesfilter.py b/lib/lp/soyuz/tests/test_distroarchseriesfilter.py
index 2481d84..6b0d562 100644
--- a/lib/lp/soyuz/tests/test_distroarchseriesfilter.py
+++ b/lib/lp/soyuz/tests/test_distroarchseriesfilter.py
@@ -3,8 +3,6 @@
"""Test distro arch series filters."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from testtools.matchers import MatchesStructure
diff --git a/lib/lp/soyuz/tests/test_distroseriesbinarypackage.py b/lib/lp/soyuz/tests/test_distroseriesbinarypackage.py
index f996d05..4ddeae8 100644
--- a/lib/lp/soyuz/tests/test_distroseriesbinarypackage.py
+++ b/lib/lp/soyuz/tests/test_distroseriesbinarypackage.py
@@ -3,8 +3,6 @@
"""Tests for `DistroSeriesBinaryPackage`."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'TestDistroSeriesBinaryPackage',
diff --git a/lib/lp/soyuz/tests/test_distroseriesdifferencejob.py b/lib/lp/soyuz/tests/test_distroseriesdifferencejob.py
index 183a380..e1ce4b1 100644
--- a/lib/lp/soyuz/tests/test_distroseriesdifferencejob.py
+++ b/lib/lp/soyuz/tests/test_distroseriesdifferencejob.py
@@ -3,8 +3,6 @@
"""Test `DistroSeriesDifferenceJob` and utility."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from psycopg2 import ProgrammingError
diff --git a/lib/lp/soyuz/tests/test_distroseriesqueue_ddtp_tarball.py b/lib/lp/soyuz/tests/test_distroseriesqueue_ddtp_tarball.py
index f95f08f..5c41eac 100644
--- a/lib/lp/soyuz/tests/test_distroseriesqueue_ddtp_tarball.py
+++ b/lib/lp/soyuz/tests/test_distroseriesqueue_ddtp_tarball.py
@@ -14,8 +14,6 @@ See also lp.archivepublisher.tests.test_ddtp_tarball for detailed tests of
ddtp-tarball extraction.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
import os
import transaction
diff --git a/lib/lp/soyuz/tests/test_distroseriesqueue_debian_installer.py b/lib/lp/soyuz/tests/test_distroseriesqueue_debian_installer.py
index a7bef69..326be48 100644
--- a/lib/lp/soyuz/tests/test_distroseriesqueue_debian_installer.py
+++ b/lib/lp/soyuz/tests/test_distroseriesqueue_debian_installer.py
@@ -7,8 +7,6 @@ See also lp.archivepublisher.tests.test_debian_installer for detailed tests
of debian-installer custom upload extraction.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
from itertools import chain
import os
diff --git a/lib/lp/soyuz/tests/test_distroseriesqueue_dist_upgrader.py b/lib/lp/soyuz/tests/test_distroseriesqueue_dist_upgrader.py
index 9cf7c44..6dac873 100644
--- a/lib/lp/soyuz/tests/test_distroseriesqueue_dist_upgrader.py
+++ b/lib/lp/soyuz/tests/test_distroseriesqueue_dist_upgrader.py
@@ -7,8 +7,6 @@ See also lp.archivepublisher.tests.test_dist_upgrader for detailed tests of
dist-upgrader tarball extraction.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
import os
import shutil
diff --git a/lib/lp/soyuz/tests/test_distroseriesqueue_rosetta_translations.py b/lib/lp/soyuz/tests/test_distroseriesqueue_rosetta_translations.py
index 0f05f58..7cfcf54 100644
--- a/lib/lp/soyuz/tests/test_distroseriesqueue_rosetta_translations.py
+++ b/lib/lp/soyuz/tests/test_distroseriesqueue_rosetta_translations.py
@@ -7,8 +7,6 @@ See also lp.archivepublisher.tests.test_rosetta_translations for detailed
tests of rosetta-translations handling.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
from os.path import relpath
from tarfile import TarFile
diff --git a/lib/lp/soyuz/tests/test_doc.py b/lib/lp/soyuz/tests/test_doc.py
index f27e350..b1f15dc 100644
--- a/lib/lp/soyuz/tests/test_doc.py
+++ b/lib/lp/soyuz/tests/test_doc.py
@@ -5,8 +5,6 @@
Run the doctests and pagetests.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
import logging
import os
import unittest
diff --git a/lib/lp/soyuz/tests/test_hasbuildrecords.py b/lib/lp/soyuz/tests/test_hasbuildrecords.py
index 80c85b4..94c146b 100644
--- a/lib/lp/soyuz/tests/test_hasbuildrecords.py
+++ b/lib/lp/soyuz/tests/test_hasbuildrecords.py
@@ -3,8 +3,6 @@
"""Test implementations of the IHasBuildRecords interface."""
-from __future__ import absolute_import, print_function, unicode_literals
-
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
diff --git a/lib/lp/soyuz/tests/test_initializedistroseriesjob.py b/lib/lp/soyuz/tests/test_initializedistroseriesjob.py
index e8cb577..a75083a 100644
--- a/lib/lp/soyuz/tests/test_initializedistroseriesjob.py
+++ b/lib/lp/soyuz/tests/test_initializedistroseriesjob.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import transaction
diff --git a/lib/lp/soyuz/tests/test_livefs.py b/lib/lp/soyuz/tests/test_livefs.py
index 4ab23cf..efab1aa 100644
--- a/lib/lp/soyuz/tests/test_livefs.py
+++ b/lib/lp/soyuz/tests/test_livefs.py
@@ -3,8 +3,6 @@
"""Test live filesystems."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/soyuz/tests/test_livefsbuild.py b/lib/lp/soyuz/tests/test_livefsbuild.py
index 35f084f..ce2a165 100644
--- a/lib/lp/soyuz/tests/test_livefsbuild.py
+++ b/lib/lp/soyuz/tests/test_livefsbuild.py
@@ -3,8 +3,6 @@
"""Test live filesystem build features."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/soyuz/tests/test_livefsbuildbehaviour.py b/lib/lp/soyuz/tests/test_livefsbuildbehaviour.py
index 8d6f33b..6a42d57 100644
--- a/lib/lp/soyuz/tests/test_livefsbuildbehaviour.py
+++ b/lib/lp/soyuz/tests/test_livefsbuildbehaviour.py
@@ -3,8 +3,6 @@
"""Test live filesystem build behaviour."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import datetime
diff --git a/lib/lp/soyuz/tests/test_packagecloner.py b/lib/lp/soyuz/tests/test_packagecloner.py
index 3ee6886..b1578f7 100644
--- a/lib/lp/soyuz/tests/test_packagecloner.py
+++ b/lib/lp/soyuz/tests/test_packagecloner.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.component import getUtility
diff --git a/lib/lp/soyuz/tests/test_packagecopyjob.py b/lib/lp/soyuz/tests/test_packagecopyjob.py
index 7c2ef99..998992f 100644
--- a/lib/lp/soyuz/tests/test_packagecopyjob.py
+++ b/lib/lp/soyuz/tests/test_packagecopyjob.py
@@ -3,8 +3,6 @@
"""Tests for sync package jobs."""
-from __future__ import absolute_import, print_function, unicode_literals
-
import operator
import os
import signal
diff --git a/lib/lp/soyuz/tests/test_packagediff.py b/lib/lp/soyuz/tests/test_packagediff.py
index 97ddaab..1f2ef0b 100644
--- a/lib/lp/soyuz/tests/test_packagediff.py
+++ b/lib/lp/soyuz/tests/test_packagediff.py
@@ -3,8 +3,6 @@
"""Test source package diffs."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import datetime
diff --git a/lib/lp/soyuz/tests/test_packagediffjob.py b/lib/lp/soyuz/tests/test_packagediffjob.py
index 3bdab7c..d5af104 100644
--- a/lib/lp/soyuz/tests/test_packagediffjob.py
+++ b/lib/lp/soyuz/tests/test_packagediffjob.py
@@ -1,8 +1,6 @@
# Copyright 2013-2018 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from testtools.content import text_content
diff --git a/lib/lp/soyuz/tests/test_packageset.py b/lib/lp/soyuz/tests/test_packageset.py
index 8ac6777..c84b2be 100644
--- a/lib/lp/soyuz/tests/test_packageset.py
+++ b/lib/lp/soyuz/tests/test_packageset.py
@@ -3,8 +3,6 @@
"""Test Packageset features."""
-from __future__ import absolute_import, print_function, unicode_literals
-
from zope.component import getUtility
from zope.security.interfaces import Unauthorized
diff --git a/lib/lp/soyuz/tests/test_packagetranslationsuploadjob.py b/lib/lp/soyuz/tests/test_packagetranslationsuploadjob.py
index 2775c89..e69ee4f 100644
--- a/lib/lp/soyuz/tests/test_packagetranslationsuploadjob.py
+++ b/lib/lp/soyuz/tests/test_packagetranslationsuploadjob.py
@@ -1,8 +1,6 @@
# Copyright 2013-2018 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from testtools.content import text_content
diff --git a/lib/lp/soyuz/tests/test_packageupload.py b/lib/lp/soyuz/tests/test_packageupload.py
index 0908afd..9850667 100644
--- a/lib/lp/soyuz/tests/test_packageupload.py
+++ b/lib/lp/soyuz/tests/test_packageupload.py
@@ -3,8 +3,6 @@
"""Test Build features."""
-from __future__ import absolute_import, print_function, unicode_literals
-
from datetime import timedelta
import io
import os.path
diff --git a/lib/lp/soyuz/tests/test_person_createppa.py b/lib/lp/soyuz/tests/test_person_createppa.py
index 93b1ed6..017471a 100644
--- a/lib/lp/soyuz/tests/test_person_createppa.py
+++ b/lib/lp/soyuz/tests/test_person_createppa.py
@@ -3,8 +3,6 @@
"""Test the IPerson.createPPA() method."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.security.interfaces import Unauthorized
diff --git a/lib/lp/soyuz/tests/test_processacceptedbugsjob.py b/lib/lp/soyuz/tests/test_processacceptedbugsjob.py
index 005494d..1b7ab86 100644
--- a/lib/lp/soyuz/tests/test_processacceptedbugsjob.py
+++ b/lib/lp/soyuz/tests/test_processacceptedbugsjob.py
@@ -3,8 +3,6 @@
"""Tests for jobs to close bugs for accepted package uploads."""
-from __future__ import absolute_import, print_function, unicode_literals
-
import io
from itertools import product
from textwrap import dedent
diff --git a/lib/lp/soyuz/tests/test_publishing.py b/lib/lp/soyuz/tests/test_publishing.py
index b96db01..1d4a1b5 100644
--- a/lib/lp/soyuz/tests/test_publishing.py
+++ b/lib/lp/soyuz/tests/test_publishing.py
@@ -3,8 +3,6 @@
"""Test native publication workflow for Soyuz. """
-from __future__ import absolute_import, print_function, unicode_literals
-
import datetime
import io
import operator
diff --git a/lib/lp/soyuz/tests/test_publishing_models.py b/lib/lp/soyuz/tests/test_publishing_models.py
index ecfcf15..f91efa4 100644
--- a/lib/lp/soyuz/tests/test_publishing_models.py
+++ b/lib/lp/soyuz/tests/test_publishing_models.py
@@ -3,8 +3,6 @@
"""Test model and set utilities used for publishing."""
-from __future__ import absolute_import, print_function, unicode_literals
-
from zope.component import getUtility
from zope.security.interfaces import Unauthorized
from zope.security.proxy import removeSecurityProxy
diff --git a/lib/lp/soyuz/tests/test_sourcepackagerelease.py b/lib/lp/soyuz/tests/test_sourcepackagerelease.py
index 187fa36..2756bc4 100644
--- a/lib/lp/soyuz/tests/test_sourcepackagerelease.py
+++ b/lib/lp/soyuz/tests/test_sourcepackagerelease.py
@@ -7,8 +7,6 @@
"""Test SourcePackageRelease."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from textwrap import dedent
diff --git a/lib/lp/soyuz/tests/test_vocabularies.py b/lib/lp/soyuz/tests/test_vocabularies.py
index e387b53..0eb9a57 100644
--- a/lib/lp/soyuz/tests/test_vocabularies.py
+++ b/lib/lp/soyuz/tests/test_vocabularies.py
@@ -3,8 +3,6 @@
"""Test Soyuz vocabularies."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from testtools.matchers import MatchesStructure
diff --git a/lib/lp/soyuz/tests/test_yuitests.py b/lib/lp/soyuz/tests/test_yuitests.py
index 418fb52..90003f8 100644
--- a/lib/lp/soyuz/tests/test_yuitests.py
+++ b/lib/lp/soyuz/tests/test_yuitests.py
@@ -3,8 +3,6 @@
"""Run YUI.test tests."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = []
diff --git a/lib/lp/soyuz/wsgi/archiveauth.py b/lib/lp/soyuz/wsgi/archiveauth.py
index 6da96e0..a888105 100644
--- a/lib/lp/soyuz/wsgi/archiveauth.py
+++ b/lib/lp/soyuz/wsgi/archiveauth.py
@@ -6,8 +6,6 @@
This is as lightweight as possible, as it runs on PPA frontends.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'check_password',
diff --git a/lib/lp/soyuz/wsgi/tests/test_archiveauth.py b/lib/lp/soyuz/wsgi/tests/test_archiveauth.py
index 6749548..0f15771 100644
--- a/lib/lp/soyuz/wsgi/tests/test_archiveauth.py
+++ b/lib/lp/soyuz/wsgi/tests/test_archiveauth.py
@@ -3,8 +3,6 @@
"""Tests for the WSGI archive authorisation provider."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import crypt
diff --git a/lib/lp/soyuz/xmlrpc/archive.py b/lib/lp/soyuz/xmlrpc/archive.py
index 63cda23..56cb282 100644
--- a/lib/lp/soyuz/xmlrpc/archive.py
+++ b/lib/lp/soyuz/xmlrpc/archive.py
@@ -3,8 +3,6 @@
"""Implementations of the XML-RPC APIs for Soyuz archives."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'ArchiveAPI',
diff --git a/lib/lp/soyuz/xmlrpc/tests/test_archive.py b/lib/lp/soyuz/xmlrpc/tests/test_archive.py
index 028a97b..ab1341e 100644
--- a/lib/lp/soyuz/xmlrpc/tests/test_archive.py
+++ b/lib/lp/soyuz/xmlrpc/tests/test_archive.py
@@ -3,8 +3,6 @@
"""Tests for the internal Soyuz archive API."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from fixtures import FakeLogger
diff --git a/lib/lp/startwsgi.py b/lib/lp/startwsgi.py
index eedb7b0..0652b63 100644
--- a/lib/lp/startwsgi.py
+++ b/lib/lp/startwsgi.py
@@ -3,8 +3,6 @@
"""WSGI script to start web server."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = []
diff --git a/lib/lp/testing/__init__.py b/lib/lp/testing/__init__.py
index 61624ce..583c569 100644
--- a/lib/lp/testing/__init__.py
+++ b/lib/lp/testing/__init__.py
@@ -1,9 +1,6 @@
# Copyright 2009-2020 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-from __future__ import absolute_import, print_function
-
-
__metaclass__ = type
__all__ = [
'AbstractYUITestCase',
diff --git a/lib/lp/testing/browser.py b/lib/lp/testing/browser.py
index 155eccf..8015de8 100644
--- a/lib/lp/testing/browser.py
+++ b/lib/lp/testing/browser.py
@@ -9,14 +9,11 @@ child process. The Zope testing browser fakes its connections in-process, so
that's not good enough.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'setUp',
]
-import __future__
import ssl
from lazr.uri import URI
@@ -73,8 +70,6 @@ class Browser(_Browser):
def setUp(test):
"""Set up appserver tests."""
- for future_item in 'absolute_import', 'print_function', 'unicode_literals':
- test.globs[future_item] = getattr(__future__, future_item)
test.globs['Browser'] = Browser
test.globs['browser'] = Browser()
test.globs['find_tag_by_id'] = find_tag_by_id
diff --git a/lib/lp/testing/dbuser.py b/lib/lp/testing/dbuser.py
index 4d2ae21..d7141a1 100644
--- a/lib/lp/testing/dbuser.py
+++ b/lib/lp/testing/dbuser.py
@@ -3,8 +3,6 @@
"""Provides a context manager to run parts of a test as a different dbuser."""
-from __future__ import absolute_import
-
__metaclass__ = type
__all__ = [
'dbuser',
diff --git a/lib/lp/testing/faketransaction.py b/lib/lp/testing/faketransaction.py
index 1c41916..b717be0 100644
--- a/lib/lp/testing/faketransaction.py
+++ b/lib/lp/testing/faketransaction.py
@@ -3,8 +3,6 @@
"""Fake transaction manager."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = ['FakeTransaction']
diff --git a/lib/lp/testing/karma.py b/lib/lp/testing/karma.py
index 801b9ff..b2953c1 100644
--- a/lib/lp/testing/karma.py
+++ b/lib/lp/testing/karma.py
@@ -3,8 +3,6 @@
"""Helper functions/classes to be used when testing the karma framework."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'KarmaAssignedEventListener',
diff --git a/lib/lp/testing/keyserver/inprocess.py b/lib/lp/testing/keyserver/inprocess.py
index ee82e52..24eebc3 100644
--- a/lib/lp/testing/keyserver/inprocess.py
+++ b/lib/lp/testing/keyserver/inprocess.py
@@ -3,8 +3,6 @@
"""In-process keyserver fixture."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'InProcessKeyServerFixture',
diff --git a/lib/lp/testing/keyserver/tests/test_inprocess.py b/lib/lp/testing/keyserver/tests/test_inprocess.py
index 5dd085e..316803d 100644
--- a/lib/lp/testing/keyserver/tests/test_inprocess.py
+++ b/lib/lp/testing/keyserver/tests/test_inprocess.py
@@ -3,8 +3,6 @@
"""In-process keyserver fixture tests."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from testtools.twistedsupport import (
diff --git a/lib/lp/testing/layers.py b/lib/lp/testing/layers.py
index aae25dc..2d07f26 100644
--- a/lib/lp/testing/layers.py
+++ b/lib/lp/testing/layers.py
@@ -18,8 +18,6 @@ of one, forcing us to attempt to make some sort of layer tree.
-- StuartBishop 20060619
"""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = [
'AppServerLayer',
diff --git a/lib/lp/testing/mail_helpers.py b/lib/lp/testing/mail_helpers.py
index 36e18f2..16bdcc2 100644
--- a/lib/lp/testing/mail_helpers.py
+++ b/lib/lp/testing/mail_helpers.py
@@ -3,8 +3,6 @@
"""Helper functions dealing with emails in tests."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
import operator
diff --git a/lib/lp/testing/menu.py b/lib/lp/testing/menu.py
index f0f3676..243d1b6 100644
--- a/lib/lp/testing/menu.py
+++ b/lib/lp/testing/menu.py
@@ -3,8 +3,6 @@
"""Helpers for testing menus."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = [
'summarise_tal_links',
diff --git a/lib/lp/testing/pages.py b/lib/lp/testing/pages.py
index 988f86d..fa6d0a4 100644
--- a/lib/lp/testing/pages.py
+++ b/lib/lp/testing/pages.py
@@ -3,8 +3,6 @@
"""Testing infrastructure for page tests."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
from contextlib import contextmanager
diff --git a/lib/lp/testing/publication.py b/lib/lp/testing/publication.py
index dc61e4e..3e716cf 100644
--- a/lib/lp/testing/publication.py
+++ b/lib/lp/testing/publication.py
@@ -3,8 +3,6 @@
"""Helpers for testing out publication related code."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = [
'get_request_and_publication',
diff --git a/lib/lp/testing/sampledata.py b/lib/lp/testing/sampledata.py
index 74d78d8..b314351 100644
--- a/lib/lp/testing/sampledata.py
+++ b/lib/lp/testing/sampledata.py
@@ -7,8 +7,6 @@ If ever you use a literal in a test that refers to sample data, even if it's
just a small number, then you should define it as a constant here.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'ADMIN_EMAIL',
diff --git a/lib/lp/testing/systemdocs.py b/lib/lp/testing/systemdocs.py
index 3d42c6f..5e9bdac 100644
--- a/lib/lp/testing/systemdocs.py
+++ b/lib/lp/testing/systemdocs.py
@@ -3,8 +3,6 @@
"""Infrastructure for setting up doctests."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = [
'default_optionflags',
diff --git a/lib/lp/testing/tests/test_layers_functional.py b/lib/lp/testing/tests/test_layers_functional.py
index 02f5bc5..4c48e48 100644
--- a/lib/lp/testing/tests/test_layers_functional.py
+++ b/lib/lp/testing/tests/test_layers_functional.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).
-from __future__ import with_statement
-
""" Test layers
Note that many tests are performed at run time in the layers themselves
diff --git a/lib/lp/testing/tests/test_standard_test_template.py b/lib/lp/testing/tests/test_standard_test_template.py
index 7ca7188..09b97ab 100644
--- a/lib/lp/testing/tests/test_standard_test_template.py
+++ b/lib/lp/testing/tests/test_standard_test_template.py
@@ -3,8 +3,6 @@
"""XXX: Module docstring goes here."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
# or TestCaseWithFactory
diff --git a/lib/lp/testing/tests/test_standard_yuixhr_test_template.py b/lib/lp/testing/tests/test_standard_yuixhr_test_template.py
index 694fe89..dedd3f8 100644
--- a/lib/lp/testing/tests/test_standard_yuixhr_test_template.py
+++ b/lib/lp/testing/tests/test_standard_yuixhr_test_template.py
@@ -4,8 +4,6 @@
"""{Describe your test suite here}.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = []
diff --git a/lib/lp/testing/utilities/retest.py b/lib/lp/testing/utilities/retest.py
index 570acb9..097df78 100755
--- a/lib/lp/testing/utilities/retest.py
+++ b/lib/lp/testing/utilities/retest.py
@@ -22,8 +22,6 @@ report (or a part of) can be piped in, for example by pasting it:
"""
-from __future__ import print_function
-
from collections import OrderedDict
import fileinput
from itertools import takewhile
diff --git a/lib/lp/testing/yuixhr.py b/lib/lp/testing/yuixhr.py
index a4e566a..c21831b 100644
--- a/lib/lp/testing/yuixhr.py
+++ b/lib/lp/testing/yuixhr.py
@@ -3,8 +3,6 @@
"""Fixture code for YUITest + XHR integration testing."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = [
'login_as_person',
diff --git a/lib/lp/testopenid/testing/helpers.py b/lib/lp/testopenid/testing/helpers.py
index fd92520..d465c97 100644
--- a/lib/lp/testopenid/testing/helpers.py
+++ b/lib/lp/testopenid/testing/helpers.py
@@ -3,8 +3,6 @@
"""Helpers for TestOpenID page tests."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = [
'complete_from_browser',
diff --git a/lib/lp/translations/browser/hastranslationimports.py b/lib/lp/translations/browser/hastranslationimports.py
index c73bd82..fe55038 100644
--- a/lib/lp/translations/browser/hastranslationimports.py
+++ b/lib/lp/translations/browser/hastranslationimports.py
@@ -3,8 +3,6 @@
"""Browser view for IHasTranslationImports."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
diff --git a/lib/lp/translations/browser/tests/test_translationimportqueueentry.py b/lib/lp/translations/browser/tests/test_translationimportqueueentry.py
index f054931..8f5347d 100644
--- a/lib/lp/translations/browser/tests/test_translationimportqueueentry.py
+++ b/lib/lp/translations/browser/tests/test_translationimportqueueentry.py
@@ -3,8 +3,6 @@
"""Unit tests for translation import queue views."""
-from __future__ import absolute_import, print_function, unicode_literals
-
from datetime import datetime
from pytz import timezone
diff --git a/lib/lp/translations/browser/tests/test_translationmessage_view.py b/lib/lp/translations/browser/tests/test_translationmessage_view.py
index 233820e..fa8719d 100644
--- a/lib/lp/translations/browser/tests/test_translationmessage_view.py
+++ b/lib/lp/translations/browser/tests/test_translationmessage_view.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).
-from __future__ import with_statement
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/translations/browser/widgets/potemplate.py b/lib/lp/translations/browser/widgets/potemplate.py
index 0608928..45cd509 100644
--- a/lib/lp/translations/browser/widgets/potemplate.py
+++ b/lib/lp/translations/browser/widgets/potemplate.py
@@ -3,8 +3,6 @@
"""Widgets related to `IPOTemplate`."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
"POTemplateAdminSourcePackageNameWidget",
diff --git a/lib/lp/translations/browser/widgets/tests/test_potemplate.py b/lib/lp/translations/browser/widgets/tests/test_potemplate.py
index 7873e7a..72d32d3 100644
--- a/lib/lp/translations/browser/widgets/tests/test_potemplate.py
+++ b/lib/lp/translations/browser/widgets/tests/test_potemplate.py
@@ -3,8 +3,6 @@
"""Test the POTemplate widgets."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from testscenarios import (
diff --git a/lib/lp/translations/browser/widgets/tests/test_translationimportqueue.py b/lib/lp/translations/browser/widgets/tests/test_translationimportqueue.py
index c4b0032..803f12f 100644
--- a/lib/lp/translations/browser/widgets/tests/test_translationimportqueue.py
+++ b/lib/lp/translations/browser/widgets/tests/test_translationimportqueue.py
@@ -3,8 +3,6 @@
"""Test the TranslationImportQueueEntry widget."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from testscenarios import (
diff --git a/lib/lp/translations/browser/widgets/translationimportqueue.py b/lib/lp/translations/browser/widgets/translationimportqueue.py
index 4612e97..37a93a2 100644
--- a/lib/lp/translations/browser/widgets/translationimportqueue.py
+++ b/lib/lp/translations/browser/widgets/translationimportqueue.py
@@ -3,8 +3,6 @@
"""Widgets related to `TranslationImportQueueEntry`."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
"TranslationImportQueueEntrySourcePackageNameWidget",
diff --git a/lib/lp/translations/model/translationimportqueue.py b/lib/lp/translations/model/translationimportqueue.py
index 8ecd0a1..bdb55ff 100644
--- a/lib/lp/translations/model/translationimportqueue.py
+++ b/lib/lp/translations/model/translationimportqueue.py
@@ -1,13 +1,6 @@
# Copyright 2009-2017 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-from __future__ import (
- absolute_import,
- division,
- print_function,
- unicode_literals,
- )
-
__metaclass__ = type
__all__ = [
'collect_import_info',
diff --git a/lib/lp/translations/scripts/tests/test_remove_translations.py b/lib/lp/translations/scripts/tests/test_remove_translations.py
index ca9658e..16db168 100644
--- a/lib/lp/translations/scripts/tests/test_remove_translations.py
+++ b/lib/lp/translations/scripts/tests/test_remove_translations.py
@@ -5,8 +5,6 @@
"""Test `remove_translations` and the `RemoveTranslations` script."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import logging
diff --git a/lib/lp/translations/scripts/tests/test_translations_approval.py b/lib/lp/translations/scripts/tests/test_translations_approval.py
index 9a53f96..fd4bd41 100644
--- a/lib/lp/translations/scripts/tests/test_translations_approval.py
+++ b/lib/lp/translations/scripts/tests/test_translations_approval.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
import logging
import transaction
diff --git a/lib/lp/translations/scripts/tests/test_translations_import.py b/lib/lp/translations/scripts/tests/test_translations_import.py
index 75f1239..0068508 100644
--- a/lib/lp/translations/scripts/tests/test_translations_import.py
+++ b/lib/lp/translations/scripts/tests/test_translations_import.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
import logging
import re
diff --git a/lib/lp/translations/tests/test_autoapproval.py b/lib/lp/translations/tests/test_autoapproval.py
index c7a9665..925dc86 100644
--- a/lib/lp/translations/tests/test_autoapproval.py
+++ b/lib/lp/translations/tests/test_autoapproval.py
@@ -8,8 +8,6 @@ Documentation-style tests go in there, ones that go systematically
through the possibilities should go here.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
from contextlib import contextmanager
from datetime import (
datetime,
diff --git a/lib/lp/translations/tests/test_shared_potemplate.py b/lib/lp/translations/tests/test_shared_potemplate.py
index 7483290..633d7b0 100644
--- a/lib/lp/translations/tests/test_shared_potemplate.py
+++ b/lib/lp/translations/tests/test_shared_potemplate.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from storm.exceptions import DataError
diff --git a/lib/lp/translations/tests/test_suggestions.py b/lib/lp/translations/tests/test_suggestions.py
index 79c82e4..0dda49b 100644
--- a/lib/lp/translations/tests/test_suggestions.py
+++ b/lib/lp/translations/tests/test_suggestions.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/translations/tests/test_translatedlanguage.py b/lib/lp/translations/tests/test_translatedlanguage.py
index 45833d6..8bedea2 100644
--- a/lib/lp/translations/tests/test_translatedlanguage.py
+++ b/lib/lp/translations/tests/test_translatedlanguage.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).
-from __future__ import with_statement
-
__metaclass__ = type
from zope.component import getUtility
diff --git a/lib/lp/translations/tests/test_translationbranchapprover.py b/lib/lp/translations/tests/test_translationbranchapprover.py
index fb77425..5a0188b 100644
--- a/lib/lp/translations/tests/test_translationbranchapprover.py
+++ b/lib/lp/translations/tests/test_translationbranchapprover.py
@@ -3,8 +3,6 @@
"""Translation File Auto Approver tests."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.component import getUtility
diff --git a/lib/lp/translations/tests/test_translationbuildapprover.py b/lib/lp/translations/tests/test_translationbuildapprover.py
index e38b2c2..5041a15 100644
--- a/lib/lp/translations/tests/test_translationbuildapprover.py
+++ b/lib/lp/translations/tests/test_translationbuildapprover.py
@@ -3,8 +3,6 @@
"""Tests for the `TranslationBuildApprover`."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from zope.component import getUtility
diff --git a/lib/lp/translations/tests/test_translationimportqueue.py b/lib/lp/translations/tests/test_translationimportqueue.py
index a87fbc3..a37c70c 100644
--- a/lib/lp/translations/tests/test_translationimportqueue.py
+++ b/lib/lp/translations/tests/test_translationimportqueue.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from operator import attrgetter
diff --git a/lib/lp/translations/tests/test_translationmerger.py b/lib/lp/translations/tests/test_translationmerger.py
index c7b5cff..f4a8f9f 100644
--- a/lib/lp/translations/tests/test_translationmerger.py
+++ b/lib/lp/translations/tests/test_translationmerger.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import gc
diff --git a/lib/lp/translations/tests/test_translationmessage.py b/lib/lp/translations/tests/test_translationmessage.py
index 8c35fe6..42b0879 100644
--- a/lib/lp/translations/tests/test_translationmessage.py
+++ b/lib/lp/translations/tests/test_translationmessage.py
@@ -3,8 +3,6 @@
"""Unit tests for `TranslationMessage`."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/translations/tests/test_translations_to_review.py b/lib/lp/translations/tests/test_translations_to_review.py
index 518a525..150d2e1 100644
--- a/lib/lp/translations/tests/test_translations_to_review.py
+++ b/lib/lp/translations/tests/test_translations_to_review.py
@@ -3,8 +3,6 @@
"""Test the choice of "translations to review" for a user."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from datetime import (
diff --git a/lib/lp/translations/utilities/gettext_po_importer.py b/lib/lp/translations/utilities/gettext_po_importer.py
index 79f99de..8b04120 100644
--- a/lib/lp/translations/utilities/gettext_po_importer.py
+++ b/lib/lp/translations/utilities/gettext_po_importer.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
diff --git a/lib/lp/translations/utilities/tests/test_gettext_po_exporter.py b/lib/lp/translations/utilities/tests/test_gettext_po_exporter.py
index 916965e..40d1ea5 100644
--- a/lib/lp/translations/utilities/tests/test_gettext_po_exporter.py
+++ b/lib/lp/translations/utilities/tests/test_gettext_po_exporter.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from textwrap import dedent
diff --git a/lib/lp/translations/utilities/tests/test_gettext_po_importer.py b/lib/lp/translations/utilities/tests/test_gettext_po_importer.py
index 65ba8f6..dfa25ee 100644
--- a/lib/lp/translations/utilities/tests/test_gettext_po_importer.py
+++ b/lib/lp/translations/utilities/tests/test_gettext_po_importer.py
@@ -3,8 +3,6 @@
"""Gettext PO importer tests."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from io import BytesIO
diff --git a/lib/lp/translations/utilities/tests/test_kde_po_importer.py b/lib/lp/translations/utilities/tests/test_kde_po_importer.py
index 71407be..1dbefa2 100644
--- a/lib/lp/translations/utilities/tests/test_kde_po_importer.py
+++ b/lib/lp/translations/utilities/tests/test_kde_po_importer.py
@@ -3,8 +3,6 @@
"""KDE PO importer tests."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from io import BytesIO
diff --git a/lib/lp/translations/utilities/tests/test_translation_importer.py b/lib/lp/translations/utilities/tests/test_translation_importer.py
index 624b84b..63a0621 100644
--- a/lib/lp/translations/utilities/tests/test_translation_importer.py
+++ b/lib/lp/translations/utilities/tests/test_translation_importer.py
@@ -3,8 +3,6 @@
"""Translation Importer tests."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from io import BytesIO
diff --git a/lib/lp/translations/utilities/tests/test_xpi_po_exporter.py b/lib/lp/translations/utilities/tests/test_xpi_po_exporter.py
index a28be12..8276943 100644
--- a/lib/lp/translations/utilities/tests/test_xpi_po_exporter.py
+++ b/lib/lp/translations/utilities/tests/test_xpi_po_exporter.py
@@ -5,8 +5,6 @@
# Copyright 2009-2017 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
from textwrap import dedent
diff --git a/scripts/branch-rewrite.py b/scripts/branch-rewrite.py
index 2e3717b..3a6ce52 100755
--- a/scripts/branch-rewrite.py
+++ b/scripts/branch-rewrite.py
@@ -10,8 +10,6 @@ documentation of the very simple 'protocol' Apache uses to talk to us, and
lp.codehosting.rewrite.BranchRewriter for the logic of the rewritemap.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
import _pythonpath # noqa: F401
import os
diff --git a/scripts/get-stacked-on-branches.py b/scripts/get-stacked-on-branches.py
index 4ed7638..5044969 100755
--- a/scripts/get-stacked-on-branches.py
+++ b/scripts/get-stacked-on-branches.py
@@ -21,8 +21,6 @@ format:
This script is intended to be used in conjunction with "update-stacked-on.py".
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import _pythonpath # noqa: F401
diff --git a/scripts/librarian-report.py b/scripts/librarian-report.py
index 8573c3d..b472796 100755
--- a/scripts/librarian-report.py
+++ b/scripts/librarian-report.py
@@ -5,8 +5,6 @@
"""Report a breakdown of Librarian disk space usage."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = []
diff --git a/scripts/memcached-stats.py b/scripts/memcached-stats.py
index b7f5702..c3e4883 100755
--- a/scripts/memcached-stats.py
+++ b/scripts/memcached-stats.py
@@ -4,8 +4,6 @@
"""Output memcached statistics."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = []
diff --git a/scripts/migrate-librarian-content-md5.py b/scripts/migrate-librarian-content-md5.py
index 0d71ab2..9caaf62 100755
--- a/scripts/migrate-librarian-content-md5.py
+++ b/scripts/migrate-librarian-content-md5.py
@@ -5,8 +5,6 @@
"""Script to generate SQL to add MD5 sums for existing librarian files."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
import _pythonpath # noqa: F401
diff --git a/scripts/rosetta/pottery-generate-intltool.py b/scripts/rosetta/pottery-generate-intltool.py
index 2bdf9d5..278a774 100755
--- a/scripts/rosetta/pottery-generate-intltool.py
+++ b/scripts/rosetta/pottery-generate-intltool.py
@@ -5,8 +5,6 @@
"""Print a list of directories that contain a valid intltool structure."""
-from __future__ import absolute_import, print_function, unicode_literals
-
import _pythonpath # noqa: F401
import os.path
diff --git a/scripts/script-monitor-nagios.py b/scripts/script-monitor-nagios.py
index 046ac59..2befc0b 100755
--- a/scripts/script-monitor-nagios.py
+++ b/scripts/script-monitor-nagios.py
@@ -18,8 +18,6 @@ As such, it was felt more appropriate to separate out the scripts,
even though there is some code duplication.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = ['check_script']
diff --git a/scripts/start-loggerhead.py b/scripts/start-loggerhead.py
index 4e37123..0976311 100755
--- a/scripts/start-loggerhead.py
+++ b/scripts/start-loggerhead.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
import _pythonpath # noqa: F401
from launchpad_loggerhead.wsgi import LoggerheadApplication
diff --git a/scripts/stop-loggerhead.py b/scripts/stop-loggerhead.py
index a269f03..a93c280 100755
--- a/scripts/stop-loggerhead.py
+++ b/scripts/stop-loggerhead.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).
-from __future__ import absolute_import, print_function, unicode_literals
-
import _pythonpath # noqa: F401
from optparse import OptionParser
diff --git a/scripts/update-version-info.sh b/scripts/update-version-info.sh
index 54e777e..73a1c3d 100755
--- a/scripts/update-version-info.sh
+++ b/scripts/update-version-info.sh
@@ -24,8 +24,6 @@ date="$(git show -s --format=%ci HEAD)"
cat > $newfile <<EOF
#! /usr/bin/env python
-from __future__ import print_function
-
version_info = {
'branch_nick': u'$branch_nick',
'date': u'$date',
diff --git a/scripts/wsgi-archive-auth.py b/scripts/wsgi-archive-auth.py
index 3b7e1a7..b5490ee 100755
--- a/scripts/wsgi-archive-auth.py
+++ b/scripts/wsgi-archive-auth.py
@@ -12,8 +12,6 @@ importing this script, so we want the test to imitate mod_wsgi's behaviour
as closely as possible.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = [
'check_password',
diff --git a/setup.py b/setup.py
index 127cf33..28a8d2f 100644
--- a/setup.py
+++ b/setup.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).
-from __future__ import print_function
-
from distutils.sysconfig import get_python_lib
import imp
import os.path
diff --git a/standard_template.py b/standard_template.py
index 7b21e5d..936c19b 100644
--- a/standard_template.py
+++ b/standard_template.py
@@ -3,7 +3,5 @@
"""XXX: Module docstring goes here."""
-from __future__ import absolute_import, print_function, unicode_literals
-
__metaclass__ = type
__all__ = []
diff --git a/test_on_merge.py b/test_on_merge.py
index 1899935..4cc7898 100755
--- a/test_on_merge.py
+++ b/test_on_merge.py
@@ -5,8 +5,6 @@
"""Tests that get run automatically on a merge."""
-from __future__ import absolute_import, print_function
-
import _pythonpath # noqa: F401
import errno
diff --git a/utilities/audit-security-settings.py b/utilities/audit-security-settings.py
index a157c60..41e133f 100755
--- a/utilities/audit-security-settings.py
+++ b/utilities/audit-security-settings.py
@@ -10,8 +10,6 @@ Usage hint:
% utilities/audit-security.py
"""
-from __future__ import absolute_import, print_function
-
__metatype__ = type
import _pythonpath # noqa: F401
diff --git a/utilities/community-contributions.py b/utilities/community-contributions.py
index d9c59e2..89e1f96 100755
--- a/utilities/community-contributions.py
+++ b/utilities/community-contributions.py
@@ -39,8 +39,6 @@ Options:
# For understanding the code, you may find it helpful to see
# bzrlib/log.py and http://bazaar-vcs.org/Integrating_with_Bazaar.
-from __future__ import absolute_import, print_function
-
import getopt
import re
import sys
diff --git a/utilities/create-lp-wadl-and-apidoc.py b/utilities/create-lp-wadl-and-apidoc.py
index 742dab4..ec91422 100755
--- a/utilities/create-lp-wadl-and-apidoc.py
+++ b/utilities/create-lp-wadl-and-apidoc.py
@@ -11,8 +11,6 @@ Example:
"lib/canonical/launchpad/apidoc/wadl-development-%(version)s.xml"
"""
-from __future__ import absolute_import, print_function
-
import _pythonpath # noqa: F401
from multiprocessing import Process
diff --git a/utilities/format-imports b/utilities/format-imports
index d5fe301..1606a8a 100755
--- a/utilities/format-imports
+++ b/utilities/format-imports
@@ -125,8 +125,6 @@ is over the length limit.
}}}
"""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
# SKIP this file when reformatting.
diff --git a/utilities/get-branch-info b/utilities/get-branch-info
index 32f5909..911d8f4 100755
--- a/utilities/get-branch-info
+++ b/utilities/get-branch-info
@@ -8,8 +8,6 @@
Usage: get-branch-info <branch_url>
"""
-from __future__ import absolute_import, print_function
-
import _pythonpath # noqa: F401
import sys
diff --git a/utilities/link-system-packages.py b/utilities/link-system-packages.py
index 9a75fcc..14d4bda 100755
--- a/utilities/link-system-packages.py
+++ b/utilities/link-system-packages.py
@@ -5,8 +5,6 @@
"""Link system-installed Python modules into Launchpad's virtualenv."""
-from __future__ import absolute_import, print_function, unicode_literals
-
from argparse import ArgumentParser
from distutils.sysconfig import get_python_lib
import importlib
diff --git a/utilities/list-pages b/utilities/list-pages
index 02bfe4e..47ea394 100755
--- a/utilities/list-pages
+++ b/utilities/list-pages
@@ -42,8 +42,6 @@ because our cheat objects don't match the app-encoded business logic.
# - bang the adapter nut against the hardest rock we can find until it cracks
# - print the nourishing nutty goodness to stdout
-from __future__ import absolute_import, print_function
-
import _pythonpath # noqa: F401
from inspect import getmro
diff --git a/utilities/lsconf.py b/utilities/lsconf.py
index 639bc50..ba23a7b 100755
--- a/utilities/lsconf.py
+++ b/utilities/lsconf.py
@@ -5,8 +5,6 @@
"""List an environment's lazr configuration."""
-from __future__ import absolute_import, print_function
-
__metatype__ = type
# Scripts may have relative imports.
diff --git a/utilities/make-dev-certificate b/utilities/make-dev-certificate
index 1952532..0a6859a 100755
--- a/utilities/make-dev-certificate
+++ b/utilities/make-dev-certificate
@@ -10,8 +10,6 @@ configs/development/launchpad.key and configs/development/launchpad.crt, and
these changes should be committed.
"""
-from __future__ import print_function
-
import atexit
import os.path
import shutil
diff --git a/utilities/make-dummy-hosted-branches b/utilities/make-dummy-hosted-branches
index 1cd3eea..def0bed 100755
--- a/utilities/make-dummy-hosted-branches
+++ b/utilities/make-dummy-hosted-branches
@@ -15,8 +15,6 @@ sample data on the filesystem is consistent with the sample data in the
database.
"""
-from __future__ import absolute_import, print_function
-
import _pythonpath # noqa: F401
import os
diff --git a/utilities/make-lp-user b/utilities/make-lp-user
index 9c972cf..e52cf8e 100755
--- a/utilities/make-lp-user
+++ b/utilities/make-lp-user
@@ -29,8 +29,6 @@ Please note that this script is for testing purposes only. Do NOT use it in
production environments.
"""
-from __future__ import absolute_import, print_function
-
import _pythonpath # noqa: F401
from optparse import OptionParser
diff --git a/utilities/make-requirements.py b/utilities/make-requirements.py
index 582c0f4..b66d519 100755
--- a/utilities/make-requirements.py
+++ b/utilities/make-requirements.py
@@ -5,8 +5,6 @@
"""Build a pip constraints file from inputs."""
-from __future__ import absolute_import, print_function, unicode_literals
-
from argparse import ArgumentParser
from collections import defaultdict
try:
diff --git a/utilities/paste b/utilities/paste
index 3731db7..abc27b8 100755
--- a/utilities/paste
+++ b/utilities/paste
@@ -3,8 +3,6 @@
# Copyright 2009-2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-from __future__ import absolute_import, print_function
-
import _pythonpath # noqa: F401
from optparse import OptionParser
diff --git a/utilities/pgcreate.py b/utilities/pgcreate.py
index 9675da3..938de83 100755
--- a/utilities/pgcreate.py
+++ b/utilities/pgcreate.py
@@ -8,8 +8,6 @@
Like createdb, except will retry on failure.
."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
import sys
diff --git a/utilities/pgkillactive.py b/utilities/pgkillactive.py
index dc6f71c..0df4216 100755
--- a/utilities/pgkillactive.py
+++ b/utilities/pgkillactive.py
@@ -6,8 +6,6 @@
"""Kill transaction that have hung around for too long.
"""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = []
diff --git a/utilities/pgkillidle.py b/utilities/pgkillidle.py
index cae0f15..56fdfbd 100755
--- a/utilities/pgkillidle.py
+++ b/utilities/pgkillidle.py
@@ -6,8 +6,6 @@
"""Kill <IDLE> in transaction connections that have hung around for too long.
"""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
__all__ = []
diff --git a/utilities/pglogwatch.py b/utilities/pglogwatch.py
index e926eab..ab37634 100755
--- a/utilities/pglogwatch.py
+++ b/utilities/pglogwatch.py
@@ -7,8 +7,6 @@
Watch live PostgreSQL logs for interesting stuff
"""
-from __future__ import absolute_import, print_function
-
from optparse import OptionParser
import re
import subprocess
diff --git a/utilities/pgmassacre.py b/utilities/pgmassacre.py
index 069739c..503c14c 100755
--- a/utilities/pgmassacre.py
+++ b/utilities/pgmassacre.py
@@ -13,8 +13,6 @@ Cut off access, slaughter connections and burn the database to the ground
(but do nothing that could put the system into recovery mode).
"""
-from __future__ import absolute_import, print_function
-
import _pythonpath # noqa: F401
from optparse import OptionParser
diff --git a/utilities/pgstats.py b/utilities/pgstats.py
index 069c3a2..5325057 100755
--- a/utilities/pgstats.py
+++ b/utilities/pgstats.py
@@ -8,8 +8,6 @@ Generate some statistics about a PostgreSQL database suitable for
emailing via cron
"""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
import sys
diff --git a/utilities/report-database-stats.py b/utilities/report-database-stats.py
index d7097a7..3e411d0 100755
--- a/utilities/report-database-stats.py
+++ b/utilities/report-database-stats.py
@@ -4,8 +4,6 @@
"""Generate the database statistics report."""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
import _pythonpath # noqa: F401
diff --git a/utilities/run-as b/utilities/run-as
index 0f12339..f936e77 100755
--- a/utilities/run-as
+++ b/utilities/run-as
@@ -10,8 +10,6 @@ inside "lxc exec". (sudo in xenial breaks without a tty, so cannot be used
here.)
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
import os
import pwd
import resource
diff --git a/utilities/shhh.py b/utilities/shhh.py
index d948a66..399b164 100755
--- a/utilities/shhh.py
+++ b/utilities/shhh.py
@@ -59,7 +59,6 @@ def shhh(cmd):
>>> cmd = [
... python, "-c",
- ... "from __future__ import print_function; "
... "import sys; "
... "print(666); print(667, file=sys.stderr); sys.exit(42)",
... ]
diff --git a/utilities/soyuz-sampledata-setup.py b/utilities/soyuz-sampledata-setup.py
index c8f2f2f..2bf17bd 100755
--- a/utilities/soyuz-sampledata-setup.py
+++ b/utilities/soyuz-sampledata-setup.py
@@ -17,8 +17,6 @@ This script creates a user "ppa-user" (email ppa-user@xxxxxxxxxxx,
password test) who is able to create PPAs.
"""
-from __future__ import absolute_import, print_function
-
__metaclass__ = type
import _pythonpath # noqa: F401
diff --git a/utilities/update-copyright b/utilities/update-copyright
index 6f6b19a..2c79e9c 100755
--- a/utilities/update-copyright
+++ b/utilities/update-copyright
@@ -10,8 +10,6 @@ notice to reflect the current year. Looks for the notice in the first three
lines of the file and leaves the file unchanged if it finds none.
"""
-from __future__ import absolute_import, print_function
-
from datetime import date
import os
import re