launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #05882
[Merge] lp:~wgrant/launchpad/openpgpocalypse into lp:launchpad
William Grant has proposed merging lp:~wgrant/launchpad/openpgpocalypse into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~wgrant/launchpad/openpgpocalypse/+merge/85057
gpghandler and related things still lurk in canonical.launchpad. This branch moves them to lp.services.gpg, and the test keys to lp.testing.gpgkeys.
--
https://code.launchpad.net/~wgrant/launchpad/openpgpocalypse/+merge/85057
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/openpgpocalypse into lp:launchpad.
=== modified file 'lib/canonical/launchpad/browser/logintoken.py'
--- lib/canonical/launchpad/browser/logintoken.py 2011-08-23 13:43:28 +0000
+++ lib/canonical/launchpad/browser/logintoken.py 2011-12-09 04:13:26 +0000
@@ -35,13 +35,6 @@
EmailAddressStatus,
IEmailAddressSet,
)
-from canonical.launchpad.interfaces.gpghandler import (
- GPGKeyExpired,
- GPGKeyNotFoundError,
- GPGKeyRevoked,
- GPGVerificationError,
- IGPGHandler,
- )
from canonical.launchpad.interfaces.logintoken import (
IGPGKeyValidationForm,
ILoginTokenSet,
@@ -70,6 +63,13 @@
IPersonSet,
ITeam,
)
+from lp.services.gpg.interfaces import (
+ GPGKeyExpired,
+ GPGKeyNotFoundError,
+ GPGKeyRevoked,
+ GPGVerificationError,
+ IGPGHandler,
+ )
class LoginTokenSetNavigation(GetitemNavigation):
=== modified file 'lib/canonical/launchpad/database/logintoken.py'
--- lib/canonical/launchpad/database/logintoken.py 2011-08-12 14:39:51 +0000
+++ lib/canonical/launchpad/database/logintoken.py 2011-12-09 04:13:26 +0000
@@ -36,7 +36,6 @@
from canonical.launchpad.helpers import get_email_template
from canonical.launchpad.interfaces.authtoken import LoginTokenType
from canonical.launchpad.interfaces.emailaddress import IEmailAddressSet
-from canonical.launchpad.interfaces.gpghandler import IGPGHandler
from canonical.launchpad.interfaces.logintoken import (
ILoginToken,
ILoginTokenSet,
@@ -52,6 +51,7 @@
from lp.app.validators.email import valid_email
from lp.registry.interfaces.gpg import IGPGKeySet
from lp.registry.interfaces.person import IPersonSet
+from lp.services.gpg.interfaces import IGPGHandler
from lp.services.mail.sendmail import (
format_address,
simple_sendmail,
=== modified file 'lib/canonical/launchpad/ftests/__init__.py'
--- lib/canonical/launchpad/ftests/__init__.py 2011-10-05 21:46:17 +0000
+++ lib/canonical/launchpad/ftests/__init__.py 2011-12-09 04:13:26 +0000
@@ -5,10 +5,6 @@
__all__ = [
'ANONYMOUS',
- 'decrypt_content',
- 'import_public_key',
- 'import_public_test_keys',
- 'import_secret_test_key',
'LaunchpadFormHarness',
'login',
'login_person',
@@ -18,15 +14,11 @@
from canonical.launchpad.ftests._launchpadformharness import (
LaunchpadFormHarness,
)
-from canonical.launchpad.ftests.keys_for_tests import (
- decrypt_content,
- import_public_key,
- import_public_test_keys,
- import_secret_test_key,
- )
from lp.testing import (
ANONYMOUS,
login,
login_person,
logout,
)
+
+
=== modified file 'lib/canonical/launchpad/testing/fakepackager.py'
--- lib/canonical/launchpad/testing/fakepackager.py 2011-06-09 10:50:25 +0000
+++ lib/canonical/launchpad/testing/fakepackager.py 2011-12-09 04:13:26 +0000
@@ -20,13 +20,13 @@
from zope.component import getUtility
-from canonical.launchpad.ftests.keys_for_tests import import_secret_test_key
-from canonical.launchpad.interfaces.gpghandler import IGPGHandler
from lp.archiveuploader.nascentupload import NascentUpload
from lp.archiveuploader.uploadpolicy import findPolicyByName
from lp.registry.interfaces.distribution import IDistributionSet
+from lp.services.gpg.interfaces import IGPGHandler
from lp.services.log.logger import BufferLogger
from lp.soyuz.enums import PackageUploadStatus
+from lp.testing.gpgkeys import import_secret_test_key
changelog_entry_template = (
=== modified file 'lib/canonical/launchpad/utilities/__init__.py'
--- lib/canonical/launchpad/utilities/__init__.py 2011-05-27 21:12:25 +0000
+++ lib/canonical/launchpad/utilities/__init__.py 2011-12-09 04:13:26 +0000
@@ -3,7 +3,6 @@
# pylint: disable-msg=W0401
-from canonical.launchpad.utilities.gpghandler import *
from canonical.launchpad.utilities.looptuner import *
from canonical.launchpad.utilities.orderingcheck import *
from lp.app.utilities.celebrities import *
=== removed directory 'lib/canonical/launchpad/utilities/ftests'
=== removed file 'lib/canonical/launchpad/utilities/ftests/__init__.py'
=== modified file 'lib/canonical/launchpad/zcml/configure.zcml'
--- lib/canonical/launchpad/zcml/configure.zcml 2011-12-08 05:13:31 +0000
+++ lib/canonical/launchpad/zcml/configure.zcml 2011-12-09 04:13:26 +0000
@@ -23,11 +23,4 @@
<include file="temporaryblobstorage.zcml" />
<include file="webservice.zcml" />
- <!-- System homepages -->
-
- <!-- Event configuration -->
-
- <!-- Special Utilities -->
- <include file="gpghandler.zcml" />
-
</configure>
=== modified file 'lib/lp/archivepublisher/archivesigningkey.py'
--- lib/lp/archivepublisher/archivesigningkey.py 2011-05-27 19:53:20 +0000
+++ lib/lp/archivepublisher/archivesigningkey.py 2011-12-09 04:13:26 +0000
@@ -17,7 +17,6 @@
from zope.interface import implements
from canonical.config import config
-from canonical.launchpad.interfaces.gpghandler import IGPGHandler
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
from lp.archivepublisher.config import getPubConfig
from lp.archivepublisher.interfaces.archivesigningkey import (
@@ -27,6 +26,7 @@
GPGKeyAlgorithm,
IGPGKeySet,
)
+from lp.services.gpg.interfaces import IGPGHandler
class ArchiveSigningKey:
=== modified file 'lib/lp/archivepublisher/tests/archive-signing.txt'
--- lib/lp/archivepublisher/tests/archive-signing.txt 2011-03-03 00:43:44 +0000
+++ lib/lp/archivepublisher/tests/archive-signing.txt 2011-12-09 04:13:26 +0000
@@ -195,7 +195,7 @@
exactly the same procedure for setting the signing_key information.
>>> import os
- >>> from canonical.launchpad.ftests.keys_for_tests import gpgkeysdir
+ >>> from lp.testing.gpgkeys import gpgkeysdir
>>> key_path = os.path.join(gpgkeysdir, 'ppa-sample@xxxxxxxxxxxxxxxxx')
>>> archive_signing_key.setSigningKey(key_path)
@@ -226,7 +226,7 @@
The generated key UID follows the "Launchpad PPA for %(person.displayname)s"
format.
- >>> from canonical.launchpad.interfaces.gpghandler import IGPGHandler
+ >>> from lp.services.gpg.interfaces import IGPGHandler
>>> gpghandler = getUtility(IGPGHandler)
>>> retrieved_key = gpghandler.retrieveKey(
=== modified file 'lib/lp/archivepublisher/tests/test_publisher.py'
--- lib/lp/archivepublisher/tests/test_publisher.py 2011-10-18 16:10:28 +0000
+++ lib/lp/archivepublisher/tests/test_publisher.py 2011-12-09 04:13:26 +0000
@@ -23,8 +23,6 @@
from canonical.config import config
from canonical.database.constants import UTC_NOW
-from canonical.launchpad.ftests.keys_for_tests import gpgkeysdir
-from canonical.launchpad.interfaces.gpghandler import IGPGHandler
from canonical.testing.layers import ZopelessDatabaseLayer
from lp.archivepublisher.config import getPubConfig
from lp.archivepublisher.diskpool import DiskPool
@@ -44,6 +42,7 @@
pocketsuffix,
)
from lp.registry.interfaces.series import SeriesStatus
+from lp.services.gpg.interfaces import IGPGHandler
from lp.services.log.logger import (
BufferLogger,
DevNullLogger,
@@ -58,6 +57,7 @@
from lp.soyuz.interfaces.archive import IArchiveSet
from lp.soyuz.tests.test_publishing import TestNativePublishingBase
from lp.testing import TestCaseWithFactory
+from lp.testing.gpgkeys import gpgkeysdir
from lp.testing.keyserver import KeyServerTac
=== modified file 'lib/lp/archiveuploader/dscfile.py'
--- lib/lp/archiveuploader/dscfile.py 2011-05-20 13:36:11 +0000
+++ lib/lp/archiveuploader/dscfile.py 2011-12-09 04:13:26 +0000
@@ -29,10 +29,6 @@
from debian.deb822 import Deb822Dict
from zope.component import getUtility
-from canonical.launchpad.interfaces.gpghandler import (
- GPGVerificationError,
- IGPGHandler,
- )
from canonical.librarian.utils import copy_and_close
from lp.app.errors import NotFoundError
from lp.archiveuploader.nascentuploadfile import (
@@ -65,6 +61,10 @@
from lp.registry.interfaces.sourcepackage import SourcePackageFileType
from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet
from lp.services.encoding import guess as guess_encoding
+from lp.services.gpg.interfaces import (
+ GPGVerificationError,
+ IGPGHandler,
+ )
from lp.soyuz.enums import (
ArchivePurpose,
SourcePackageFormat,
=== modified file 'lib/lp/archiveuploader/tests/nascentupload-announcements.txt'
--- lib/lp/archiveuploader/tests/nascentupload-announcements.txt 2011-10-27 06:50:49 +0000
+++ lib/lp/archiveuploader/tests/nascentupload-announcements.txt 2011-12-09 04:13:26 +0000
@@ -51,7 +51,7 @@
Import the test keys to use 'insecure' policy.
- >>> from canonical.launchpad.ftests import import_public_test_keys
+ >>> from lp.testing.gpgkeys import import_public_test_keys
>>> import_public_test_keys()
For the purpose of this test, hoary needs to be an open (development)
=== modified file 'lib/lp/archiveuploader/tests/nascentupload.txt'
--- lib/lp/archiveuploader/tests/nascentupload.txt 2011-09-29 04:12:59 +0000
+++ lib/lp/archiveuploader/tests/nascentupload.txt 2011-12-09 04:13:26 +0000
@@ -3,7 +3,7 @@
Import the test keys so we have them ready for verification
- >>> from canonical.launchpad.ftests import import_public_test_keys
+ >>> from lp.testing.gpgkeys import import_public_test_keys
>>> import_public_test_keys()
We need to be logged into the security model in order to get any further
@@ -743,7 +743,7 @@
Import the test keys again since the transaction was aborted before.
- >>> from canonical.launchpad.ftests import import_public_test_keys
+ >>> from lp.testing.gpgkeys import import_public_test_keys
>>> import_public_test_keys()
When using 'insecure' policy, NascentUpload instace stores the DSC
=== modified file 'lib/lp/archiveuploader/tests/nascentuploadfile.txt'
--- lib/lp/archiveuploader/tests/nascentuploadfile.txt 2011-06-09 10:50:25 +0000
+++ lib/lp/archiveuploader/tests/nascentuploadfile.txt 2011-12-09 04:13:26 +0000
@@ -13,7 +13,7 @@
Import the test keys so we have them ready for verification
- >>> from canonical.launchpad.ftests import import_public_test_keys
+ >>> from lp.testing.gpgkeys import import_public_test_keys
>>> import_public_test_keys()
We need to be logged into the security model in order to get any further
=== modified file 'lib/lp/archiveuploader/tests/test_buildduploads.py'
--- lib/lp/archiveuploader/tests/test_buildduploads.py 2011-08-17 14:44:07 +0000
+++ lib/lp/archiveuploader/tests/test_buildduploads.py 2011-12-09 04:13:26 +0000
@@ -10,21 +10,19 @@
from zope.component import getUtility
from canonical.database.constants import UTC_NOW
-from canonical.launchpad.ftests import import_public_test_keys
-from lp.soyuz.enums import (
- PackagePublishingStatus,
- PackageUploadStatus,
- )
from lp.archiveuploader.tests.test_uploadprocessor import (
TestUploadProcessorBase,
)
-from lp.archiveuploader.uploadprocessor import (
- UploadHandler,
- )
+from lp.archiveuploader.uploadprocessor import UploadHandler
from lp.registry.interfaces.distribution import IDistributionSet
from lp.registry.interfaces.pocket import PackagePublishingPocket
+from lp.soyuz.enums import (
+ PackagePublishingStatus,
+ PackageUploadStatus,
+ )
from lp.soyuz.interfaces.publishing import IPublishingSet
from lp.soyuz.model.binarypackagebuild import BinaryPackageBuild
+from lp.testing.gpgkeys import import_public_test_keys
class TestStagedBinaryUploadBase(TestUploadProcessorBase):
=== modified file 'lib/lp/archiveuploader/tests/test_changesfile.py'
--- lib/lp/archiveuploader/tests/test_changesfile.py 2011-05-22 23:47:39 +0000
+++ lib/lp/archiveuploader/tests/test_changesfile.py 2011-12-09 04:13:26 +0000
@@ -10,7 +10,6 @@
from debian.deb822 import Changes
from zope.component import getUtility
-from canonical.launchpad.ftests import import_public_test_keys
from canonical.testing.layers import (
LaunchpadZopelessLayer,
ZopelessDatabaseLayer,
@@ -36,6 +35,7 @@
from lp.registry.interfaces.person import IPersonSet
from lp.services.log.logger import BufferLogger
from lp.testing import TestCase
+from lp.testing.gpgkeys import import_public_test_keys
from lp.testing.keyserver import KeyServerTac
=== modified file 'lib/lp/archiveuploader/tests/test_nascentupload_documentation.py'
--- lib/lp/archiveuploader/tests/test_nascentupload_documentation.py 2010-12-22 01:08:48 +0000
+++ lib/lp/archiveuploader/tests/test_nascentupload_documentation.py 2011-12-09 04:13:26 +0000
@@ -12,7 +12,6 @@
from canonical.launchpad.database.librarian import LibraryFileAlias
from canonical.launchpad.ftests import (
- import_public_test_keys,
login,
logout,
)
@@ -29,8 +28,9 @@
from lp.archiveuploader.uploadpolicy import ArchiveUploadType
from lp.registry.interfaces.distribution import IDistributionSet
from lp.services.log.logger import DevNullLogger
+from lp.soyuz.interfaces.component import IComponentSet
from lp.soyuz.model.component import ComponentSelection
-from lp.soyuz.interfaces.component import IComponentSet
+from lp.testing.gpgkeys import import_public_test_keys
def getUploadForSource(upload_path):
=== modified file 'lib/lp/archiveuploader/tests/test_uploadprocessor.py'
--- lib/lp/archiveuploader/tests/test_uploadprocessor.py 2011-10-26 02:14:52 +0000
+++ lib/lp/archiveuploader/tests/test_uploadprocessor.py 2011-12-09 04:13:26 +0000
@@ -26,7 +26,6 @@
from canonical.config import config
from canonical.database.constants import UTC_NOW
-from canonical.launchpad.ftests import import_public_test_keys
from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet
from canonical.launchpad.testing.fakepackager import FakePackager
from canonical.testing.layers import LaunchpadZopelessLayer
@@ -104,6 +103,7 @@
TestCaseWithFactory,
)
from lp.testing.fakemethod import FakeMethod
+from lp.testing.gpgkeys import import_public_test_keys
from lp.testing.mail_helpers import pop_notifications
=== modified file 'lib/lp/bugs/mail/tests/test_handler.py'
--- lib/lp/bugs/mail/tests/test_handler.py 2011-11-28 00:35:15 +0000
+++ lib/lp/bugs/mail/tests/test_handler.py 2011-12-09 04:13:26 +0000
@@ -18,7 +18,6 @@
from canonical.config import config
from canonical.database.sqlbase import commit
-from canonical.launchpad.ftests import import_secret_test_key
from canonical.launchpad.interfaces.emailaddress import EmailAddressStatus
from canonical.launchpad.webapp.authorization import LaunchpadSecurityPolicy
from canonical.testing.layers import (
@@ -46,6 +45,7 @@
TestCaseWithFactory,
)
from lp.testing.factory import GPGSigningContext
+from lp.testing.gpgkeys import import_secret_test_key
from lp.testing.mail_helpers import pop_notifications
=== modified file 'lib/lp/code/model/tests/test_branchmergeproposal.py'
--- lib/lp/code/model/tests/test_branchmergeproposal.py 2011-09-06 12:41:28 +0000
+++ lib/lp/code/model/tests/test_branchmergeproposal.py 2011-12-09 04:13:26 +0000
@@ -24,7 +24,6 @@
from zope.security.proxy import removeSecurityProxy
from canonical.database.constants import UTC_NOW
-from canonical.launchpad.ftests import import_secret_test_key
from canonical.launchpad.interfaces.launchpad import IPrivacy
from canonical.launchpad.webapp import canonical_url
from canonical.launchpad.webapp.testing import verifyObject
@@ -90,6 +89,7 @@
GPGSigningContext,
LaunchpadObjectFactory,
)
+from lp.testing.gpgkeys import import_secret_test_key
class TestBranchMergeProposalInterface(TestCaseWithFactory):
=== modified file 'lib/lp/code/scripts/tests/test_create_merge_proposals.py'
--- lib/lp/code/scripts/tests/test_create_merge_proposals.py 2011-08-13 04:07:10 +0000
+++ lib/lp/code/scripts/tests/test_create_merge_proposals.py 2011-12-09 04:13:26 +0000
@@ -12,13 +12,13 @@
import transaction
from zope.component import getUtility
-from canonical.launchpad.ftests import import_secret_test_key
from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet
from canonical.launchpad.scripts.tests import run_script
from canonical.testing.layers import ZopelessAppServerLayer
from lp.code.model.branchmergeproposaljob import CreateMergeProposalJob
from lp.testing import TestCaseWithFactory
from lp.testing.factory import GPGSigningContext
+from lp.testing.gpgkeys import import_secret_test_key
class TestCreateMergeProposals(TestCaseWithFactory):
=== modified file 'lib/lp/poppy/tests/test_twistedftp.py'
--- lib/lp/poppy/tests/test_twistedftp.py 2011-05-02 12:55:06 +0000
+++ lib/lp/poppy/tests/test_twistedftp.py 2011-12-09 04:13:26 +0000
@@ -7,24 +7,22 @@
import os
-from testtools.deferredruntest import (
- AsynchronousDeferredRunTest,
- )
+from testtools.deferredruntest import AsynchronousDeferredRunTest
import transaction
from twisted.protocols import ftp
from zope.component import getUtility
from canonical.config import config
-from canonical.launchpad.ftests.keys_for_tests import gpgkeysdir
-from canonical.launchpad.interfaces.gpghandler import IGPGHandler
from canonical.testing.layers import ZopelessDatabaseLayer
-
from lp.poppy.twistedftp import PoppyFileWriter
from lp.registry.interfaces.gpg import (
GPGKeyAlgorithm,
- IGPGKeySet)
+ IGPGKeySet,
+ )
from lp.services.database.isolation import check_no_transaction
+from lp.services.gpg.interfaces import IGPGHandler
from lp.testing import TestCaseWithFactory
+from lp.testing.gpgkeys import gpgkeysdir
from lp.testing.keyserver import KeyServerTac
=== modified file 'lib/lp/poppy/twistedconfigreset.py'
--- lib/lp/poppy/twistedconfigreset.py 2011-05-14 12:17:46 +0000
+++ lib/lp/poppy/twistedconfigreset.py 2011-12-09 04:13:26 +0000
@@ -11,11 +11,10 @@
from twisted.application.service import Service
from twisted.internet import task
from twisted.internet.error import AlreadyCancelled
-
from zope.component import getUtility
from zope.component.interfaces import ComponentLookupError
-from canonical.launchpad.interfaces.gpghandler import IGPGHandler
+from lp.services.gpg.interfaces import IGPGHandler
class GPGHandlerConfigResetJob(Service):
=== modified file 'lib/lp/poppy/twistedftp.py'
--- lib/lp/poppy/twistedftp.py 2011-04-29 06:47:43 +0000
+++ lib/lp/poppy/twistedftp.py 2011-12-09 04:13:26 +0000
@@ -13,20 +13,23 @@
import os
import tempfile
-from twisted.application import service, strports
-from twisted.cred import checkers, credentials
-from twisted.cred.portal import IRealm, Portal
+from twisted.application import (
+ service,
+ strports,
+ )
+from twisted.cred import (
+ checkers,
+ credentials,
+ )
+from twisted.cred.portal import (
+ IRealm,
+ Portal,
+ )
from twisted.internet import defer
from twisted.protocols import ftp
from twisted.python import filepath
-
+from zope.component import getUtility
from zope.interface import implements
-from zope.component import getUtility
-
-from canonical.launchpad.interfaces.gpghandler import (
- GPGVerificationError,
- IGPGHandler,
- )
from canonical.config import config
from lp.poppy import get_poppy_root
@@ -34,6 +37,10 @@
from lp.poppy.hooks import Hooks
from lp.registry.interfaces.gpg import IGPGKeySet
from lp.services.database import read_transaction
+from lp.services.gpg.interfaces import (
+ GPGVerificationError,
+ IGPGHandler,
+ )
class PoppyAccessCheck:
=== modified file 'lib/lp/registry/browser/person.py'
--- lib/lp/registry/browser/person.py 2011-12-08 05:13:31 +0000
+++ lib/lp/registry/browser/person.py 2011-12-09 04:13:26 +0000
@@ -143,10 +143,6 @@
IEmailAddress,
IEmailAddressSet,
)
-from canonical.launchpad.interfaces.gpghandler import (
- GPGKeyNotFoundError,
- IGPGHandler,
- )
from canonical.launchpad.interfaces.launchpad import (
INotificationRecipientSet,
UnknownRecipientError,
@@ -267,6 +263,10 @@
)
from lp.services.fields import LocationField
from lp.services.geoip.interfaces import IRequestPreferredLanguages
+from lp.services.gpg.interfaces import (
+ GPGKeyNotFoundError,
+ IGPGHandler,
+ )
from lp.services.messages.interfaces.message import (
IDirectEmailAuthorization,
QuotaReachedError,
=== modified file 'lib/lp/registry/model/codeofconduct.py'
--- lib/lp/registry/model/codeofconduct.py 2010-08-20 20:31:18 +0000
+++ lib/lp/registry/model/codeofconduct.py 2011-12-09 04:13:26 +0000
@@ -31,10 +31,6 @@
quote,
SQLBase,
)
-from canonical.launchpad.interfaces.gpghandler import (
- GPGVerificationError,
- IGPGHandler,
- )
from canonical.launchpad.webapp import canonical_url
from lp.app.errors import NotFoundError
from lp.registry.interfaces.codeofconduct import (
@@ -45,6 +41,10 @@
ISignedCodeOfConductSet,
)
from lp.registry.interfaces.gpg import IGPGKeySet
+from lp.services.gpg.interfaces import (
+ GPGVerificationError,
+ IGPGHandler,
+ )
from lp.services.mail.sendmail import (
format_address,
simple_sendmail,
=== modified file 'lib/lp/registry/model/gpgkey.py'
--- lib/lp/registry/model/gpgkey.py 2010-08-20 20:31:18 +0000
+++ lib/lp/registry/model/gpgkey.py 2011-12-09 04:13:26 +0000
@@ -21,12 +21,12 @@
SQLBase,
sqlvalues,
)
-from canonical.launchpad.interfaces.gpghandler import IGPGHandler
from lp.registry.interfaces.gpg import (
GPGKeyAlgorithm,
IGPGKey,
IGPGKeySet,
)
+from lp.services.gpg.interfaces import IGPGHandler
class GPGKey(SQLBase):
=== modified file 'lib/lp/registry/stories/gpg-coc/xx-gpg-coc.txt'
--- lib/lp/registry/stories/gpg-coc/xx-gpg-coc.txt 2011-07-07 23:50:34 +0000
+++ lib/lp/registry/stories/gpg-coc/xx-gpg-coc.txt 2011-12-09 04:13:26 +0000
@@ -87,9 +87,9 @@
Import the secret keys needed for this test:
>>> from zope.component import getUtility
- >>> from canonical.launchpad.interfaces.gpghandler import IGPGHandler
+ >>> from lp.services.gpg.interfaces import IGPGHandler
- >>> from canonical.launchpad.ftests import (
+ >>> from lp.testing.gpgkeys import (
... import_secret_test_key, decrypt_content)
@@ -518,7 +518,6 @@
Get the token from the body of the email sent.
>>> import email, re
- >>> from canonical.launchpad.ftests import decrypt_content
>>> from lp.services.mail import stub
>>> from_addr, to_addrs, raw_msg = stub.test_emails.pop()
>>> msg = email.message_from_string(raw_msg)
=== modified file 'lib/lp/services/configure.zcml'
--- lib/lp/services/configure.zcml 2011-12-08 05:13:31 +0000
+++ lib/lp/services/configure.zcml 2011-12-09 04:13:26 +0000
@@ -9,6 +9,7 @@
<include package=".fields" />
<include package=".geoip" />
<include package=".googlesearch" />
+ <include package=".gpg" />
<include package=".inlinehelp" file="meta.zcml" />
<include package=".job" />
<include package=".longpoll" />
=== added directory 'lib/lp/services/gpg'
=== added file 'lib/lp/services/gpg/__init__.py'
=== renamed file 'lib/canonical/launchpad/zcml/gpghandler.zcml' => 'lib/lp/services/gpg/configure.zcml'
--- lib/canonical/launchpad/zcml/gpghandler.zcml 2011-05-02 12:55:06 +0000
+++ lib/lp/services/gpg/configure.zcml 2011-12-09 04:13:26 +0000
@@ -9,26 +9,26 @@
xmlns:zope="http://namespaces.zope.org/zope"
i18n_domain="launchpad">
- <class class="canonical.launchpad.utilities.GPGHandler">
- <allow interface="canonical.launchpad.interfaces.gpghandler.IGPGHandler" />
+ <class class="lp.services.gpg.handler.GPGHandler">
+ <allow interface="lp.services.gpg.interfaces.IGPGHandler" />
</class>
<securedutility
- class="canonical.launchpad.utilities.GPGHandler"
- provides="canonical.launchpad.interfaces.gpghandler.IGPGHandler">
- <allow interface="canonical.launchpad.interfaces.gpghandler.IGPGHandler" />
+ class="lp.services.gpg.handler.GPGHandler"
+ provides="lp.services.gpg.interfaces.IGPGHandler">
+ <allow interface="lp.services.gpg.interfaces.IGPGHandler" />
</securedutility>
- <class class="canonical.launchpad.utilities.PymeSignature">
- <allow interface="canonical.launchpad.interfaces.gpghandler.IPymeSignature" />
- </class>
-
- <class class="canonical.launchpad.utilities.PymeKey">
- <allow interface="canonical.launchpad.interfaces.gpghandler.IPymeKey" />
- </class>
-
- <class class="canonical.launchpad.utilities.PymeUserId">
- <allow interface="canonical.launchpad.interfaces.gpghandler.IPymeUserId" />
+ <class class="lp.services.gpg.handler.PymeSignature">
+ <allow interface="lp.services.gpg.interfaces.IPymeSignature" />
+ </class>
+
+ <class class="lp.services.gpg.handler.PymeKey">
+ <allow interface="lp.services.gpg.interfaces.IPymeKey" />
+ </class>
+
+ <class class="lp.services.gpg.handler.PymeUserId">
+ <allow interface="lp.services.gpg.interfaces.IPymeUserId" />
</class>
</configure>
=== added directory 'lib/lp/services/gpg/doc'
=== renamed file 'lib/canonical/launchpad/doc/gpg-encryption.txt' => 'lib/lp/services/gpg/doc/gpg-encryption.txt'
--- lib/canonical/launchpad/doc/gpg-encryption.txt 2010-10-18 22:24:59 +0000
+++ lib/lp/services/gpg/doc/gpg-encryption.txt 2011-12-09 04:13:26 +0000
@@ -5,7 +5,7 @@
decrypt contents in Launchpad, and demonstrates that the methods
can support Unicode contents.
- >>> from canonical.launchpad.ftests import (
+ >>> from lp.testing.gpgkeys import (
... import_public_test_keys, import_secret_test_key, decrypt_content)
>>> import transaction
>>> import_public_test_keys()
@@ -28,7 +28,7 @@
>>> bag.user.name
u'name12'
- >>> from canonical.launchpad.interfaces.gpghandler import IGPGHandler
+ >>> from lp.services.gpg.interfaces import IGPGHandler
>>> gpghandler = getUtility(IGPGHandler)
Let's use a unicode content, it can't be directly typed as
=== renamed file 'lib/lp/registry/doc/gpg-signatures.txt' => 'lib/lp/services/gpg/doc/gpg-signatures.txt'
--- lib/lp/registry/doc/gpg-signatures.txt 2010-10-18 22:24:59 +0000
+++ lib/lp/services/gpg/doc/gpg-signatures.txt 2011-12-09 04:13:26 +0000
@@ -1,7 +1,7 @@
OpenPGP Signature Verification
==============================
- >>> from canonical.launchpad.ftests import import_public_test_keys
+ >>> from lp.testing.gpgkeys import import_public_test_keys
>>> import transaction
>>> import_public_test_keys()
@@ -20,7 +20,7 @@
u'name12'
>>> from zope.component import getUtility
- >>> from canonical.launchpad.interfaces.gpghandler import IGPGHandler
+ >>> from lp.services.gpg.interfaces import IGPGHandler
>>> gpghandler = getUtility(IGPGHandler)
The text below was "clear signed" by 0xDFD20543 master key:
=== renamed file 'lib/canonical/launchpad/doc/gpghandler.txt' => 'lib/lp/services/gpg/doc/gpghandler.txt'
--- lib/canonical/launchpad/doc/gpghandler.txt 2011-05-30 12:45:29 +0000
+++ lib/lp/services/gpg/doc/gpghandler.txt 2011-12-09 04:13:26 +0000
@@ -25,7 +25,7 @@
>>> from zope.component import getUtility
>>> from canonical.launchpad.webapp.testing import verifyObject
- >>> from canonical.launchpad.interfaces.gpghandler import (
+ >>> from lp.services.gpg.interfaces import (
... IGPGHandler,
... IPymeKey,
... )
@@ -53,7 +53,7 @@
Let's recover some coherent data and verify if it works as expected:
>>> import os
- >>> from canonical.launchpad.ftests.keys_for_tests import gpgkeysdir
+ >>> from lp.testing.gpgkeys import gpgkeysdir
>>> filepath = os.path.join(gpgkeysdir, 'test@xxxxxxxxxxxxxxxxx')
>>> pubkey = open(filepath).read()
>>> key = gpghandler.importPublicKey(pubkey)
=== renamed file 'lib/canonical/launchpad/utilities/gpghandler.py' => 'lib/lp/services/gpg/handler.py'
--- lib/canonical/launchpad/utilities/gpghandler.py 2011-09-13 05:23:16 +0000
+++ lib/lp/services/gpg/handler.py 2011-12-09 04:13:26 +0000
@@ -28,7 +28,17 @@
from zope.interface import implements
from canonical.config import config
-from canonical.launchpad.interfaces.gpghandler import (
+from canonical.launchpad.webapp import errorlog
+from canonical.lazr.timeout import (
+ TimeoutError,
+ urlfetch,
+ )
+from lp.app.validators.email import valid_email
+from lp.registry.interfaces.gpg import (
+ GPGKeyAlgorithm,
+ valid_fingerprint,
+ )
+from lp.services.gpg.interfaces import (
GPGKeyDoesNotExistOnServer,
GPGKeyExpired,
GPGKeyNotFoundError,
@@ -43,16 +53,6 @@
MoreThanOneGPGKeyFound,
SecretGPGKeyImportDetected,
)
-from canonical.launchpad.webapp import errorlog
-from canonical.lazr.timeout import (
- TimeoutError,
- urlfetch,
- )
-from lp.app.validators.email import valid_email
-from lp.registry.interfaces.gpg import (
- GPGKeyAlgorithm,
- valid_fingerprint,
- )
from lp.services.timeline.requesttimeline import get_request_timeline
=== renamed file 'lib/canonical/launchpad/interfaces/gpghandler.py' => 'lib/lp/services/gpg/interfaces.py'
=== added directory 'lib/lp/services/gpg/tests'
=== added file 'lib/lp/services/gpg/tests/__init__.py'
=== added file 'lib/lp/services/gpg/tests/test_doc.py'
--- lib/lp/services/gpg/tests/test_doc.py 1970-01-01 00:00:00 +0000
+++ lib/lp/services/gpg/tests/test_doc.py 2011-12-09 04:13:26 +0000
@@ -0,0 +1,18 @@
+# Copyright 2009 Canonical Ltd. This software is licensed under the
+# GNU Affero General Public License version 3 (see the file LICENSE).
+
+"""
+Run the doctests and pagetests.
+"""
+
+import os
+
+from canonical.testing.layers import LaunchpadFunctionalLayer
+from lp.services.testing import build_test_suite
+
+
+here = os.path.dirname(os.path.realpath(__file__))
+
+
+def test_suite():
+ return build_test_suite(here, layer=LaunchpadFunctionalLayer)
=== renamed file 'lib/canonical/launchpad/utilities/ftests/test_gpghandler.py' => 'lib/lp/services/gpg/tests/test_gpghandler.py'
--- lib/canonical/launchpad/utilities/ftests/test_gpghandler.py 2011-10-28 06:43:50 +0000
+++ lib/lp/services/gpg/tests/test_gpghandler.py 2011-12-09 04:13:26 +0000
@@ -11,31 +11,35 @@
from time import time
from pytz import UTC
+from testtools.matchers import (
+ LessThan,
+ Not,
+ )
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
-from testtools.matchers import (
- Not,
- LessThan,
- )
-
from canonical.launchpad.ftests import (
ANONYMOUS,
- keys_for_tests,
login,
logout,
)
-from canonical.launchpad.interfaces.gpghandler import (
- GPGKeyDoesNotExistOnServer,
- GPGKeyTemporarilyNotFoundError,
- IGPGHandler,
- )
from canonical.lazr.timeout import (
get_default_timeout_function,
set_default_timeout_function,
)
from canonical.testing.layers import LaunchpadFunctionalLayer
+from lp.services.gpg.interfaces import (
+ GPGKeyDoesNotExistOnServer,
+ GPGKeyTemporarilyNotFoundError,
+ IGPGHandler,
+ )
from lp.testing import TestCase
+from lp.testing.gpgkeys import (
+ import_secret_test_key,
+ iter_test_key_emails,
+ test_keyrings,
+ test_pubkey_from_email,
+ )
from lp.testing.keyserver import KeyServerTac
@@ -59,8 +63,8 @@
super(TestImportKeyRing, self).tearDown()
def populateKeyring(self):
- for email in keys_for_tests.iter_test_key_emails():
- pubkey = keys_for_tests.test_pubkey_from_email(email)
+ for email in iter_test_key_emails():
+ pubkey = test_pubkey_from_email(email)
self.gpg_handler.importPublicKey(pubkey)
# This sequence might fit better as a doctest. Hmm.
@@ -113,7 +117,7 @@
list(self.gpg_handler.localKeys(secret=True)), [])
# Import a secret key and look it up.
- keys_for_tests.import_secret_test_key()
+ import_secret_test_key()
secret_target_fpr = 'A419AE861E88BC9E04B9C26FBA2B9389DFD20543'
filtered_keys = self.gpg_handler.localKeys(secret=True)
@@ -150,7 +154,7 @@
def testTestkeyrings(self):
"""Do we have the expected test keyring files"""
- self.assertEqual(len(list(keys_for_tests.test_keyrings())), 1)
+ self.assertEqual(len(list(test_keyrings())), 1)
def testHomeDirectoryJob(self):
"""Does the job to touch the home work."""
=== modified file 'lib/lp/services/mail/doc/emailauthentication.txt'
--- lib/lp/services/mail/doc/emailauthentication.txt 2011-08-12 15:57:11 +0000
+++ lib/lp/services/mail/doc/emailauthentication.txt 2011-12-09 04:13:26 +0000
@@ -12,8 +12,8 @@
>>> from canonical.config import config
>>> from canonical.database.sqlbase import commit
- >>> from canonical.launchpad.ftests import import_public_test_keys
>>> from canonical.testing.layers import LaunchpadZopelessLayer
+ >>> from lp.testing.gpgkeys import import_public_test_keys
>>> LaunchpadZopelessLayer.switchDbUser('launchpad')
>>> import_public_test_keys()
@@ -119,7 +119,7 @@
... '\n'.join(msg_lines), _class=SignedMessage)
>>> msg.parsed_string = msg.as_string()
- >>> from canonical.launchpad.interfaces.gpghandler import IGPGHandler
+ >>> from lp.services.gpg.interfaces import IGPGHandler
>>> getUtility(IGPGHandler).getVerifiedSignature(
... msg.signedContent, msg.signature)
Traceback (most recent call last):
=== modified file 'lib/lp/services/mail/incoming.py'
--- lib/lp/services/mail/incoming.py 2011-10-28 06:43:50 +0000
+++ lib/lp/services/mail/incoming.py 2011-12-09 04:13:26 +0000
@@ -27,10 +27,6 @@
)
from canonical.launchpad.interfaces.account import AccountStatus
-from canonical.launchpad.interfaces.gpghandler import (
- GPGVerificationError,
- IGPGHandler,
- )
from canonical.launchpad.mailnotification import (
send_process_error_notification,
)
@@ -46,6 +42,10 @@
from canonical.librarian.interfaces import UploadFailed
from lp.registry.interfaces.person import IPerson
from lp.services.features import getFeatureFlag
+from lp.services.gpg.interfaces import (
+ GPGVerificationError,
+ IGPGHandler,
+ )
from lp.services.mail.handlers import mail_handlers
from lp.services.mail.helpers import (
ensure_sane_signature_timestamp,
=== modified file 'lib/lp/services/mail/tests/incomingmail.txt'
--- lib/lp/services/mail/tests/incomingmail.txt 2011-10-25 21:24:59 +0000
+++ lib/lp/services/mail/tests/incomingmail.txt 2011-12-09 04:13:26 +0000
@@ -74,7 +74,7 @@
import the keys before handleMail is called.
>>> from canonical.config import config
- >>> from canonical.launchpad.ftests import import_public_test_keys
+ >>> from lp.testing.gpgkeys import import_public_test_keys
>>> import_public_test_keys()
>>> commit()
>>> LaunchpadZopelessLayer.switchDbUser(config.processmail.dbuser)
=== modified file 'lib/lp/services/mail/tests/test_incoming.py'
--- lib/lp/services/mail/tests/test_incoming.py 2011-10-17 01:45:44 +0000
+++ lib/lp/services/mail/tests/test_incoming.py 2011-12-09 04:13:26 +0000
@@ -14,7 +14,6 @@
from zope.security.management import setSecurityPolicy
from canonical.config import config
-from canonical.launchpad.ftests import import_secret_test_key
from canonical.launchpad.testing.systemdocs import LayeredDocFileSuite
from canonical.launchpad.webapp.authorization import LaunchpadSecurityPolicy
from canonical.testing.layers import LaunchpadZopelessLayer
@@ -31,6 +30,7 @@
from lp.services.mail.tests.helpers import testmails_path
from lp.testing import TestCaseWithFactory
from lp.testing.factory import GPGSigningContext
+from lp.testing.gpgkeys import import_secret_test_key
from lp.testing.mail_helpers import pop_notifications
=== modified file 'lib/lp/services/mail/tests/test_signedmessage.py'
--- lib/lp/services/mail/tests/test_signedmessage.py 2011-08-13 04:07:10 +0000
+++ lib/lp/services/mail/tests/test_signedmessage.py 2011-12-09 04:13:26 +0000
@@ -17,13 +17,9 @@
import gpgme
from zope.component import getUtility
-from canonical.launchpad.ftests import (
- import_public_test_keys,
- import_secret_test_key,
- )
-from canonical.launchpad.interfaces.gpghandler import IGPGHandler
from canonical.testing.layers import DatabaseFunctionalLayer
from lp.registry.interfaces.person import IPersonSet
+from lp.services.gpg.interfaces import IGPGHandler
from lp.services.mail.incoming import (
authenticateEmail,
canonicalise_line_endings,
@@ -32,6 +28,10 @@
from lp.services.mail.signedmessage import signed_message_from_string
from lp.testing import TestCaseWithFactory
from lp.testing.factory import GPGSigningContext
+from lp.testing.gpgkeys import (
+ import_public_test_keys,
+ import_secret_test_key,
+ )
class TestSignedMessage(TestCaseWithFactory):
=== modified file 'lib/lp/soyuz/browser/tests/distroseriesqueue-views.txt'
--- lib/lp/soyuz/browser/tests/distroseriesqueue-views.txt 2011-01-17 21:51:09 +0000
+++ lib/lp/soyuz/browser/tests/distroseriesqueue-views.txt 2011-12-09 04:13:26 +0000
@@ -253,12 +253,12 @@
... sourcename="foo", distroseries=hoary, version="1.0-2",
... status=PackagePublishingStatus.PUBLISHED)
- >>> from canonical.launchpad.ftests import import_public_test_keys
>>> from lp.archiveuploader.uploadpolicy import ArchiveUploadType
+ >>> from lp.archiveuploader.tests import datadir, getPolicy
+ >>> from lp.archiveuploader.nascentupload import NascentUpload
>>> from lp.soyuz.interfaces.component import IComponentSet
>>> from lp.soyuz.model.component import ComponentSelection
- >>> from lp.archiveuploader.tests import datadir, getPolicy
- >>> from lp.archiveuploader.nascentupload import NascentUpload
+ >>> from lp.testing.gpgkeys import import_public_test_keys
>>> import_public_test_keys()
>>> universe = getUtility(IComponentSet)['universe']
>>> trash = ComponentSelection(distroseries=hoary, component=universe)
=== modified file 'lib/lp/soyuz/doc/distroseriesqueue-ddtp-tarball.txt'
--- lib/lp/soyuz/doc/distroseriesqueue-ddtp-tarball.txt 2011-06-16 08:10:40 +0000
+++ lib/lp/soyuz/doc/distroseriesqueue-ddtp-tarball.txt 2011-12-09 04:13:26 +0000
@@ -29,7 +29,7 @@
>>> from lp.archiveuploader.nascentupload import NascentUpload
>>> from lp.archiveuploader.tests import datadir, getPolicy
- >>> from canonical.launchpad.ftests import import_public_test_keys
+ >>> from lp.testing.gpgkeys import import_public_test_keys
>>> import_public_test_keys()
Login as an admin (or ubuntutest.archive_admin if we have one), since
=== modified file 'lib/lp/soyuz/doc/distroseriesqueue-debian-installer.txt'
--- lib/lp/soyuz/doc/distroseriesqueue-debian-installer.txt 2010-12-22 20:46:21 +0000
+++ lib/lp/soyuz/doc/distroseriesqueue-debian-installer.txt 2011-12-09 04:13:26 +0000
@@ -38,7 +38,7 @@
debian-installer tarball, despite the fact that it's very unlikely to
happen in production:
- >>> from canonical.launchpad.ftests import import_public_test_keys
+ >>> from lp.testing.gpgkeys import import_public_test_keys
>>> import_public_test_keys()
>>> login('foo.bar@xxxxxxxxxxxxx')
=== modified file 'lib/lp/soyuz/doc/distroseriesqueue-dist-upgrader.txt'
--- lib/lp/soyuz/doc/distroseriesqueue-dist-upgrader.txt 2011-10-21 11:14:26 +0000
+++ lib/lp/soyuz/doc/distroseriesqueue-dist-upgrader.txt 2011-12-09 04:13:26 +0000
@@ -11,7 +11,7 @@
>>> ubuntutest = getUtility(IDistributionSet)['ubuntutest']
>>> breezy_autotest = ubuntutest['breezy-autotest']
- >>> from canonical.launchpad.ftests import import_public_test_keys
+ >>> from lp.testing.gpgkeys import import_public_test_keys
>>> import_public_test_keys()
Login as an admin.
=== modified file 'lib/lp/soyuz/doc/distroseriesqueue-translations.txt'
--- lib/lp/soyuz/doc/distroseriesqueue-translations.txt 2011-11-29 05:15:07 +0000
+++ lib/lp/soyuz/doc/distroseriesqueue-translations.txt 2011-12-09 04:13:26 +0000
@@ -25,7 +25,7 @@
>>> from lp.archiveuploader.nascentupload import NascentUpload
>>> from lp.archiveuploader.tests import datadir, getPolicy
- >>> from canonical.launchpad.ftests import import_public_test_keys
+ >>> from lp.testing.gpgkeys import import_public_test_keys
>>> import_public_test_keys()
>>> from canonical.database.constants import UTC_NOW
=== modified file 'lib/lp/soyuz/doc/distroseriesqueue.txt'
--- lib/lp/soyuz/doc/distroseriesqueue.txt 2011-06-28 15:04:29 +0000
+++ lib/lp/soyuz/doc/distroseriesqueue.txt 2011-12-09 04:13:26 +0000
@@ -39,7 +39,7 @@
First up, we need to actually process an upload to get it into the
queue. To do this we prepare an OpenPGP key, and then run the upload handler.
- >>> from canonical.launchpad.ftests import import_public_test_keys
+ >>> from lp.testing.gpgkeys import import_public_test_keys
>>> import_public_test_keys()
We need some setup for the upload handler.
=== modified file 'lib/lp/soyuz/doc/fakepackager.txt'
--- lib/lp/soyuz/doc/fakepackager.txt 2011-06-09 10:50:25 +0000
+++ lib/lp/soyuz/doc/fakepackager.txt 2011-12-09 04:13:26 +0000
@@ -160,7 +160,7 @@
>>> content = open(changesfile_path).read()
>>> from zope.component import getUtility
- >>> from canonical.launchpad.interfaces.gpghandler import IGPGHandler
+ >>> from lp.services.gpg.interfaces import IGPGHandler
>>> gpghandler = getUtility(IGPGHandler)
>>> sig = gpghandler.verifySignature(content)
@@ -225,7 +225,7 @@
It also requires the public test gpg keys to be imported in the
database.
- >>> from canonical.launchpad.ftests import import_public_test_keys
+ >>> from lp.testing.gpgkeys import import_public_test_keys
>>> import_public_test_keys()
The default upload target is ubuntu/hoary and since we will deal with
=== modified file 'lib/lp/soyuz/doc/package-diff.txt'
--- lib/lp/soyuz/doc/package-diff.txt 2010-11-06 12:50:22 +0000
+++ lib/lp/soyuz/doc/package-diff.txt 2011-12-09 04:13:26 +0000
@@ -143,7 +143,7 @@
And setup the test_keys in order to build and upload signed packages.
- >>> from canonical.launchpad.ftests import import_public_test_keys
+ >>> from lp.testing.gpgkeys import import_public_test_keys
>>> import_public_test_keys()
When the first version of 'biscuit' is uploaded, since there is no
=== modified file 'lib/lp/soyuz/doc/soyuz-set-of-uploads.txt'
--- lib/lp/soyuz/doc/soyuz-set-of-uploads.txt 2011-08-09 06:30:01 +0000
+++ lib/lp/soyuz/doc/soyuz-set-of-uploads.txt 2011-12-09 04:13:26 +0000
@@ -68,7 +68,7 @@
Import public keyring into current LPDB.
- >>> from canonical.launchpad.ftests import import_public_test_keys
+ >>> from lp.testing.gpgkeys import import_public_test_keys
>>> import_public_test_keys()
Having set up that infrastructure we need to prepare a breezy distroseries
=== modified file 'lib/lp/soyuz/doc/soyuz-upload.txt'
--- lib/lp/soyuz/doc/soyuz-upload.txt 2011-09-29 13:01:04 +0000
+++ lib/lp/soyuz/doc/soyuz-upload.txt 2011-12-09 04:13:26 +0000
@@ -156,8 +156,8 @@
So, load the GPG key:
>>> from zope.component import getUtility
- >>> from canonical.launchpad.ftests.keys_for_tests import gpgkeysdir
- >>> from canonical.launchpad.interfaces.gpghandler import IGPGHandler
+ >>> from lp.services.gpg.interfaces import IGPGHandler
+ >>> from lp.testing.gpgkeys import gpgkeysdir
>>> gpg_handler = getUtility(IGPGHandler)
>>> key_path = os.path.join(gpgkeysdir, 'ftpmaster@xxxxxxxxxxxxxxxxx')
>>> key_data = open(key_path).read()
=== modified file 'lib/lp/soyuz/tests/soyuz.py'
--- lib/lp/soyuz/tests/soyuz.py 2011-11-29 05:15:07 +0000
+++ lib/lp/soyuz/tests/soyuz.py 2011-12-09 04:13:26 +0000
@@ -16,7 +16,6 @@
from canonical.config import config
from canonical.launchpad.database.librarian import LibraryFileAlias
-from canonical.launchpad.ftests import import_public_test_keys
from canonical.launchpad.testing.fakepackager import FakePackager
from canonical.testing.layers import LaunchpadZopelessLayer
from lp.registry.interfaces.distribution import IDistributionSet
@@ -29,6 +28,7 @@
SourcePackagePublishingHistory,
)
from lp.testing.dbuser import dbuser
+from lp.testing.gpgkeys import import_public_test_keys
from lp.testing.sampledata import (
BUILDD_ADMIN_USERNAME,
CHROOT_LIBRARYFILEALIAS,
=== modified file 'lib/lp/testing/factory.py'
--- lib/lp/testing/factory.py 2011-12-08 05:13:31 +0000
+++ lib/lp/testing/factory.py 2011-12-09 04:13:26 +0000
@@ -80,7 +80,6 @@
EmailAddressStatus,
IEmailAddressSet,
)
-from canonical.launchpad.interfaces.gpghandler import IGPGHandler
from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet
from canonical.launchpad.interfaces.lpstorm import (
IMasterStore,
@@ -242,6 +241,7 @@
from lp.registry.interfaces.ssh import ISSHKeySet
from lp.registry.model.milestone import Milestone
from lp.registry.model.suitesourcepackage import SuiteSourcePackage
+from lp.services.gpg.interfaces import IGPGHandler
from lp.services.job.interfaces.job import SuspendJobException
from lp.services.log.logger import BufferLogger
from lp.services.mail.signedmessage import SignedMessage
=== added directory 'lib/lp/testing/gpgkeys'
=== renamed file 'lib/canonical/launchpad/ftests/keys_for_tests.py' => 'lib/lp/testing/gpgkeys/__init__.py'
--- lib/canonical/launchpad/ftests/keys_for_tests.py 2010-10-21 04:19:36 +0000
+++ lib/lp/testing/gpgkeys/__init__.py 2011-12-09 04:13:26 +0000
@@ -25,15 +25,15 @@
import gpgme
from zope.component import getUtility
-from canonical.launchpad.interfaces.gpghandler import IGPGHandler
from lp.registry.interfaces.gpg import (
GPGKeyAlgorithm,
IGPGKeySet,
)
from lp.registry.interfaces.person import IPersonSet
-
-
-gpgkeysdir = os.path.join(os.path.dirname(__file__), 'gpgkeys')
+from lp.services.gpg.interfaces import IGPGHandler
+
+
+gpgkeysdir = os.path.join(os.path.dirname(__file__), 'data')
def import_public_key(email_addr):
=== renamed directory 'lib/canonical/launchpad/ftests/gpgkeys' => 'lib/lp/testing/gpgkeys/data'
=== modified symlink 'lib/lp/testing/keyserver/tests/keys/0x33C0A61893A5DC5EB325B29E415A12CAC2F30234.get'
=== target changed u'../../../../../canonical/launchpad/ftests/gpgkeys/ftpmaster@xxxxxxxxxxxxxxxxx' => u'../../../gpgkeys/data/ftpmaster@xxxxxxxxxxxxxxxxx'
=== modified symlink 'lib/lp/testing/keyserver/tests/keys/0x340CA3BB270E2716C9EE0B768E7EB7086C64A8C5.get'
=== target changed u'../../../../../canonical/launchpad/ftests/gpgkeys/foo.bar@xxxxxxxxxxxxxxxxx' => u'../../../gpgkeys/data/foo.bar@xxxxxxxxxxxxxxxxx'
=== modified symlink 'lib/lp/testing/keyserver/tests/keys/0x447DBF38C4F9C4ED752246B77D88913717B05A8F.get'
=== target changed u'../../../../../canonical/launchpad/ftests/gpgkeys/sign.only@xxxxxxxxxxxxxxxxx' => u'../../../gpgkeys/data/sign.only@xxxxxxxxxxxxxxxxx'
=== modified symlink 'lib/lp/testing/keyserver/tests/keys/0x84D205F03E1E67096CB54E262BE83793AACCD97C.get'
=== target changed u'../../../../../canonical/launchpad/ftests/gpgkeys/revoked.key@xxxxxxxxxxxxxxxxx' => u'../../../gpgkeys/data/revoked.key@xxxxxxxxxxxxxxxxx'
=== modified symlink 'lib/lp/testing/keyserver/tests/keys/0x961F4EB829D7D304A77477822BC8401620687895.get'
=== target changed u'../../../../../canonical/launchpad/ftests/gpgkeys/daniel.silverstone@xxxxxxxxxxxxxxxxx' => u'../../../gpgkeys/data/daniel.silverstone@xxxxxxxxxxxxxxxxx'
=== modified symlink 'lib/lp/testing/keyserver/tests/keys/0xA419AE861E88BC9E04B9C26FBA2B9389DFD20543.get'
=== target changed u'../../../../../canonical/launchpad/ftests/gpgkeys/test@xxxxxxxxxxxxxxxxx' => u'../../../gpgkeys/data/test@xxxxxxxxxxxxxxxxx'
=== modified symlink 'lib/lp/testing/keyserver/tests/keys/0xC85826521A6EF6A6037BB3F79FF2583E681B6469.get'
=== target changed u'../../../../../canonical/launchpad/ftests/gpgkeys/celso.providelo@xxxxxxxxxxxxxxxxx' => u'../../../gpgkeys/data/celso.providelo@xxxxxxxxxxxxxxxxx'
=== modified symlink 'lib/lp/testing/keyserver/tests/keys/0xECA5B797586F2E27381A16CFDE6C9167046C6D63.get'
=== target changed u'../../../../../canonical/launchpad/ftests/gpgkeys/expired.key@xxxxxxxxxxxxxxxxx' => u'../../../gpgkeys/data/expired.key@xxxxxxxxxxxxxxxxx'
=== modified symlink 'lib/lp/testing/keyserver/tests/keys/README'
=== target changed u'../../../../../canonical/launchpad/ftests/gpgkeys/README' => u'../../../gpgkeys/data/README'
=== modified file 'lib/lp/testing/keyserver/web.py'
--- lib/lp/testing/keyserver/web.py 2011-05-30 15:59:19 +0000
+++ lib/lp/testing/keyserver/web.py 2011-12-09 04:13:26 +0000
@@ -38,10 +38,9 @@
from time import sleep
from twisted.web.resource import Resource
-
from zope.component import getUtility
-from canonical.launchpad.interfaces.gpghandler import (
+from lp.services.gpg.interfaces import (
GPGKeyNotFoundError,
IGPGHandler,
MoreThanOneGPGKeyFound,
=== modified file 'utilities/make-lp-user'
--- utilities/make-lp-user 2011-10-18 09:36:12 +0000
+++ utilities/make-lp-user 2011-12-09 04:13:26 +0000
@@ -42,7 +42,7 @@
from zope.component import getUtility
-from canonical.launchpad.interfaces.gpghandler import IGPGHandler
+from lp.services.gpg.interfaces import IGPGHandler
from canonical.launchpad.scripts import execute_zcml_for_scripts
from canonical.lazr.timeout import set_default_timeout_function
from lp.registry.interfaces.gpg import GPGKeyAlgorithm, IGPGKeySet
Follow ups