launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #16427
[Merge] lp:~cjwatson/launchpad/you-say-behavior-i-say-behaviour into lp:launchpad
Colin Watson has proposed merging lp:~cjwatson/launchpad/you-say-behavior-i-say-behaviour into lp:launchpad.
Commit message:
Use British English spelling for "behaviour", per the Canonical style guide.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/you-say-behavior-i-say-behaviour/+merge/204001
Use British English spelling for "behaviour", per the Canonical style guide.
--
https://code.launchpad.net/~cjwatson/launchpad/you-say-behavior-i-say-behaviour/+merge/204001
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/you-say-behavior-i-say-behaviour into lp:launchpad.
=== modified file 'configs/README.txt'
--- configs/README.txt 2011-12-29 05:40:17 +0000
+++ configs/README.txt 2014-01-30 15:36:06 +0000
@@ -11,7 +11,7 @@
Each config directory contains a launchpad-lazr.conf file, and optionally
a number of .zcml files. These .zcml files are processed as ZCML
-overrides allowing you to change behavior not yet configurable in
+overrides allowing you to change behaviour not yet configurable in
launchpad-lazr.conf.
If you want to create a temporary config, prefix the directory name with
=== modified file 'doc/buildout.txt'
--- doc/buildout.txt 2012-01-06 17:38:20 +0000
+++ doc/buildout.txt 2014-01-30 15:36:06 +0000
@@ -69,7 +69,7 @@
Interacting and negotiating with upstream is undeniably more
time-consuming than our previous practice of maintaining local bzr
branches with our patches, especially short-term. But our previous
- use of bzr branches is not good open-source community behavior--an
+ use of bzr branches is not good open-source community behaviour--an
ironic characteristic for a project like Launchpad. It also can
cause problems down the road, for instance, if the patch becomes
stale and we want to migrate to new releases.
@@ -507,7 +507,7 @@
packages for upgrade and give it a try (that is, run steps 4, 5, and 6 of the
`Add a Package`_ instructions). Note that, when not given an explicit version
number, our buildout is set to prefer final releases over alpha and beta
-releases. If you want to temporarily override this behavior, include
+releases. If you want to temporarily override this behaviour, include
``buildout:prefer-final=false`` as another argument to ``bin/buildout``.
Add a Script
=== modified file 'lib/lp/answers/browser/tests/test_question.py'
--- lib/lp/answers/browser/tests/test_question.py 2013-01-03 00:27:37 +0000
+++ lib/lp/answers/browser/tests/test_question.py 2014-01-30 15:36:06 +0000
@@ -25,7 +25,7 @@
class TestQuestionAddView(TestCaseWithFactory):
- """Verify the behavior of the QuestionAddView."""
+ """Verify the behaviour of the QuestionAddView."""
layer = DatabaseFunctionalLayer
@@ -76,7 +76,7 @@
self.assertIn(msg, contents)
class QuestionEditViewTestCase(TestCaseWithFactory):
- """Verify the behavior of the QuestionEditView."""
+ """Verify the behaviour of the QuestionEditView."""
layer = DatabaseFunctionalLayer
=== modified file 'lib/lp/answers/browser/tests/test_questiontarget.py'
--- lib/lp/answers/browser/tests/test_questiontarget.py 2013-01-31 05:58:03 +0000
+++ lib/lp/answers/browser/tests/test_questiontarget.py 2014-01-30 15:36:06 +0000
@@ -120,7 +120,7 @@
class TestSearchQuestionsViewTemplate(TestCaseWithFactory):
- """Test the behavior of SearchQuestionsView.template"""
+ """Test the behaviour of SearchQuestionsView.template"""
layer = DatabaseFunctionalLayer
@@ -180,7 +180,7 @@
class TestSearchQuestionsViewUnknown(TestCaseWithFactory):
- """Test the behavior of SearchQuestionsView unknown support."""
+ """Test the behaviour of SearchQuestionsView unknown support."""
layer = DatabaseFunctionalLayer
=== modified file 'lib/lp/answers/stories/project-add-question.txt'
--- lib/lp/answers/stories/project-add-question.txt 2012-12-10 02:00:23 +0000
+++ lib/lp/answers/stories/project-add-question.txt 2014-01-30 15:36:06 +0000
@@ -148,7 +148,7 @@
Register a support contact who speaks a non-English language
............................................................
-To illustrate the supported language behavior, we add an answer contact
+To illustrate the supported language behaviour, we add an answer contact
to Thunderbird who has Japanese as a preferred language. Japanese will
be a supported language for Thunderbird Questions, which allows us to
test the supported languages behaviour for non-English languages. Dafydd
=== modified file 'lib/lp/answers/tests/test_question_notifications.py'
--- lib/lp/answers/tests/test_question_notifications.py 2012-01-01 02:58:52 +0000
+++ lib/lp/answers/tests/test_question_notifications.py 2014-01-30 15:36:06 +0000
@@ -196,7 +196,7 @@
class QuestionNotificationTestCase(TestCaseWithFactory):
- """Test common question notification behavior."""
+ """Test common question notification behaviour."""
layer = DatabaseFunctionalLayer
=== modified file 'lib/lp/answers/tests/test_questiontarget.py'
--- lib/lp/answers/tests/test_questiontarget.py 2012-01-01 02:58:52 +0000
+++ lib/lp/answers/tests/test_questiontarget.py 2014-01-30 15:36:06 +0000
@@ -134,7 +134,7 @@
class TestQuestionTargetCreateQuestionFromBug(TestCaseWithFactory):
- """Test the createQuestionFromBug from bug behavior."""
+ """Test the createQuestionFromBug from bug behaviour."""
layer = DatabaseFunctionalLayer
=== modified file 'lib/lp/app/__init__.py'
--- lib/lp/app/__init__.py 2013-04-11 04:54:04 +0000
+++ lib/lp/app/__init__.py 2014-01-30 15:36:06 +0000
@@ -11,9 +11,9 @@
__metaclass__ = type
__all__ = []
-# Zope recently changed the behavior of items widgets with regards to missing
+# Zope recently changed the behaviour of items widgets with regards to missing
# values, but they kindly left this global variable for you to monkey patch if
-# you want the old behavior, just like we do.
+# you want the old behaviour, just like we do.
from zope.formlib import itemswidgets
=== modified file 'lib/lp/app/doc/batch-navigation.txt'
--- lib/lp/app/doc/batch-navigation.txt 2011-12-29 05:29:36 +0000
+++ lib/lp/app/doc/batch-navigation.txt 2014-01-30 15:36:06 +0000
@@ -2,7 +2,7 @@
Batch Navigation
================
-Most of the test for this behavior is in the lazr.batchnavigation package.
+Most of the test for this behaviour is in the lazr.batchnavigation package.
This documents and tests the Launchpad-specific elements of its usage.
=== modified file 'lib/lp/app/doc/launchpadform.txt'
--- lib/lp/app/doc/launchpadform.txt 2013-04-10 08:35:47 +0000
+++ lib/lp/app/doc/launchpadform.txt 2014-01-30 15:36:06 +0000
@@ -308,7 +308,7 @@
Name: Required input is missing.
Password: Required input is missing.
-The default behavior is to validate all widgets.
+The default behaviour is to validate all widgets.
>>> print_widget_validation(None)
Name: Required input is missing.
=== modified file 'lib/lp/app/javascript/anim/anim.js'
--- lib/lp/app/javascript/anim/anim.js 2013-03-20 03:41:40 +0000
+++ lib/lp/app/javascript/anim/anim.js 2014-01-30 15:36:06 +0000
@@ -134,7 +134,7 @@
},
/**
- * Delegate all behavior back to the collection of animations.
+ * Delegate all behaviour back to the collection of animations.
*/
on: function() {
var args = arguments;
=== modified file 'lib/lp/app/javascript/formoverlay/formoverlay.js'
--- lib/lp/app/javascript/formoverlay/formoverlay.js 2013-03-20 03:41:40 +0000
+++ lib/lp/app/javascript/formoverlay/formoverlay.js 2014-01-30 15:36:06 +0000
@@ -421,7 +421,7 @@
// Prevent the event propagation only if we have a user-supplied
// submit callback function. Otherwise let the event go ahead
- // with its default behavior.
+ // with its default behaviour.
if (submit_callback) {
e.halt(true);
=== modified file 'lib/lp/app/javascript/testing/helpers.js'
--- lib/lp/app/javascript/testing/helpers.js 2013-03-20 03:41:40 +0000
+++ lib/lp/app/javascript/testing/helpers.js 2014-01-30 15:36:06 +0000
@@ -62,7 +62,7 @@
* The function called and the arguments it's called with are added to the
* LPCLient's `received` attribute.
*
- * Callback behavior are governed by the args set on the callee.
+ * Callback behaviour are governed by the args set on the callee.
* @method
*/
ns.LPClient.prototype._call = function(name, config, args) {
=== modified file 'lib/lp/archiveuploader/tests/test_uploadprocessor.py'
--- lib/lp/archiveuploader/tests/test_uploadprocessor.py 2013-11-12 06:03:14 +0000
+++ lib/lp/archiveuploader/tests/test_uploadprocessor.py 2014-01-30 15:36:06 +0000
@@ -48,8 +48,8 @@
BuildFarmJobType,
BuildStatus,
)
-from lp.buildmaster.interfaces.buildfarmjobbehavior import (
- IBuildFarmJobBehavior,
+from lp.buildmaster.interfaces.buildfarmjobbehaviour import (
+ IBuildFarmJobBehaviour,
)
from lp.registry.interfaces.distribution import IDistributionSet
from lp.registry.interfaces.person import IPersonSet
@@ -2095,8 +2095,8 @@
# Commit so the build cookie has the right ids.
self.layer.txn.commit()
- behavior = IBuildFarmJobBehavior(build)
- leaf_name = behavior.getUploadDirLeaf(behavior.getBuildCookie())
+ behaviour = IBuildFarmJobBehaviour(build)
+ leaf_name = behaviour.getUploadDirLeaf(behaviour.getBuildCookie())
os.mkdir(os.path.join(self.incoming_folder, leaf_name))
self.options.context = 'buildd'
self.options.builds = True
@@ -2138,8 +2138,8 @@
# Commit so the build cookie has the right ids.
self.layer.txn.commit()
- behavior = IBuildFarmJobBehavior(build)
- leaf_name = behavior.getUploadDirLeaf(behavior.getBuildCookie())
+ behaviour = IBuildFarmJobBehaviour(build)
+ leaf_name = behaviour.getUploadDirLeaf(behaviour.getBuildCookie())
upload_dir = self.queueUpload("bar_1.0-1_binary",
queue_entry=leaf_name)
self.options.context = 'buildd'
@@ -2166,8 +2166,8 @@
self.switchToUploader()
# Commit so the build cookie has the right ids.
self.layer.txn.commit()
- behavior = IBuildFarmJobBehavior(build)
- leaf_name = behavior.getUploadDirLeaf(behavior.getBuildCookie())
+ behaviour = IBuildFarmJobBehaviour(build)
+ leaf_name = behaviour.getUploadDirLeaf(behaviour.getBuildCookie())
relative_path = "~%s/%s/%s/%s" % (
archive.owner.name, archive.name, self.breezy.distribution.name,
self.breezy.name)
@@ -2212,8 +2212,8 @@
distroseries=self.breezy, archive=archive)
# Commit so the build cookie has the right ids.
Store.of(build).flush()
- behavior = IBuildFarmJobBehavior(build)
- leaf_name = behavior.getUploadDirLeaf(behavior.getBuildCookie())
+ behaviour = IBuildFarmJobBehaviour(build)
+ leaf_name = behaviour.getUploadDirLeaf(behaviour.getBuildCookie())
os.mkdir(os.path.join(self.incoming_folder, leaf_name))
self.options.context = 'buildd'
self.options.builds = True
@@ -2256,8 +2256,8 @@
self.switchToUploader()
# Commit so the build cookie has the right ids.
Store.of(build).flush()
- behavior = IBuildFarmJobBehavior(build)
- leaf_name = behavior.getUploadDirLeaf(behavior.getBuildCookie())
+ behaviour = IBuildFarmJobBehaviour(build)
+ leaf_name = behaviour.getUploadDirLeaf(behaviour.getBuildCookie())
os.mkdir(os.path.join(self.incoming_folder, leaf_name))
self.options.context = 'buildd'
self.options.builds = True
@@ -2304,8 +2304,8 @@
# Commit so the build cookie has the right ids.
self.layer.txn.commit()
- behavior = IBuildFarmJobBehavior(build)
- leaf_name = behavior.getUploadDirLeaf(behavior.getBuildCookie())
+ behaviour = IBuildFarmJobBehaviour(build)
+ leaf_name = behaviour.getUploadDirLeaf(behaviour.getBuildCookie())
upload_dir = self.queueUpload(
"bar_1.0-1_binary", queue_entry=leaf_name)
self.options.context = 'buildd'
=== modified file 'lib/lp/bugs/browser/tests/person-bug-views.txt'
--- lib/lp/bugs/browser/tests/person-bug-views.txt 2012-08-08 07:23:58 +0000
+++ lib/lp/bugs/browser/tests/person-bug-views.txt 2014-01-30 15:36:06 +0000
@@ -550,7 +550,7 @@
Reported bugs
.............
-Similar behavior is found when searching for reported bugs.
+Similar behaviour is found when searching for reported bugs.
>>> reported_bugs_view = create_view(
... user, '+reportedbugs', {'advanced': 1})
=== modified file 'lib/lp/bugs/browser/tests/test_buglisting.py'
--- lib/lp/bugs/browser/tests/test_buglisting.py 2012-12-04 09:58:24 +0000
+++ lib/lp/bugs/browser/tests/test_buglisting.py 2014-01-30 15:36:06 +0000
@@ -192,7 +192,7 @@
find_tag_by_id(content, 'bugs-batch-links-upper'))
def test_ajax_batch_navigation_feature_flag(self):
- # The Javascript to wire up the ajax batch navigation behavior is
+ # The Javascript to wire up the ajax batch navigation behaviour is
# correctly hidden behind a feature flag.
product = self.factory.makeProduct()
form = {'search': 'Search'}
=== modified file 'lib/lp/bugs/javascript/bug_subscription_portlet.js'
--- lib/lp/bugs/javascript/bug_subscription_portlet.js 2013-10-14 05:27:40 +0000
+++ lib/lp/bugs/javascript/bug_subscription_portlet.js 2014-01-30 15:36:06 +0000
@@ -33,7 +33,7 @@
}
/*
- * Hack to work around YUI whitespace trim behavior. :-(
+ * Hack to work around YUI whitespace trim behaviour. :-(
*/
function ws() {
return Y.Node.create('<span> </span>');
=== modified file 'lib/lp/bugs/javascript/filebug.js'
--- lib/lp/bugs/javascript/filebug.js 2012-11-12 18:21:12 +0000
+++ lib/lp/bugs/javascript/filebug.js 2014-01-30 15:36:06 +0000
@@ -60,7 +60,7 @@
* user know it's going to be private.
*
* This is used by the security checks. If the issue is unmade/not security
- * related then we need to check the normal default behavior to make sure we
+ * related then we need to check the normal default behaviour to make sure we
* show the correct banner.
*/
var set_default_privacy_banner = function() {
=== modified file 'lib/lp/bugs/model/bugtask.py'
--- lib/lp/bugs/model/bugtask.py 2013-11-29 11:51:37 +0000
+++ lib/lp/bugs/model/bugtask.py 2014-01-30 15:36:06 +0000
@@ -793,7 +793,7 @@
def _checkAutoconfirmFeatureFlag(self):
"""Does a feature flag enable automatic switching of our bugtasks?"""
# This method should be ripped out if we determine that we like
- # this behavior for all projects.
+ # this behaviour for all projects.
# This is a bit of a feature flag hack, but has been discussed as
# a reasonable way to deploy this quickly.
pillar = self.pillar
=== modified file 'lib/lp/bugs/tests/test_structuralsubscription.py'
--- lib/lp/bugs/tests/test_structuralsubscription.py 2013-05-20 03:03:14 +0000
+++ lib/lp/bugs/tests/test_structuralsubscription.py 2014-01-30 15:36:06 +0000
@@ -63,7 +63,7 @@
def test_delete_requires_Edit_permission(self):
# delete() is only available to the subscriber.
# We use a lambda here because a security proxy around
- # self.subscription is giving us the behavior we want to
+ # self.subscription is giving us the behaviour we want to
# demonstrate. Merely accessing the "delete" name raises
# Unauthorized, before the method is even called. Therefore,
# we use a lambda to make the trigger happen within "assertRaises".
=== modified file 'lib/lp/bugs/tests/testfiles/sourceforge-sample-bug-1722256.html'
--- lib/lp/bugs/tests/testfiles/sourceforge-sample-bug-1722256.html 2009-06-12 16:36:02 +0000
+++ lib/lp/bugs/tests/testfiles/sourceforge-sample-bug-1722256.html 2014-01-30 15:36:06 +0000
@@ -412,7 +412,7 @@
this problem by quoting all arguments before calling wxExecute, your code<br />
will no longer work on Linux since myprog will receive extraneous quotes.<br />
<br />
-I would argue that the Linux behavior is the correct one -- argv indicates<br />
+I would argue that the Linux behaviour is the correct one -- argv indicates<br />
which items should be considered to be separate arguments, so wxWidgets<br />
should handle any platform-dependent manipulations like escaping spaces or<br />
adding quotes (and escaping any quotes that those quotes enclose) that are<br />
=== renamed file 'lib/lp/buildmaster/doc/buildfarmjobbehavior.txt' => 'lib/lp/buildmaster/doc/buildfarmjobbehaviour.txt'
--- lib/lp/buildmaster/doc/buildfarmjobbehavior.txt 2013-08-29 04:12:56 +0000
+++ lib/lp/buildmaster/doc/buildfarmjobbehaviour.txt 2014-01-30 15:36:06 +0000
@@ -1,35 +1,35 @@
-BuildFarmJobBehavior
+BuildFarmJobBehaviour
====================
The Launchpad build farm was originally designed for building binary
packages from source packages, but was subsequently generalised to support
other types of build farm jobs.
-The `BuildFarmJobBehavior` class encapsulates job-type-specific behavior
+The `BuildFarmJobBehaviour` class encapsulates job-type-specific behaviour
with a standard interface to which our generic IBuilder class delegates.
The result is that neither our generic IBuilder class or any call-sites
(such as the build master) need any knowledge of different job types or
how to handle them.
-Creating a new behavior
+Creating a new behaviour
-----------------------
-A new behavior should implement the `IBuildFarmJobBehavior` interface
-and extend BuildFarmJobBehaviorBase. A new behavior will only be required
+A new behaviour should implement the `IBuildFarmJobBehaviour` interface
+and extend BuildFarmJobBehaviourBase. A new behaviour will only be required
to define one method - dispatchBuildToSlave() - to correctly implement
the interface, but will usually want to customise the other properties and
methods as well.
- >>> from lp.buildmaster.interfaces.buildfarmjobbehavior import (
- ... IBuildFarmJobBehavior)
- >>> from lp.buildmaster.model.buildfarmjobbehavior import (
- ... BuildFarmJobBehaviorBase)
+ >>> from lp.buildmaster.interfaces.buildfarmjobbehaviour import (
+ ... IBuildFarmJobBehaviour)
+ >>> from lp.buildmaster.model.buildfarmjobbehaviour import (
+ ... BuildFarmJobBehaviourBase)
>>> from zope.interface import implements
- >>> class MyNewBuildBehavior(BuildFarmJobBehaviorBase):
- ... """A custom build behavior for building blah."""
- ... implements(IBuildFarmJobBehavior)
+ >>> class MyNewBuildBehaviour(BuildFarmJobBehaviourBase):
+ ... """A custom build behaviour for building blah."""
+ ... implements(IBuildFarmJobBehaviour)
...
... def dispatchBuildToSlave(self, build_queue_item_id, logger):
... print "Did something special to dispatch MySpecialBuild."
@@ -42,40 +42,40 @@
>>> class MyNewBuildFarmJob(object):
... implements(IMyNewBuildFarmJob)
-Custom behaviors are not normally instantiated directly, instead an adapter is
+Custom behaviours are not normally instantiated directly, instead an adapter is
specified for the specific IBuildFarmJob. Normaly we'd add some ZCML to
-adapt our specific build farm job to its behavior like:
+adapt our specific build farm job to its behaviour like:
- <!-- MyNewBuildBehavior -->
+ <!-- MyNewBuildBehaviour -->
<adapter
for="lp.myapp.interfaces.mynewbuildfarmjob.IMyNewBuildFarmJob"
- provides="lp.buildmaster.interfaces.buildfarmjobbehavior.IBuildFarmJobBehavior"
- factory="lp.myapp.model.mynewbuildbehavior.MyNewBuildBehavior"
+ provides="lp.buildmaster.interfaces.buildfarmjobbehaviour.IBuildFarmJobBehaviour"
+ factory="lp.myapp.model.mynewbuildbehaviour.MyNewBuildBehaviour"
permission="zope.Public" />
But for the sake of this documentation we'll add the adapter manually.
>>> from zope.component import provideAdapter
>>> provideAdapter(
- ... MyNewBuildBehavior, (IMyNewBuildFarmJob,), IBuildFarmJobBehavior)
+ ... MyNewBuildBehaviour, (IMyNewBuildFarmJob,), IBuildFarmJobBehaviour)
-This will then allow the builder to request and set the required behavior from
+This will then allow the builder to request and set the required behaviour from
the current job. Bob the builder currently has a binary package job and so
-finds itself with a binary package build behavior which defines binary-build
+finds itself with a binary package build behaviour which defines binary-build
specific information.
>>> from lp.buildmaster.model.builder import Builder
>>> from lp.services.database.interfaces import IStore
>>> bob = IStore(Builder).find(Builder, Builder.name == 'bob').one()
-Once the builder has the relevant behavior, it is able to provide both general
+Once the builder has the relevant behaviour, it is able to provide both general
builder functionality of its own accord, while delegating any build-type
-specific functionality to the behavior.
+specific functionality to the behaviour.
-The IBuildFarmJobBehavior interface currently provides customisation points
+The IBuildFarmJobBehaviour interface currently provides customisation points
throughout the build life-cycle, from logging the start of a build, verifying
that the provided queue item is ready to be built, dispatching the build etc.,
and allows further customisation to be added easily.
-Please refer to the IBuildFarmJobBehavior interface to see the currently
+Please refer to the IBuildFarmJobBehaviour interface to see the currently
provided build-type specific customisation points.
=== modified file 'lib/lp/buildmaster/interactor.py'
--- lib/lp/buildmaster/interactor.py 2014-01-09 01:04:06 +0000
+++ lib/lp/buildmaster/interactor.py 2014-01-30 15:36:06 +0000
@@ -26,8 +26,8 @@
CannotFetchFile,
CannotResumeHost,
)
-from lp.buildmaster.interfaces.buildfarmjobbehavior import (
- IBuildFarmJobBehavior,
+from lp.buildmaster.interfaces.buildfarmjobbehaviour import (
+ IBuildFarmJobBehaviour,
)
from lp.services import encoding
from lp.services.config import config
@@ -242,12 +242,12 @@
vitals.url, vitals.vm_host, timeout)
@staticmethod
- def getBuildBehavior(queue_item, builder, slave):
+ def getBuildBehaviour(queue_item, builder, slave):
if queue_item is None:
return None
- behavior = IBuildFarmJobBehavior(queue_item.specific_build)
- behavior.setBuilder(builder, slave)
- return behavior
+ behaviour = IBuildFarmJobBehaviour(queue_item.specific_build)
+ behaviour.setBuilder(builder, slave)
+ return behaviour
@classmethod
@defer.inlineCallbacks
@@ -324,7 +324,7 @@
@classmethod
@defer.inlineCallbacks
- def _startBuild(cls, build_queue_item, vitals, builder, slave, behavior,
+ def _startBuild(cls, build_queue_item, vitals, builder, slave, behaviour,
logger):
"""Start a build on this builder.
@@ -335,10 +335,10 @@
value is None, or a Failure that contains an exception
explaining what went wrong.
"""
- behavior.logStartBuild(logger)
- behavior.verifyBuildRequest(logger)
+ behaviour.logStartBuild(logger)
+ behaviour.verifyBuildRequest(logger)
- # Set the build behavior depending on the provided build queue item.
+ # Set the build behaviour depending on the provided build queue item.
if not builder.builderok:
raise BuildDaemonError(
"Attempted to start a build on a known-bad builder.")
@@ -355,7 +355,7 @@
yield cls.resumeSlaveHost(vitals, slave)
yield slave.echo("ping")
- yield behavior.dispatchBuildToSlave(build_queue_item.id, logger)
+ yield behaviour.dispatchBuildToSlave(build_queue_item.id, logger)
@classmethod
def resetOrFail(cls, vitals, slave, builder, logger, exception):
@@ -414,15 +414,15 @@
logger.debug("No build candidates available for builder.")
defer.returnValue(None)
- new_behavior = cls.getBuildBehavior(candidate, builder, slave)
+ new_behaviour = cls.getBuildBehaviour(candidate, builder, slave)
needed_bfjb = type(removeSecurityProxy(
- IBuildFarmJobBehavior(candidate.specific_build)))
- if not zope_isinstance(new_behavior, needed_bfjb):
+ IBuildFarmJobBehaviour(candidate.specific_build)))
+ if not zope_isinstance(new_behaviour, needed_bfjb):
raise AssertionError(
- "Inappropriate IBuildFarmJobBehavior: %r is not a %r" %
- (new_behavior, needed_bfjb))
+ "Inappropriate IBuildFarmJobBehaviour: %r is not a %r" %
+ (new_behaviour, needed_bfjb))
yield cls._startBuild(
- candidate, vitals, builder, slave, new_behavior, logger)
+ candidate, vitals, builder, slave, new_behaviour, logger)
defer.returnValue(candidate)
@staticmethod
@@ -441,7 +441,7 @@
@classmethod
@defer.inlineCallbacks
def updateBuild(cls, vitals, slave, slave_status, builder_factory,
- behavior_factory):
+ behaviour_factory):
"""Verify the current build job status.
Perform the required actions for each state.
@@ -466,8 +466,8 @@
elif builder_status == 'BuilderStatus.WAITING':
# Build has finished. Delegate handling to the build itself.
builder = builder_factory[vitals.name]
- behavior = behavior_factory(vitals.build_queue, builder, slave)
- yield behavior.handleStatus(
+ behaviour = behaviour_factory(vitals.build_queue, builder, slave)
+ yield behaviour.handleStatus(
vitals.build_queue, cls.extractBuildStatus(slave_status),
slave_status)
else:
=== renamed file 'lib/lp/buildmaster/interfaces/buildfarmjobbehavior.py' => 'lib/lp/buildmaster/interfaces/buildfarmjobbehaviour.py'
--- lib/lp/buildmaster/interfaces/buildfarmjobbehavior.py 2013-10-09 00:02:50 +0000
+++ lib/lp/buildmaster/interfaces/buildfarmjobbehaviour.py 2014-01-30 15:36:06 +0000
@@ -1,18 +1,18 @@
# Copyright 2009-2013 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-"""Interface for build farm job behaviors."""
+"""Interface for build farm job behaviours."""
__metaclass__ = type
__all__ = [
- 'IBuildFarmJobBehavior',
+ 'IBuildFarmJobBehaviour',
]
from zope.interface import Interface
-class IBuildFarmJobBehavior(Interface):
+class IBuildFarmJobBehaviour(Interface):
def setBuilder(builder, slave):
"""Sets the associated builder and slave for this instance."""
=== modified file 'lib/lp/buildmaster/manager.py'
--- lib/lp/buildmaster/manager.py 2013-12-05 07:42:08 +0000
+++ lib/lp/buildmaster/manager.py 2014-01-30 15:36:06 +0000
@@ -222,13 +222,13 @@
def __init__(self, builder_name, builder_factory, logger, clock=None,
interactor_factory=BuilderInteractor,
slave_factory=BuilderInteractor.makeSlaveFromVitals,
- behavior_factory=BuilderInteractor.getBuildBehavior):
+ behaviour_factory=BuilderInteractor.getBuildBehaviour):
self.builder_name = builder_name
self.builder_factory = builder_factory
self.logger = logger
self.interactor_factory = interactor_factory
self.slave_factory = slave_factory
- self.behavior_factory = behavior_factory
+ self.behaviour_factory = behaviour_factory
# Use the clock if provided, so that tests can advance it. Use the
# reactor by default.
if clock is None:
@@ -387,10 +387,10 @@
"""
if vitals.build_queue != self._cached_build_queue:
if vitals.build_queue is not None:
- behavior = self.behavior_factory(
+ behaviour = self.behaviour_factory(
vitals.build_queue, self.builder_factory[vitals.name],
None)
- self._cached_build_cookie = behavior.getBuildCookie()
+ self._cached_build_cookie = behaviour.getBuildCookie()
else:
self._cached_build_cookie = None
self._cached_build_queue = vitals.build_queue
@@ -458,7 +458,7 @@
assert slave_status is not None
yield interactor.updateBuild(
vitals, slave, slave_status, self.builder_factory,
- self.behavior_factory)
+ self.behaviour_factory)
elif vitals.manual:
# If the builder is in manual mode, don't dispatch anything.
self.logger.debug(
=== renamed file 'lib/lp/buildmaster/model/buildfarmjobbehavior.py' => 'lib/lp/buildmaster/model/buildfarmjobbehaviour.py'
--- lib/lp/buildmaster/model/buildfarmjobbehavior.py 2013-12-04 07:07:04 +0000
+++ lib/lp/buildmaster/model/buildfarmjobbehaviour.py 2014-01-30 15:36:06 +0000
@@ -1,12 +1,12 @@
# Copyright 2009-2013 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-"""Base and idle BuildFarmJobBehavior classes."""
+"""Base and idle BuildFarmJobBehaviour classes."""
__metaclass__ = type
__all__ = [
- 'BuildFarmJobBehaviorBase',
+ 'BuildFarmJobBehaviourBase',
]
import datetime
@@ -33,10 +33,10 @@
SLAVE_LOG_FILENAME = 'buildlog'
-class BuildFarmJobBehaviorBase:
- """Ensures that all behaviors inherit the same initialization.
+class BuildFarmJobBehaviourBase:
+ """Ensures that all behaviours inherit the same initialization.
- All build-farm job behaviors should inherit from this.
+ All build-farm job behaviours should inherit from this.
"""
def __init__(self, build):
@@ -50,7 +50,7 @@
self._slave = slave
def verifyBuildRequest(self, logger):
- """The default behavior is a no-op."""
+ """The default behaviour is a no-op."""
pass
def getBuildCookie(self):
@@ -137,7 +137,7 @@
ALLOWED_STATUS_NOTIFICATIONS = ['OK', 'PACKAGEFAIL', 'CHROOTFAIL']
def handleStatus(self, bq, status, slave_status):
- """See `IBuildFarmJobBehavior`."""
+ """See `IBuildFarmJobBehaviour`."""
if bq != self.build.buildqueue_record:
raise AssertionError(
"%r != %r" % (bq, self.build.buildqueue_record))
=== modified file 'lib/lp/buildmaster/tests/mock_slaves.py'
--- lib/lp/buildmaster/tests/mock_slaves.py 2013-10-26 11:02:51 +0000
+++ lib/lp/buildmaster/tests/mock_slaves.py 2014-01-30 15:36:06 +0000
@@ -15,7 +15,7 @@
'MockBuilder',
'OkSlave',
'SlaveTestHelpers',
- 'TrivialBehavior',
+ 'TrivialBehaviour',
'WaitingSlave',
]
@@ -244,7 +244,7 @@
return defer.fail(xmlrpclib.Fault(8001, "Broken slave"))
-class TrivialBehavior:
+class TrivialBehaviour:
def getBuildCookie(self):
return 'trivial'
=== renamed file 'lib/lp/buildmaster/tests/test_buildfarmjobbehavior.py' => 'lib/lp/buildmaster/tests/test_buildfarmjobbehaviour.py'
--- lib/lp/buildmaster/tests/test_buildfarmjobbehavior.py 2013-11-15 07:56:00 +0000
+++ lib/lp/buildmaster/tests/test_buildfarmjobbehaviour.py 2014-01-30 15:36:06 +0000
@@ -1,7 +1,7 @@
# Copyright 2010-2013 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-"""Unit tests for BuildFarmJobBehaviorBase."""
+"""Unit tests for BuildFarmJobBehaviourBase."""
__metaclass__ = type
@@ -17,10 +17,12 @@
from lp.archiveuploader.uploadprocessor import parse_build_upload_leaf_name
from lp.buildmaster.enums import BuildStatus
from lp.buildmaster.interactor import BuilderInteractor
-from lp.buildmaster.interfaces.buildfarmjobbehavior import (
- IBuildFarmJobBehavior,
- )
-from lp.buildmaster.model.buildfarmjobbehavior import BuildFarmJobBehaviorBase
+from lp.buildmaster.interfaces.buildfarmjobbehaviour import (
+ IBuildFarmJobBehaviour,
+ )
+from lp.buildmaster.model.buildfarmjobbehaviour import (
+ BuildFarmJobBehaviourBase,
+ )
from lp.buildmaster.tests.mock_slaves import WaitingSlave
from lp.registry.interfaces.pocket import PackagePublishingPocket
from lp.services.config import config
@@ -40,18 +42,18 @@
pass
-class TestBuildFarmJobBehaviorBase(TestCaseWithFactory):
- """Test very small, basic bits of BuildFarmJobBehaviorBase."""
+class TestBuildFarmJobBehaviourBase(TestCaseWithFactory):
+ """Test very small, basic bits of BuildFarmJobBehaviourBase."""
layer = ZopelessDatabaseLayer
- def _makeBehavior(self, buildfarmjob=None):
- """Create a `BuildFarmJobBehaviorBase`."""
+ def _makeBehaviour(self, buildfarmjob=None):
+ """Create a `BuildFarmJobBehaviourBase`."""
if buildfarmjob is None:
buildfarmjob = FakeBuildFarmJob()
else:
buildfarmjob = removeSecurityProxy(buildfarmjob)
- return BuildFarmJobBehaviorBase(buildfarmjob)
+ return BuildFarmJobBehaviourBase(buildfarmjob)
def _makeBuild(self):
"""Create a `Build` object."""
@@ -70,17 +72,17 @@
def test_getBuildCookie(self):
build = self.factory.makeTranslationTemplatesBuild()
- behavior = self._makeBehavior(build)
+ behaviour = self._makeBehaviour(build)
self.assertEqual(
'%s-%s' % (build.job_type.name, build.id),
- behavior.getBuildCookie())
+ behaviour.getBuildCookie())
def test_getUploadDirLeaf(self):
# getUploadDirLeaf returns the current time, followed by the build
# cookie.
now = datetime.now()
build_cookie = self.factory.getUniqueString()
- upload_leaf = self._makeBehavior().getUploadDirLeaf(
+ upload_leaf = self._makeBehaviour().getUploadDirLeaf(
build_cookie, now=now)
self.assertEqual(
'%s-%s' % (now.strftime("%Y%m%d-%H%M%S"), build_cookie),
@@ -99,14 +101,14 @@
def setUp(self):
super(TestGetUploadMethodsMixin, self).setUp()
self.build = self.makeBuild()
- self.behavior = IBuildFarmJobBehavior(
+ self.behaviour = IBuildFarmJobBehaviour(
self.build.buildqueue_record.specific_build)
def test_getUploadDirLeafCookie_parseable(self):
# getUploadDirLeaf should return a directory name
# that is parseable by the upload processor.
- upload_leaf = self.behavior.getUploadDirLeaf(
- self.behavior.getBuildCookie())
+ upload_leaf = self.behaviour.getUploadDirLeaf(
+ self.behaviour.getBuildCookie())
(job_type, job_id) = parse_build_upload_leaf_name(upload_leaf)
self.assertEqual(
(self.build.job_type.name, self.build.id), (job_type, job_id))
@@ -135,7 +137,7 @@
self.slave = WaitingSlave('BuildStatus.OK')
self.slave.valid_file_hashes.append('test_file_hash')
self.interactor = BuilderInteractor()
- self.behavior = self.interactor.getBuildBehavior(
+ self.behaviour = self.interactor.getBuildBehaviour(
self.build.buildqueue_record, self.builder, self.slave)
# We overwrite the buildmaster root to use a temp directory.
@@ -166,7 +168,7 @@
self.assertEqual(BuildStatus.UPLOADING, self.build.status)
self.assertResultCount(1, "incoming")
- d = self.behavior.handleStatus(
+ d = self.behaviour.handleStatus(
self.build.buildqueue_record, 'OK',
{'filemap': {'myfile.py': 'test_file_hash'}})
return d.addCallback(got_status)
@@ -179,7 +181,7 @@
self.assertResultCount(0, "failed")
self.assertIdentical(None, self.build.buildqueue_record)
- d = self.behavior.handleStatus(
+ d = self.behaviour.handleStatus(
self.build.buildqueue_record, 'OK',
{'filemap': {'/tmp/myfile.py': 'test_file_hash'}})
return d.addCallback(got_status)
@@ -191,7 +193,7 @@
self.assertEqual(BuildStatus.FAILEDTOUPLOAD, self.build.status)
self.assertResultCount(0, "failed")
- d = self.behavior.handleStatus(
+ d = self.behaviour.handleStatus(
self.build.buildqueue_record, 'OK',
{'filemap': {'../myfile.py': 'test_file_hash'}})
return d.addCallback(got_status)
@@ -199,7 +201,7 @@
def test_handleStatus_OK_sets_build_log(self):
# The build log is set during handleStatus.
self.assertEqual(None, self.build.log)
- d = self.behavior.handleStatus(
+ d = self.behaviour.handleStatus(
self.build.buildqueue_record, 'OK',
{'filemap': {'myfile.py': 'test_file_hash'}})
@@ -213,7 +215,7 @@
# notifications are allowed for that status.
expected_notification = (
- status in self.behavior.ALLOWED_STATUS_NOTIFICATIONS)
+ status in self.behaviour.ALLOWED_STATUS_NOTIFICATIONS)
def got_status(ignored):
if expected_notification:
@@ -225,7 +227,7 @@
len(pop_notifications()) > 0,
"Notifications received")
- d = self.behavior.handleStatus(
+ d = self.behaviour.handleStatus(
self.build.buildqueue_record, status, {})
return d.addCallback(got_status)
@@ -246,13 +248,13 @@
0, len(pop_notifications()), "Notifications received")
self.assertEqual(BuildStatus.CANCELLED, self.build.status)
- d = self.behavior.handleStatus(
+ d = self.behaviour.handleStatus(
self.build.buildqueue_record, "ABORTED", {})
return d.addCallback(got_status)
def test_handleStatus_ABORTED_recovers_building(self):
self.builder.vm_host = "fake_vm_host"
- self.behavior = self.interactor.getBuildBehavior(
+ self.behaviour = self.interactor.getBuildBehaviour(
self.build.buildqueue_record, self.builder, self.slave)
self.build.updateStatus(BuildStatus.BUILDING)
@@ -264,7 +266,7 @@
self.assertEqual(1, self.build.failure_count)
self.assertIn("clean", self.slave.call_log)
- d = self.behavior.handleStatus(
+ d = self.behaviour.handleStatus(
self.build.buildqueue_record, "ABORTED", {})
return d.addCallback(got_status)
@@ -273,14 +275,14 @@
# If a build is intentionally cancelled, the build log is set.
self.assertEqual(None, self.build.log)
self.build.updateStatus(BuildStatus.CANCELLING)
- yield self.behavior.handleStatus(
+ yield self.behaviour.handleStatus(
self.build.buildqueue_record, "ABORTED", {})
self.assertNotEqual(None, self.build.log)
def test_date_finished_set(self):
# The date finished is updated during handleStatus_OK.
self.assertEqual(None, self.build.date_finished)
- d = self.behavior.handleStatus(
+ d = self.behaviour.handleStatus(
self.build.buildqueue_record, 'OK',
{'filemap': {'myfile.py': 'test_file_hash'}})
=== modified file 'lib/lp/buildmaster/tests/test_interactor.py'
--- lib/lp/buildmaster/tests/test_interactor.py 2014-01-09 01:10:26 +0000
+++ lib/lp/buildmaster/tests/test_interactor.py 2014-01-30 15:36:06 +0000
@@ -44,8 +44,8 @@
)
from lp.services.config import config
from lp.services.log.logger import DevNullLogger
-from lp.soyuz.model.binarypackagebuildbehavior import (
- BinaryPackageBuildBehavior,
+from lp.soyuz.model.binarypackagebuildbehaviour import (
+ BinaryPackageBuildBehaviour,
)
from lp.testing import (
clean_up_reactor,
@@ -297,14 +297,14 @@
layer = ZopelessDatabaseLayer
run_tests_with = AsynchronousDeferredRunTest.make_factory(timeout=10)
- def test_getBuildBehavior_idle(self):
- """An idle builder has no build behavior."""
+ def test_getBuildBehaviour_idle(self):
+ """An idle builder has no build behaviour."""
self.assertIs(
None,
- BuilderInteractor.getBuildBehavior(None, MockBuilder(), None))
+ BuilderInteractor.getBuildBehaviour(None, MockBuilder(), None))
- def test_getBuildBehavior_building(self):
- """The current behavior is set automatically from the current job."""
+ def test_getBuildBehaviour_building(self):
+ """The current behaviour is set automatically from the current job."""
# Set the builder attribute on the buildqueue record so that our
# builder will think it has a current build.
builder = self.factory.makeBuilder(name='builder')
@@ -312,10 +312,10 @@
build = self.factory.makeBinaryPackageBuild()
bq = build.queueBuild()
bq.markAsBuilding(builder)
- behavior = BuilderInteractor.getBuildBehavior(bq, builder, slave)
- self.assertIsInstance(behavior, BinaryPackageBuildBehavior)
- self.assertEqual(behavior._builder, builder)
- self.assertEqual(behavior._slave, slave)
+ behaviour = BuilderInteractor.getBuildBehaviour(bq, builder, slave)
+ self.assertIsInstance(behaviour, BinaryPackageBuildBehaviour)
+ self.assertEqual(behaviour._builder, builder)
+ self.assertEqual(behaviour._slave, slave)
def _setupBuilder(self):
processor = self.factory.makeProcessor(name="i386")
=== modified file 'lib/lp/buildmaster/tests/test_manager.py'
--- lib/lp/buildmaster/tests/test_manager.py 2013-12-05 07:50:47 +0000
+++ lib/lp/buildmaster/tests/test_manager.py 2014-01-30 15:36:06 +0000
@@ -34,8 +34,8 @@
extract_vitals_from_db,
)
from lp.buildmaster.interfaces.builder import IBuilderSet
-from lp.buildmaster.interfaces.buildfarmjobbehavior import (
- IBuildFarmJobBehavior,
+from lp.buildmaster.interfaces.buildfarmjobbehaviour import (
+ IBuildFarmJobBehaviour,
)
from lp.buildmaster.interfaces.buildqueue import IBuildQueueSet
from lp.buildmaster.manager import (
@@ -55,7 +55,7 @@
make_publisher,
MockBuilder,
OkSlave,
- TrivialBehavior,
+ TrivialBehaviour,
)
from lp.registry.interfaces.distribution import IDistributionSet
from lp.services.config import config
@@ -497,8 +497,8 @@
transaction.commit()
login(ANONYMOUS)
buildqueue = builder.currentjob
- behavior = IBuildFarmJobBehavior(buildqueue.specific_build)
- slave.build_id = behavior.getBuildCookie()
+ behaviour = IBuildFarmJobBehaviour(buildqueue.specific_build)
+ slave.build_id = behaviour.getBuildCookie()
self.assertBuildingJob(buildqueue, builder)
# Now set the build to CANCELLING.
@@ -672,7 +672,7 @@
'mock', MockBuilderFactory(MockBuilder(), bq), BufferLogger(),
interactor_factory=FakeMethod(interactor),
slave_factory=FakeMethod(slave),
- behavior_factory=FakeMethod(TrivialBehavior()))
+ behaviour_factory=FakeMethod(TrivialBehaviour()))
yield scanner.scan()
self.assertEqual(['status_dict'], slave.call_log)
@@ -694,7 +694,7 @@
'mock', MockBuilderFactory(MockBuilder(), bq), BufferLogger(),
interactor_factory=FakeMethod(interactor),
slave_factory=FakeMethod(slave),
- behavior_factory=FakeMethod(TrivialBehavior()))
+ behaviour_factory=FakeMethod(TrivialBehaviour()))
# A single scan will call status_dict(), notice that the slave is
# lost, abort() the slave, then reset() the job without calling
@@ -718,7 +718,7 @@
'mock', MockBuilderFactory(MockBuilder(), None), BufferLogger(),
interactor_factory=FakeMethod(interactor),
slave_factory=FakeMethod(slave),
- behavior_factory=FakeMethod(None))
+ behaviour_factory=FakeMethod(None))
# A single scan will call status_dict(), notice that the slave is
# lost, abort() the slave, then reset() the job without calling
@@ -732,16 +732,16 @@
scanner = SlaveScanner(
'mock', bf, BufferLogger(), interactor_factory=FakeMethod(None),
slave_factory=FakeMethod(None),
- behavior_factory=FakeMethod(TrivialBehavior()))
+ behaviour_factory=FakeMethod(TrivialBehaviour()))
def assertCounts(expected):
self.assertEqual(
expected,
(scanner.interactor_factory.call_count,
- scanner.behavior_factory.call_count,
+ scanner.behaviour_factory.call_count,
scanner.builder_factory.get_call_count))
- # The first call will get a Builder and a BuildFarmJobBehavior.
+ # The first call will get a Builder and a BuildFarmJobBehaviour.
assertCounts((0, 0, 0))
cookie1 = scanner.getExpectedCookie(bf.getVitals('foo'))
self.assertEqual('trivial', cookie1)
=== modified file 'lib/lp/code/browser/tests/test_branchlisting.py'
--- lib/lp/code/browser/tests/test_branchlisting.py 2012-11-29 16:28:53 +0000
+++ lib/lp/code/browser/tests/test_branchlisting.py 2014-01-30 15:36:06 +0000
@@ -145,7 +145,7 @@
find_tag_by_id(content, 'branches-table-listing'))
def _test_ajax_batch_navigation_feature_flag(self, context, user=None):
- # The Javascript to wire up the ajax batch navigation behavior is
+ # The Javascript to wire up the ajax batch navigation behaviour is
# correctly hidden behind a feature flag.
flags = {u"ajax.batch_navigator.enabled": u"true"}
with FeatureFixture(flags):
@@ -250,7 +250,7 @@
self._test_search_batch_request(self.barney, self.barney)
def test_ajax_batch_navigation_feature_flag(self):
- # The Javascript to wire up the ajax batch navigation behavior is
+ # The Javascript to wire up the ajax batch navigation behaviour is
# correctly hidden behind a feature flag.
self._test_ajax_batch_navigation_feature_flag(
self.barney, self.barney)
@@ -780,7 +780,7 @@
self._test_search_batch_request(product)
def test_ajax_batch_navigation_feature_flag(self):
- # The Javascript to wire up the ajax batch navigation behavior is
+ # The Javascript to wire up the ajax batch navigation behaviour is
# correctly hidden behind a feature flag.
product = self.factory.makeProduct(project=self.project)
for i in range(10):
=== modified file 'lib/lp/code/browser/widgets/tests/test_branchpopupwidget.py'
--- lib/lp/code/browser/widgets/tests/test_branchpopupwidget.py 2013-04-11 05:53:01 +0000
+++ lib/lp/code/browser/widgets/tests/test_branchpopupwidget.py 2014-01-30 15:36:06 +0000
@@ -226,4 +226,4 @@
# XXX: JonathanLange 2008-04-17 bug=219019: Not sure how to test what
# happens when this widget has a good value but other fields have bad
- # values. The correct behavior is to *not* create the branch.
+ # values. The correct behaviour is to *not* create the branch.
=== modified file 'lib/lp/code/configure.zcml'
--- lib/lp/code/configure.zcml 2013-12-16 01:57:55 +0000
+++ lib/lp/code/configure.zcml 2014-01-30 15:36:06 +0000
@@ -862,7 +862,7 @@
<allow interface="lp.buildmaster.interfaces.buildfarmjob.ISpecificBuildFarmJobSource"/>
</securedutility>
- <adapter factory="lp.code.model.recipebuilder.RecipeBuildBehavior"
+ <adapter factory="lp.code.model.recipebuilder.RecipeBuildBehaviour"
permission="zope.Public" />
<!-- SourcePackageRecipeData -->
=== modified file 'lib/lp/code/model/recipebuilder.py'
--- lib/lp/code/model/recipebuilder.py 2013-11-12 06:03:14 +0000
+++ lib/lp/code/model/recipebuilder.py 2014-01-30 15:36:06 +0000
@@ -5,7 +5,7 @@
__metaclass__ = type
__all__ = [
- 'RecipeBuildBehavior',
+ 'RecipeBuildBehaviour',
]
import traceback
@@ -15,10 +15,12 @@
from zope.security.proxy import removeSecurityProxy
from lp.buildmaster.interfaces.builder import CannotBuild
-from lp.buildmaster.interfaces.buildfarmjobbehavior import (
- IBuildFarmJobBehavior,
- )
-from lp.buildmaster.model.buildfarmjobbehavior import BuildFarmJobBehaviorBase
+from lp.buildmaster.interfaces.buildfarmjobbehaviour import (
+ IBuildFarmJobBehaviour,
+ )
+from lp.buildmaster.model.buildfarmjobbehaviour import (
+ BuildFarmJobBehaviourBase,
+ )
from lp.code.interfaces.sourcepackagerecipebuild import (
ISourcePackageRecipeBuild,
)
@@ -30,11 +32,11 @@
)
-class RecipeBuildBehavior(BuildFarmJobBehaviorBase):
+class RecipeBuildBehaviour(BuildFarmJobBehaviourBase):
"""How to build a recipe on the build farm."""
adapts(ISourcePackageRecipeBuild)
- implements(IBuildFarmJobBehavior)
+ implements(IBuildFarmJobBehaviour)
# The list of build status values for which email notifications are
# allowed to be sent. It is up to each callback as to whether it will
@@ -53,7 +55,7 @@
return ret
def logStartBuild(self, logger):
- """See `IBuildFarmJobBehavior`."""
+ """See `IBuildFarmJobBehaviour`."""
logger.info("startBuild(%s)", self.display_name)
def _extraBuildArgs(self, distroarchseries, logger=None):
@@ -113,7 +115,7 @@
return args
def dispatchBuildToSlave(self, build_queue_id, logger):
- """See `IBuildFarmJobBehavior`."""
+ """See `IBuildFarmJobBehaviour`."""
distroseries = self.build.distroseries
# Start the binary package build on the slave builder. First
=== modified file 'lib/lp/code/model/tests/test_branchcollection.py'
--- lib/lp/code/model/tests/test_branchcollection.py 2013-06-20 05:50:00 +0000
+++ lib/lp/code/model/tests/test_branchcollection.py 2014-01-30 15:36:06 +0000
@@ -897,7 +897,7 @@
def test_empty_branches_shortcut(self):
# If you explicitly pass an empty collection of branches,
# the method shortcuts and gives you an empty result set. In this
- # way, for_branches=None (the default) has a very different behavior
+ # way, for_branches=None (the default) has a very different behaviour
# than for_branches=[]: the first is no restriction, while the second
# excludes everything.
self.factory.makeBranchMergeProposal()
@@ -908,7 +908,7 @@
def test_empty_revisions_shortcut(self):
# If you explicitly pass an empty collection of revision numbers,
# the method shortcuts and gives you an empty result set. In this
- # way, merged_revnos=None (the default) has a very different behavior
+ # way, merged_revnos=None (the default) has a very different behaviour
# than merged_revnos=[]: the first is no restriction, while the second
# excludes everything.
self.factory.makeBranchMergeProposal()
=== modified file 'lib/lp/code/model/tests/test_branchmergeproposal.py'
--- lib/lp/code/model/tests/test_branchmergeproposal.py 2014-01-20 22:09:20 +0000
+++ lib/lp/code/model/tests/test_branchmergeproposal.py 2014-01-30 15:36:06 +0000
@@ -645,7 +645,7 @@
def setUp(self):
TestCase.setUp(self)
- # Testing behavior, not permissions here.
+ # Testing behaviour, not permissions here.
login('foo.bar@xxxxxxxxxxxxx')
self.factory = LaunchpadObjectFactory()
self.merge_proposal = self.factory.makeBranchMergeProposal()
@@ -670,7 +670,7 @@
def setUp(self):
TestCase.setUp(self)
- # Testing behavior, not permissions here.
+ # Testing behaviour, not permissions here.
login('foo.bar@xxxxxxxxxxxxx')
self.factory = LaunchpadObjectFactory()
self.merge_proposal = self.factory.makeBranchMergeProposal()
@@ -696,7 +696,7 @@
def setUp(self):
TestCaseWithFactory.setUp(self)
- # Testing behavior, not permissions here.
+ # Testing behaviour, not permissions here.
login('foo.bar@xxxxxxxxxxxxx')
self.merge_proposal = self.factory.makeBranchMergeProposal()
self.merge_proposal2 = self.factory.makeBranchMergeProposal()
=== modified file 'lib/lp/code/model/tests/test_recipebuilder.py'
--- lib/lp/code/model/tests/test_recipebuilder.py 2013-11-15 07:56:00 +0000
+++ lib/lp/code/model/tests/test_recipebuilder.py 2014-01-30 15:36:06 +0000
@@ -1,7 +1,7 @@
# Copyright 2010-2013 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-"""Test RecipeBuildBehavior."""
+"""Test RecipeBuildBehaviour."""
__metaclass__ = type
@@ -24,19 +24,19 @@
from lp.buildmaster.enums import BuildStatus
from lp.buildmaster.interactor import BuilderInteractor
from lp.buildmaster.interfaces.builder import CannotBuild
-from lp.buildmaster.interfaces.buildfarmjobbehavior import (
- IBuildFarmJobBehavior,
+from lp.buildmaster.interfaces.buildfarmjobbehaviour import (
+ IBuildFarmJobBehaviour,
)
from lp.buildmaster.tests.mock_slaves import (
MockBuilder,
OkSlave,
WaitingSlave,
)
-from lp.buildmaster.tests.test_buildfarmjobbehavior import (
+from lp.buildmaster.tests.test_buildfarmjobbehaviour import (
TestGetUploadMethodsMixin,
TestHandleStatusMixin,
)
-from lp.code.model.recipebuilder import RecipeBuildBehavior
+from lp.code.model.recipebuilder import RecipeBuildBehaviour
from lp.code.model.sourcepackagerecipebuild import SourcePackageRecipeBuild
from lp.registry.interfaces.pocket import PackagePublishingPocket
from lp.services.config import config
@@ -85,19 +85,19 @@
spb = self.factory.makeSourcePackageRecipeBuild(
sourcepackage=sourcepackage, archive=archive,
recipe=recipe, requester=recipe_owner, distroseries=distroseries)
- job = IBuildFarmJobBehavior(spb)
+ job = IBuildFarmJobBehaviour(spb)
return job
def test_providesInterface(self):
- # RecipeBuildBehavior provides IBuildFarmJobBehavior.
- recipe_builder = RecipeBuildBehavior(None)
- self.assertProvides(recipe_builder, IBuildFarmJobBehavior)
+ # RecipeBuildBehaviour provides IBuildFarmJobBehaviour.
+ recipe_builder = RecipeBuildBehaviour(None)
+ self.assertProvides(recipe_builder, IBuildFarmJobBehaviour)
def test_adapts_ISourcePackageRecipeBuild(self):
- # IBuildFarmJobBehavior adapts a ISourcePackageRecipeBuild
+ # IBuildFarmJobBehaviour adapts a ISourcePackageRecipeBuild
build = self.factory.makeSourcePackageRecipeBuild()
- job = IBuildFarmJobBehavior(build)
- self.assertProvides(job, IBuildFarmJobBehavior)
+ job = IBuildFarmJobBehaviour(build)
+ self.assertProvides(job, IBuildFarmJobBehaviour)
def test_display_name(self):
# display_name contains a sane description of the job
@@ -138,7 +138,7 @@
# verifyBuildRequest will raise if a bad pocket is proposed.
build = self.factory.makeSourcePackageRecipeBuild(
pocket=PackagePublishingPocket.SECURITY)
- job = IBuildFarmJobBehavior(build)
+ job = IBuildFarmJobBehaviour(build)
job.setBuilder(MockBuilder("bob-de-bouwer"), OkSlave())
e = self.assertRaises(
AssertionError, job.verifyBuildRequest, BufferLogger())
@@ -148,7 +148,7 @@
# A build cookie is made up of the job type and record id.
# The uploadprocessor relies on this format.
build = self.factory.makeSourcePackageRecipeBuild()
- job = IBuildFarmJobBehavior(build)
+ job = IBuildFarmJobBehaviour(build)
cookie = removeSecurityProxy(job).getBuildCookie()
expected_cookie = "RECIPEBRANCHBUILD-%d" % build.id
self.assertEquals(expected_cookie, cookie)
@@ -340,7 +340,7 @@
from lp.testing.factory import LaunchpadObjectFactory
self.factory = LaunchpadObjectFactory()
- def prepareBehavior(self, fake_successful_upload=False):
+ def prepareBehaviour(self, fake_successful_upload=False):
self.queue_record = (
self.factory.makeSourcePackageRecipeBuild().queueBuild())
build = self.queue_record.specific_build
@@ -360,11 +360,11 @@
self.addCleanup(config.pop, 'tmp_builddmaster_root')
self.queue_record.builder = self.factory.makeBuilder()
slave = WaitingSlave('BuildStatus.OK')
- return BuilderInteractor.getBuildBehavior(
+ return BuilderInteractor.getBuildBehaviour(
self.queue_record, self.queue_record.builder, slave)
- def assertDeferredNotifyCount(self, status, behavior, expected_count):
- d = behavior.handleStatus(self.queue_record, status, {'filemap': {}})
+ def assertDeferredNotifyCount(self, status, behaviour, expected_count):
+ d = behaviour.handleStatus(self.queue_record, status, {'filemap': {}})
def cb(result):
self.assertEqual(expected_count, len(pop_notifications()))
@@ -375,7 +375,7 @@
def test_handleStatus_PACKAGEFAIL(self):
"""Failing to build the package immediately sends a notification."""
return self.assertDeferredNotifyCount(
- "PACKAGEFAIL", self.prepareBehavior(), 1)
+ "PACKAGEFAIL", self.prepareBehaviour(), 1)
def test_handleStatus_OK(self):
"""Building the source package does _not_ immediately send mail.
@@ -383,11 +383,11 @@
(The archive uploader mail send one later.
"""
return self.assertDeferredNotifyCount(
- "OK", self.prepareBehavior(), 0)
+ "OK", self.prepareBehaviour(), 0)
def test_handleStatus_OK_successful_upload(self):
return self.assertDeferredNotifyCount(
- "OK", self.prepareBehavior(True), 0)
+ "OK", self.prepareBehaviour(True), 0)
class MakeSPRecipeBuildMixin:
=== modified file 'lib/lp/codehosting/tests/test_bzrlib.py'
--- lib/lp/codehosting/tests/test_bzrlib.py 2011-08-12 11:37:08 +0000
+++ lib/lp/codehosting/tests/test_bzrlib.py 2014-01-30 15:36:06 +0000
@@ -1,7 +1,7 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-"""Launchpad specific tests of bzrlib behavior."""
+"""Launchpad specific tests of bzrlib behaviour."""
__metaclass__ = type
=== modified file 'lib/lp/codehosting/upgrade.py'
--- lib/lp/codehosting/upgrade.py 2013-06-20 05:50:00 +0000
+++ lib/lp/codehosting/upgrade.py 2014-01-30 15:36:06 +0000
@@ -146,7 +146,7 @@
bd.root_transport.base, self.get_target_format())
if exceptions:
if len(exceptions) == 1:
- # Compatibility with historical behavior
+ # Compatibility with historical behaviour
raise exceptions[0]
else:
return 3
=== modified file 'lib/lp/coop/answersbugs/tests/notifications-linked-private-bug.txt'
--- lib/lp/coop/answersbugs/tests/notifications-linked-private-bug.txt 2011-04-30 01:34:57 +0000
+++ lib/lp/coop/answersbugs/tests/notifications-linked-private-bug.txt 2014-01-30 15:36:06 +0000
@@ -1,7 +1,7 @@
Linked Bug Status Changed Notification (Private)
================================================
-See `answer-tracker-notifications-linked-bug.txt` for public bug behavior.
+See `answer-tracker-notifications-linked-bug.txt` for public bug behaviour.
Question subscribers are not sent notifications about private bugs, because
they are indirect subscribers.
=== modified file 'lib/lp/registry/browser/__init__.py'
--- lib/lp/registry/browser/__init__.py 2013-04-03 03:09:04 +0000
+++ lib/lp/registry/browser/__init__.py 2014-01-30 15:36:06 +0000
@@ -152,7 +152,7 @@
class RegistryDeleteViewMixin:
- """A mixin class that provides common behavior for registry deletions."""
+ """A mixin class that provides common behaviour for registry deletions."""
@property
def cancel_url(self):
=== modified file 'lib/lp/registry/javascript/product_views.js'
--- lib/lp/registry/javascript/product_views.js 2012-11-12 13:45:58 +0000
+++ lib/lp/registry/javascript/product_views.js 2014-01-30 15:36:06 +0000
@@ -134,7 +134,7 @@
// explicit entry into the URL field. These are simple enough to keep
// in sync so it doesn't bother me that we repeat most of it. Note
// that while both ignore case, only the first one should be global in
- // order to utilize the RegExp.lastIndex behavior of .exec().
+ // order to utilize the RegExp.lastIndex behaviour of .exec().
valid_urls: new RegExp('^[a-z0-9][-.+a-z0-9]*', 'ig'),
valid_char: new RegExp('^[a-z0-9][-.+a-z0-9]*$', 'i'),
=== modified file 'lib/lp/registry/model/person.py'
--- lib/lp/registry/model/person.py 2014-01-14 06:53:28 +0000
+++ lib/lp/registry/model/person.py 2014-01-30 15:36:06 +0000
@@ -441,7 +441,7 @@
# The interface.names() method returns the names on the interface. If
# "all" is True, then you will also get the names on base
# interfaces. That is unlikely to be needed here, but would be the
- # expected behavior if it were.
+ # expected behaviour if it were.
for name in interface.names(all=True):
# This next line is a work-around for a classic problem of
# closures in a loop. Closures are bound (indirectly) to frame
=== modified file 'lib/lp/registry/stories/mailinglists/subscriptions.txt'
--- lib/lp/registry/stories/mailinglists/subscriptions.txt 2013-09-27 04:13:23 +0000
+++ lib/lp/registry/stories/mailinglists/subscriptions.txt 2014-01-30 15:36:06 +0000
@@ -528,7 +528,7 @@
Regardless of this setting, users will always receive a notification when a
team they are a member of creates a new mailing list. This notification
offers them to join the new mailing list. This page informs them of this
-behavior.
+behaviour.
>>> print extract_text(
... find_tag_by_id(carlos_browser.contents, 'notification-info'))
=== modified file 'lib/lp/registry/stories/object/xx-nameblacklist.txt'
--- lib/lp/registry/stories/object/xx-nameblacklist.txt 2013-09-27 04:13:23 +0000
+++ lib/lp/registry/stories/object/xx-nameblacklist.txt 2014-01-30 15:36:06 +0000
@@ -23,7 +23,7 @@
>>> "The name 'blacklisted' has been blocked" in admin_browser.contents
True
-Same behavior for products:
+Same behaviour for products:
>>> admin_browser.open('http://launchpad.dev/firefox')
>>> admin_browser.getLink('Administer').click()
@@ -32,7 +32,7 @@
>>> "The name 'blacklisted' has been blocked" in admin_browser.contents
True
-Same behavior for people:
+Same behaviour for people:
>>> admin_browser.open('http://launchpad.dev/~stub')
>>> admin_browser.getLink('Change details').click()
=== modified file 'lib/lp/registry/tests/test_projectgroup.py'
--- lib/lp/registry/tests/test_projectgroup.py 2012-10-19 14:22:36 +0000
+++ lib/lp/registry/tests/test_projectgroup.py 2014-01-30 15:36:06 +0000
@@ -134,10 +134,10 @@
# project group to demonstrate projects are NOT searched too.
# XXX: BradCrittenden 2009-11-10 bug=479984:
- # The behavior is currently unintuitive when search_products is used.
+ # The behaviour is currently unintuitive when search_products is used.
# An exact match on a project is not returned since only products are
# searched and the corresponding project for those matched is
- # returned. This test demonstrates the current wrong behavior and
+ # returned. This test demonstrates the current wrong behaviour and
# needs to be fixed when the search is fixed.
results = self.projectset.search(
text="zazzle-dazzle", search_products=True)
=== modified file 'lib/lp/scripts/utilities/js/tests/test_combo.py'
--- lib/lp/scripts/utilities/js/tests/test_combo.py 2012-06-14 05:18:22 +0000
+++ lib/lp/scripts/utilities/js/tests/test_combo.py 2014-01-30 15:36:06 +0000
@@ -254,7 +254,7 @@
def test_combine_css_disable_minify(self):
"""
It is possible to disable CSS minification altogether, while
- keeping the URL rewriting behavior.
+ keeping the URL rewriting behaviour.
"""
test_dir = self.makeDir()
=== modified file 'lib/lp/services/apachelogparser/script.py'
--- lib/lp/services/apachelogparser/script.py 2012-03-12 09:10:46 +0000
+++ lib/lp/services/apachelogparser/script.py 2014-01-30 15:36:06 +0000
@@ -75,7 +75,7 @@
# chance log rotation will have kicked in and removed our oldest
# files. Note that we still error if a file we want to parse
# disappears before we get around to parsing it, which is
- # desirable behavior.
+ # desirable behaviour.
files_to_parse = list(get_files_to_parse(
glob.glob(os.path.join(self.root, self.log_file_glob))))
=== modified file 'lib/lp/services/database/doc/db-policy.txt'
--- lib/lp/services/database/doc/db-policy.txt 2013-06-20 05:50:00 +0000
+++ lib/lp/services/database/doc/db-policy.txt 2014-01-30 15:36:06 +0000
@@ -60,7 +60,7 @@
the master database. This allows our code written before database
replication was implemented to keep working.
-To alter this behavior, you can install a different database policy.
+To alter this behaviour, you can install a different database policy.
>>> from lp.services.database.policy import SlaveDatabasePolicy
>>> with SlaveDatabasePolicy():
=== modified file 'lib/lp/services/database/policy.py'
--- lib/lp/services/database/policy.py 2013-06-20 05:50:00 +0000
+++ lib/lp/services/database/policy.py 2014-01-30 15:36:06 +0000
@@ -132,7 +132,7 @@
# will be good enough. Note we don't call self.getStore()
# recursively because we want to make this attempt even if
# the DatabasePolicy normally disallows master database
- # connections. All this behavior allows read-only requests
+ # connections. All this behaviour allows read-only requests
# to keep working when slave databases are being rebuilt or
# updated.
try:
=== modified file 'lib/lp/services/database/postgresql.py'
--- lib/lp/services/database/postgresql.py 2012-10-24 03:13:50 +0000
+++ lib/lp/services/database/postgresql.py 2014-01-30 15:36:06 +0000
@@ -21,7 +21,7 @@
"""Return a list of all foreign key references to the given table column
`table` and `column` are both case sensitive strings (so they should
- usually be lowercase strings as per PostgreSQL default behavior).
+ usually be lowercase strings as per PostgreSQL default behaviour).
`cur` is an open DB-API cursor
=== modified file 'lib/lp/services/database/tests/test_storm.py'
--- lib/lp/services/database/tests/test_storm.py 2011-08-12 11:37:08 +0000
+++ lib/lp/services/database/tests/test_storm.py 2014-01-30 15:36:06 +0000
@@ -1,7 +1,7 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-"""Launchpad specific tests of Storm behavior."""
+"""Launchpad specific tests of Storm behaviour."""
__metaclass__ = type
=== modified file 'lib/lp/services/librarian/browser.py'
--- lib/lp/services/librarian/browser.py 2012-02-15 04:09:40 +0000
+++ lib/lp/services/librarian/browser.py 2014-01-30 15:36:06 +0000
@@ -128,7 +128,7 @@
def http_url(self):
"""Return the webapp URL for the context `LibraryFileAlias`.
- Preserve the `LibraryFileAlias.http_url` behavior for deleted
+ Preserve the `LibraryFileAlias.http_url` behaviour for deleted
files, returning None.
Mask webservice requests if it's the case, so the returned URL will
=== modified file 'lib/lp/services/librarian/tests/test_client.py'
--- lib/lp/services/librarian/tests/test_client.py 2013-06-20 05:50:00 +0000
+++ lib/lp/services/librarian/tests/test_client.py 2014-01-30 15:36:06 +0000
@@ -212,7 +212,7 @@
def test_restricted_getURLForDownload(self):
# The RestrictedLibrarianClient should use the
# restricted_download_host and restricted_download_port, but is
- # otherwise identical to the behavior of the LibrarianClient discussed
+ # otherwise identical to the behaviour of the LibrarianClient discussed
# and demonstrated above.
#
# (Set up:)
=== modified file 'lib/lp/services/librarianserver/librariangc.py'
--- lib/lp/services/librarianserver/librariangc.py 2013-11-12 10:35:12 +0000
+++ lib/lp/services/librarianserver/librariangc.py 2014-01-30 15:36:06 +0000
@@ -129,7 +129,7 @@
"""Remove expired TemporaryBlobStorage entries and their corresponding
LibraryFileAlias entries.
- We delete the LibraryFileAliases here as the default behavior of the
+ We delete the LibraryFileAliases here as the default behaviour of the
garbage collector could leave them hanging around indefinitely.
We also delete any linked ApportJob and Job records here.
=== modified file 'lib/lp/services/librarianserver/tests/test_db_outage.py'
--- lib/lp/services/librarianserver/tests/test_db_outage.py 2012-06-29 08:40:05 +0000
+++ lib/lp/services/librarianserver/tests/test_db_outage.py 2014-01-30 15:36:06 +0000
@@ -1,7 +1,7 @@
# Copyright 2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-"""Test behavior of the Librarian during a database outage.
+"""Test behaviour of the Librarian during a database outage.
Database outages happen by accident and during fastdowntime deployments."""
=== modified file 'lib/lp/services/mail/tests/test_sendmail.py'
--- lib/lp/services/mail/tests/test_sendmail.py 2012-06-28 14:45:53 +0000
+++ lib/lp/services/mail/tests/test_sendmail.py 2014-01-30 15:36:06 +0000
@@ -24,7 +24,7 @@
class TestMailController(TestCase):
def test_constructor(self):
- """Test the default construction behavior.
+ """Test the default construction behaviour.
Defaults should be empty. The 'to' should be converted to a list.
"""
@@ -38,7 +38,7 @@
self.assertEqual([], ctrl.attachments)
def test_constructor2(self):
- """Test the explicit construction behavior.
+ """Test the explicit construction behaviour.
Since to is a list, it is not converted into a list.
"""
=== modified file 'lib/lp/services/messages/tests/test_message.py'
--- lib/lp/services/messages/tests/test_message.py 2013-08-12 03:12:44 +0000
+++ lib/lp/services/messages/tests/test_message.py 2014-01-30 15:36:06 +0000
@@ -31,7 +31,7 @@
def setUp(self):
super(TestMessageSet, self).setUp()
- # Testing behavior, not permissions here.
+ # Testing behaviour, not permissions here.
login('foo.bar@xxxxxxxxxxxxx')
def createTestMessages(self):
=== modified file 'lib/lp/services/oauth/doc/oauth.txt'
--- lib/lp/services/oauth/doc/oauth.txt 2011-12-08 05:23:51 +0000
+++ lib/lp/services/oauth/doc/oauth.txt 2014-01-30 15:36:06 +0000
@@ -15,7 +15,7 @@
Launchpad implements this constraint. If a nonce is not unique for a client
and a timestamp, the code will raise a NonceAlreadyUsed exception.
-Here's a quick demonstration of the behavior.
+Here's a quick demonstration of the behaviour.
>>> login('foo.bar@xxxxxxxxxxxxx')
>>> access_token = factory.makeOAuthAccessToken()
@@ -78,7 +78,7 @@
2009-02-24T13:42:08Z or later. Otherwise the code will raise a
TimestampOrderingError.
-Here's a quick demonstration of the behavior.
+Here's a quick demonstration of the behaviour.
- Within the TIMESTAMP_ACCEPTANCE_WINDOW, we can create a nonce with an
earlier time.
@@ -111,12 +111,12 @@
The code also raises a ClockSkew error if the timestamp is more than
TIMESTAMP_SKEW_WINDOW seconds away from the server's clock (ahead or
behind). This number of seconds is currently equal to one hour (60*60). The
-primary reason for this behavior is so that a clock skew too far in the future
+primary reason for this behaviour is so that a clock skew too far in the future
does not essentially make the authentication tokens useless once the client's
clock is corrected. In addition, it gives us a constraint within which we can
reason about clock-related errors reported by customers.
-Here's a quick demonstration of the behavior.
+Here's a quick demonstration of the behaviour.
- We can access the system with a timestamp 55 minutes in the future.
=== modified file 'lib/lp/services/scripts/doc/launchpad-scripts.txt'
--- lib/lp/services/scripts/doc/launchpad-scripts.txt 2012-11-22 00:15:23 +0000
+++ lib/lp/services/scripts/doc/launchpad-scripts.txt 2014-01-30 15:36:06 +0000
@@ -3,7 +3,7 @@
Launchpad scripts are built using the LaunchpadScript class in
lp.services.scripts.base. This, along with the LaunchpadCronScript
-specialization, implement common behavior for all Launchpad command
+specialization, implement common behaviour for all Launchpad command
line scripts.
>>> from lp.services.scripts.base import (
=== modified file 'lib/lp/services/sshserver/auth.py'
--- lib/lp/services/sshserver/auth.py 2013-01-07 02:40:55 +0000
+++ lib/lp/services/sshserver/auth.py 2014-01-30 15:36:06 +0000
@@ -130,7 +130,7 @@
class SSHUserAuthServer(userauth.SSHUserAuthServer):
- """Subclass of Conch's SSHUserAuthServer to customize various behaviors.
+ """Subclass of Conch's SSHUserAuthServer to customize various behaviours.
There are two main differences:
=== modified file 'lib/lp/services/twistedsupport/loggingsupport.py'
--- lib/lp/services/twistedsupport/loggingsupport.py 2013-01-07 02:40:55 +0000
+++ lib/lp/services/twistedsupport/loggingsupport.py 2014-01-30 15:36:06 +0000
@@ -154,7 +154,7 @@
def callRemote(self, method, *args):
"""See `xmlrpc.Proxy.callRemote`.
- In addition to the superclass' behavior, we log the call and its
+ In addition to the superclass' behaviour, we log the call and its
result.
"""
request = self.request_count
=== modified file 'lib/lp/services/twistedsupport/tests/test_loggingsupport.py'
--- lib/lp/services/twistedsupport/tests/test_loggingsupport.py 2011-10-28 06:43:50 +0000
+++ lib/lp/services/twistedsupport/tests/test_loggingsupport.py 2014-01-30 15:36:06 +0000
@@ -34,7 +34,7 @@
incoherent with 'maxRotatedFiles', like requesting the compression
of more files that we have rotated.
"""
- # Default behavior.
+ # Default behaviour.
log_file = LaunchpadLogFile('test.log', self.temp_dir)
self.assertEqual(5, log_file.maxRotatedFiles)
self.assertEqual(3, log_file.compressLast)
=== modified file 'lib/lp/services/webapp/doc/launchbag.txt'
--- lib/lp/services/webapp/doc/launchbag.txt 2012-04-10 14:01:17 +0000
+++ lib/lp/services/webapp/doc/launchbag.txt 2014-01-30 15:36:06 +0000
@@ -1,6 +1,6 @@
The LaunchBag is a collection of all the 'stuff' we have traversed. It
contains the request's 'context' or environment, which can be used to
-filter or otherwise specialize views or behavior.
+filter or otherwise specialize views or behaviour.
First, we'll set up various imports and stub objects.
=== modified file 'lib/lp/services/webapp/doc/test_adapter_timeout.txt.disabled'
--- lib/lp/services/webapp/doc/test_adapter_timeout.txt.disabled 2011-12-29 05:29:36 +0000
+++ lib/lp/services/webapp/doc/test_adapter_timeout.txt.disabled 2014-01-30 15:36:06 +0000
@@ -2,7 +2,7 @@
a request can take.
The document webapp/ftests/test_adapter.txt shows its
-behavior in detail. This document shows the behavior within the context of a
+behaviour in detail. This document shows the behaviour within the context of a
page test.
In particular, this demonstration shows not only that the main view will raise
@@ -77,7 +77,7 @@
... DoomedExceptionView, required=(TimeoutError, IBrowserRequest),
... provided=IBrowserView, name='index.html')
-Now we actually demonstrate the behavior. The view did raise a TimeoutError.
+Now we actually demonstrate the behaviour. The view did raise a TimeoutError.
>>> from lp.testing.fixture import CaptureOops
>>> capture = CaptureOops()
=== modified file 'lib/lp/services/webapp/notifications.py'
--- lib/lp/services/webapp/notifications.py 2012-11-26 08:48:03 +0000
+++ lib/lp/services/webapp/notifications.py 2014-01-30 15:36:06 +0000
@@ -83,7 +83,7 @@
page.
It needs to be mixed in with an IHTTPApplicationResponse so its redirect
- method intercepts the default behavior.
+ method intercepts the default behaviour.
>>> class MyNotificationResponse(NotificationResponse, MockResponse):
... pass
=== modified file 'lib/lp/services/webapp/publication.py'
--- lib/lp/services/webapp/publication.py 2013-04-10 09:12:32 +0000
+++ lib/lp/services/webapp/publication.py 2014-01-30 15:36:06 +0000
@@ -663,7 +663,7 @@
def beginErrorHandlingTransaction(self, request, ob, note):
"""Hook for when a new view is started to handle an exception.
- We need to add an additional behavior to the usual Zope behavior.
+ We need to add an additional behaviour to the usual Zope behaviour.
We must restart the request timer. Otherwise we can get OOPS errors
from our exception views inappropriately.
"""
=== modified file 'lib/lp/services/webapp/publisher.py'
--- lib/lp/services/webapp/publisher.py 2013-04-10 09:19:50 +0000
+++ lib/lp/services/webapp/publisher.py 2014-01-30 15:36:06 +0000
@@ -548,7 +548,7 @@
from lp.services.features.flags import flag_info
beta_info = {}
- for (flag_name, value_domain, documentation, default_behavior, title,
+ for (flag_name, value_domain, documentation, default_behaviour, title,
url) in flag_info:
if flag_name not in self.related_features:
continue
=== modified file 'lib/lp/services/webapp/tests/test_pgsession.py'
--- lib/lp/services/webapp/tests/test_pgsession.py 2011-12-28 17:03:06 +0000
+++ lib/lp/services/webapp/tests/test_pgsession.py 2014-01-30 15:36:06 +0000
@@ -164,4 +164,4 @@
self.request.response.getCookie('launchpad_tests'), None)
# also see the page test xx-no-anonymous-session-cookies for tests of
- # the cookie behavior.
+ # the cookie behaviour.
=== modified file 'lib/lp/services/webservice/doc/webservice-configuration.txt'
--- lib/lp/services/webservice/doc/webservice-configuration.txt 2011-12-29 05:29:36 +0000
+++ lib/lp/services/webservice/doc/webservice-configuration.txt 2014-01-30 15:36:06 +0000
@@ -17,7 +17,7 @@
== show_tracebacks ==
The show_tracebacks variable controls whether the client is shown
-tracebacks of errors. The show_tracebacks behavior itself is tested in
+tracebacks of errors. The show_tracebacks behaviour itself is tested in
lazr.restful's "webservice-error" test. This test only shows how
changes within Launchpad affect the value of show_tracebacks. The
Launchpad web service shows or hides information about exceptions
=== modified file 'lib/lp/services/webservice/doc/webservice-error.txt'
--- lib/lp/services/webservice/doc/webservice-error.txt 2012-06-29 08:40:05 +0000
+++ lib/lp/services/webservice/doc/webservice-error.txt 2014-01-30 15:36:06 +0000
@@ -2,7 +2,7 @@
Most of the time, if a web service client triggers an exception, the
response code will be 500. But specific exception classes can override
-this behavior and set some other response code.
+this behaviour and set some other response code.
>>> import threading
>>> from lp.services.webapp.servers import LaunchpadTestRequest
=== modified file 'lib/lp/services/webservice/stories/security.txt'
--- lib/lp/services/webservice/stories/security.txt 2012-04-27 05:35:34 +0000
+++ lib/lp/services/webservice/stories/security.txt 2014-01-30 15:36:06 +0000
@@ -45,7 +45,7 @@
>>> len(public_output['entries'])
2
-Although this behavior is inconsistent, it doesn't leak any private
+Although this behaviour is inconsistent, it doesn't leak any private
information and implementing it consistently would be very difficult,
so it's good enough. What happened here is that the web service
request was made by a user who can see all 15 bugs, but the user used
=== modified file 'lib/lp/services/webservice/stories/xx-hostedfile.txt'
--- lib/lp/services/webservice/stories/xx-hostedfile.txt 2012-06-02 11:53:05 +0000
+++ lib/lp/services/webservice/stories/xx-hostedfile.txt 2014-01-30 15:36:06 +0000
@@ -2,7 +2,7 @@
============
In Launchpad, hosted file resources are managed by the Launchpad
-library. This test illustrates the Launchpad-specific behavior of
+library. This test illustrates the Launchpad-specific behaviour of
hosted file resources.
=== modified file 'lib/lp/services/webservice/stories/xx-service.txt'
--- lib/lp/services/webservice/stories/xx-service.txt 2011-12-22 05:09:10 +0000
+++ lib/lp/services/webservice/stories/xx-service.txt 2014-01-30 15:36:06 +0000
@@ -2,7 +2,7 @@
Introduction
************
-Some standard behavior is defined by the web service itself, not by
+Some standard behaviour is defined by the web service itself, not by
the individual resources.
Multiple versions
=== modified file 'lib/lp/soyuz/configure.zcml'
--- lib/lp/soyuz/configure.zcml 2013-11-28 05:13:37 +0000
+++ lib/lp/soyuz/configure.zcml 2014-01-30 15:36:06 +0000
@@ -776,11 +776,11 @@
interface="lp.soyuz.interfaces.packagesetgroup.IPackagesetGroup"/>
</class>
- <!-- BinaryPackageBuildBehavior -->
+ <!-- BinaryPackageBuildBehaviour -->
<adapter
for="lp.soyuz.interfaces.binarypackagebuild.IBinaryPackageBuild"
- provides="lp.buildmaster.interfaces.buildfarmjobbehavior.IBuildFarmJobBehavior"
- factory="lp.soyuz.model.binarypackagebuildbehavior.BinaryPackageBuildBehavior"
+ provides="lp.buildmaster.interfaces.buildfarmjobbehaviour.IBuildFarmJobBehaviour"
+ factory="lp.soyuz.model.binarypackagebuildbehaviour.BinaryPackageBuildBehaviour"
permission="zope.Public" />
<!-- BinaryPackageReleaseDownloadCount -->
=== modified file 'lib/lp/soyuz/doc/archive-dependencies.txt'
--- lib/lp/soyuz/doc/archive-dependencies.txt 2013-05-09 08:53:01 +0000
+++ lib/lp/soyuz/doc/archive-dependencies.txt 2014-01-30 15:36:06 +0000
@@ -414,7 +414,7 @@
== Partner archive builds ==
Similarly to what happens with PPA builds, PARTNER builds may depend
-on any Ubuntu component in the PRIMARY archive. This behavior allows
+on any Ubuntu component in the PRIMARY archive. This behaviour allows
scenarios where partner packages may use other restricted/non-free
applications from 'multiverse', for instance 'sun-java', and also
other partner applications by default.
=== modified file 'lib/lp/soyuz/doc/distroarchseries.txt'
--- lib/lp/soyuz/doc/distroarchseries.txt 2013-09-13 06:20:49 +0000
+++ lib/lp/soyuz/doc/distroarchseries.txt 2014-01-30 15:36:06 +0000
@@ -64,7 +64,7 @@
See more information about getReleasePackages below.
-Check the behavior of the provided search method, which returns a
+Check the behaviour of the provided search method, which returns a
list of IDARBPR instances containing the matching packages.
>>> results = hoary_i386.searchBinaryPackages(text=u'pmount')
@@ -165,7 +165,7 @@
getReleasedPackages method which returns a shortlist of
IBinaryPackagePublishingHistory ordered by descending ID.
-In order to test its behavior we will create a bunch of sample
+In order to test its behaviour we will create a bunch of sample
publishing records with different (status, pocket, archive) in
ubuntu/breezy-autotest/i386, which is empty:
=== modified file 'lib/lp/soyuz/doc/distroseries-publishing-lookups.txt'
--- lib/lp/soyuz/doc/distroseries-publishing-lookups.txt 2012-01-10 09:52:11 +0000
+++ lib/lp/soyuz/doc/distroseries-publishing-lookups.txt 2014-01-30 15:36:06 +0000
@@ -5,7 +5,7 @@
getReleasedPackages method which returns a shortlist of
ISourcePackagePublishingHistory ordered by descending ID.
-In order to test its behavior we will create a bunch of sample
+In order to test its behaviour we will create a bunch of sample
publishing records with different (status, pocket, archive) in
ubuntu/breezy-autotest, which is empty:
=== modified file 'lib/lp/soyuz/doc/soyuz-set-of-uploads.txt'
--- lib/lp/soyuz/doc/soyuz-set-of-uploads.txt 2013-09-11 06:05:44 +0000
+++ lib/lp/soyuz/doc/soyuz-set-of-uploads.txt 2014-01-30 15:36:06 +0000
@@ -311,7 +311,7 @@
Subject: bar_1.0-3_source.changes rejected
...
-Force weird behavior with rfc2047 sentences containing '.' on
+Force weird behaviour with rfc2047 sentences containing '.' on
bar_1.0-4, which caused bug # 41102.
>>> from lp.registry.interfaces.person import IPersonSet
=== renamed file 'lib/lp/soyuz/model/binarypackagebuildbehavior.py' => 'lib/lp/soyuz/model/binarypackagebuildbehaviour.py'
--- lib/lp/soyuz/model/binarypackagebuildbehavior.py 2013-10-08 11:56:24 +0000
+++ lib/lp/soyuz/model/binarypackagebuildbehaviour.py 2014-01-30 15:36:06 +0000
@@ -1,22 +1,24 @@
# Copyright 2009-2013 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-"""Builder behavior for binary package builds."""
+"""Builder behaviour for binary package builds."""
__metaclass__ = type
__all__ = [
- 'BinaryPackageBuildBehavior',
+ 'BinaryPackageBuildBehaviour',
]
from twisted.internet import defer
from zope.interface import implements
from lp.buildmaster.interfaces.builder import CannotBuild
-from lp.buildmaster.interfaces.buildfarmjobbehavior import (
- IBuildFarmJobBehavior,
- )
-from lp.buildmaster.model.buildfarmjobbehavior import BuildFarmJobBehaviorBase
+from lp.buildmaster.interfaces.buildfarmjobbehaviour import (
+ IBuildFarmJobBehaviour,
+ )
+from lp.buildmaster.model.buildfarmjobbehaviour import (
+ BuildFarmJobBehaviourBase,
+ )
from lp.registry.interfaces.pocket import PackagePublishingPocket
from lp.services.webapp import urlappend
from lp.soyuz.adapters.archivedependencies import (
@@ -26,13 +28,13 @@
from lp.soyuz.enums import ArchivePurpose
-class BinaryPackageBuildBehavior(BuildFarmJobBehaviorBase):
- """Define the behavior of binary package builds."""
+class BinaryPackageBuildBehaviour(BuildFarmJobBehaviourBase):
+ """Define the behaviour of binary package builds."""
- implements(IBuildFarmJobBehavior)
+ implements(IBuildFarmJobBehaviour)
def logStartBuild(self, logger):
- """See `IBuildFarmJobBehavior`."""
+ """See `IBuildFarmJobBehaviour`."""
spr = self.build.source_package_release
logger.info("startBuild(%s, %s, %s, %s)", self._builder.url,
spr.name, spr.version, self.build.pocket.title)
@@ -82,7 +84,7 @@
return d.addCallback(lambda ignored: filemap)
def dispatchBuildToSlave(self, build_queue_id, logger):
- """See `IBuildFarmJobBehavior`."""
+ """See `IBuildFarmJobBehaviour`."""
# Start the binary package build on the slave builder. First
# we send the chroot.
=== renamed file 'lib/lp/soyuz/tests/test_binarypackagebuildbehavior.py' => 'lib/lp/soyuz/tests/test_binarypackagebuildbehaviour.py'
--- lib/lp/soyuz/tests/test_binarypackagebuildbehavior.py 2013-11-19 06:45:30 +0000
+++ lib/lp/soyuz/tests/test_binarypackagebuildbehaviour.py 2014-01-30 15:36:06 +0000
@@ -1,7 +1,7 @@
# Copyright 2010-2013 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-"""Tests for BinaryPackageBuildBehavior."""
+"""Tests for BinaryPackageBuildBehaviour."""
__metaclass__ = type
@@ -27,8 +27,8 @@
extract_vitals_from_db,
)
from lp.buildmaster.interfaces.builder import CannotBuild
-from lp.buildmaster.interfaces.buildfarmjobbehavior import (
- IBuildFarmJobBehavior,
+from lp.buildmaster.interfaces.buildfarmjobbehaviour import (
+ IBuildFarmJobBehaviour,
)
from lp.buildmaster.tests.mock_slaves import (
AbortingSlave,
@@ -36,7 +36,7 @@
OkSlave,
WaitingSlave,
)
-from lp.buildmaster.tests.test_buildfarmjobbehavior import (
+from lp.buildmaster.tests.test_buildfarmjobbehaviour import (
TestGetUploadMethodsMixin,
TestHandleStatusMixin,
)
@@ -58,10 +58,10 @@
from lp.testing.layers import LaunchpadZopelessLayer
-class TestBinaryBuildPackageBehavior(TestCaseWithFactory):
- """Tests for the BinaryPackageBuildBehavior.
+class TestBinaryBuildPackageBehaviour(TestCaseWithFactory):
+ """Tests for the BinaryPackageBuildBehaviour.
- In particular, these tests are about how the BinaryPackageBuildBehavior
+ In particular, these tests are about how the BinaryPackageBuildBehaviour
interacts with the build slave. We test this by using a test double that
implements the same interface as `BuilderSlave` but instead of actually
making XML-RPC calls, just records any method invocations along with
@@ -72,7 +72,7 @@
run_tests_with = AsynchronousDeferredRunTest
def setUp(self):
- super(TestBinaryBuildPackageBehavior, self).setUp()
+ super(TestBinaryBuildPackageBehaviour, self).setUp()
switch_dbuser('testadmin')
def assertExpectedInteraction(self, ignored, call_log, builder, build,
@@ -96,11 +96,11 @@
:param archive: The `IArchive` into which we are building.
:param archive_purpose: The ArchivePurpose we are sending to the
builder. We specify this separately from the archive because
- sometimes the behavior object has to give a different purpose
+ sometimes the behaviour object has to give a different purpose
in order to trick the slave into building correctly.
:return: A list of the calls we expect to be made.
"""
- cookie = IBuildFarmJobBehavior(build).getBuildCookie()
+ cookie = IBuildFarmJobBehaviour(build).getBuildCookie()
ds_name = build.distro_arch_series.distroseries.name
suite = ds_name + pocketsuffix[build.pocket]
archives = get_sources_list_for_building(
@@ -138,7 +138,7 @@
return result
def test_non_virtual_ppa_dispatch(self):
- # When the BinaryPackageBuildBehavior dispatches PPA builds to
+ # When the BinaryPackageBuildBehaviour dispatches PPA builds to
# non-virtual builders, it stores the chroot on the server and
# requests a binary package build, lying to say that the archive
# purpose is "PRIMARY" because this ensures that the package mangling
@@ -157,7 +157,7 @@
interactor = BuilderInteractor()
d = interactor._startBuild(
bq, vitals, builder, slave,
- interactor.getBuildBehavior(bq, builder, slave), BufferLogger())
+ interactor.getBuildBehaviour(bq, builder, slave), BufferLogger())
d.addCallback(
self.assertExpectedInteraction, slave.call_log, builder, build,
lf, archive, ArchivePurpose.PRIMARY, 'universe')
@@ -181,7 +181,7 @@
interactor = BuilderInteractor()
d = interactor._startBuild(
bq, vitals, builder, slave,
- interactor.getBuildBehavior(bq, builder, slave), BufferLogger())
+ interactor.getBuildBehaviour(bq, builder, slave), BufferLogger())
def check_build(ignored):
# We expect the first call to the slave to be a resume call,
@@ -209,7 +209,7 @@
interactor = BuilderInteractor()
d = interactor._startBuild(
bq, vitals, builder, slave,
- interactor.getBuildBehavior(bq, builder, slave), BufferLogger())
+ interactor.getBuildBehaviour(bq, builder, slave), BufferLogger())
d.addCallback(
self.assertExpectedInteraction, slave.call_log, builder, build,
lf, archive, ArchivePurpose.PARTNER)
@@ -229,10 +229,10 @@
lf = self.factory.makeLibraryFileAlias()
transaction.commit()
build.distro_arch_series.addOrUpdateChroot(lf)
- behavior = IBuildFarmJobBehavior(build)
- behavior.setBuilder(builder, None)
+ behaviour = IBuildFarmJobBehaviour(build)
+ behaviour.setBuilder(builder, None)
e = self.assertRaises(
- AssertionError, behavior.verifyBuildRequest, BufferLogger())
+ AssertionError, behaviour.verifyBuildRequest, BufferLogger())
expected_message = (
"%s (%s) can not be built for pocket %s: invalid pocket due "
"to the series status of %s." % (
@@ -249,10 +249,10 @@
lf = self.factory.makeLibraryFileAlias()
transaction.commit()
build.distro_arch_series.addOrUpdateChroot(lf)
- behavior = IBuildFarmJobBehavior(build)
- behavior.setBuilder(builder, None)
+ behaviour = IBuildFarmJobBehaviour(build)
+ behaviour.setBuilder(builder, None)
e = self.assertRaises(
- AssertionError, behavior.verifyBuildRequest, BufferLogger())
+ AssertionError, behaviour.verifyBuildRequest, BufferLogger())
self.assertEqual(
'Soyuz is not yet capable of building SECURITY uploads.',
str(e))
@@ -267,10 +267,10 @@
lf = self.factory.makeLibraryFileAlias()
transaction.commit()
build.distro_arch_series.addOrUpdateChroot(lf)
- behavior = IBuildFarmJobBehavior(build)
- behavior.setBuilder(builder, None)
+ behaviour = IBuildFarmJobBehaviour(build)
+ behaviour.setBuilder(builder, None)
e = self.assertRaises(
- AssertionError, behavior.verifyBuildRequest, BufferLogger())
+ AssertionError, behaviour.verifyBuildRequest, BufferLogger())
self.assertEqual(
'Attempt to build virtual item on a non-virtual builder.',
str(e))
@@ -281,24 +281,24 @@
builder = self.factory.makeBuilder()
build = self.factory.makeBinaryPackageBuild(
builder=builder, archive=archive)
- behavior = IBuildFarmJobBehavior(build)
- behavior.setBuilder(builder, None)
+ behaviour = IBuildFarmJobBehaviour(build)
+ behaviour.setBuilder(builder, None)
e = self.assertRaises(
- CannotBuild, behavior.verifyBuildRequest, BufferLogger())
+ CannotBuild, behaviour.verifyBuildRequest, BufferLogger())
self.assertIn("Missing CHROOT", str(e))
def test_getBuildCookie(self):
# A build cookie is made up of the job type and record id.
# The uploadprocessor relies on this format.
build = self.factory.makeBinaryPackageBuild()
- behavior = IBuildFarmJobBehavior(build)
- cookie = removeSecurityProxy(behavior).getBuildCookie()
+ behaviour = IBuildFarmJobBehaviour(build)
+ cookie = removeSecurityProxy(behaviour).getBuildCookie()
expected_cookie = "PACKAGEBUILD-%d" % build.id
self.assertEqual(expected_cookie, cookie)
-class TestBinaryBuildPackageBehaviorBuildCollection(TestCaseWithFactory):
- """Tests for the BinaryPackageBuildBehavior.
+class TestBinaryBuildPackageBehaviourBuildCollection(TestCaseWithFactory):
+ """Tests for the BinaryPackageBuildBehaviour.
Using various mock slaves, we check how updateBuild() behaves in
various scenarios.
@@ -319,7 +319,7 @@
shutil.rmtree(config.builddmaster.root)
def setUp(self):
- super(TestBinaryBuildPackageBehaviorBuildCollection, self).setUp()
+ super(TestBinaryBuildPackageBehaviourBuildCollection, self).setUp()
switch_dbuser('testadmin')
self.builder = self.factory.makeBuilder()
@@ -341,7 +341,7 @@
slave_status = yield slave.status_dict()
yield self.interactor.updateBuild(
bf.getVitals('foo'), slave, slave_status, bf,
- self.interactor.getBuildBehavior)
+ self.interactor.getBuildBehaviour)
def assertBuildProperties(self, build):
"""Check that a build happened by making sure some of its properties
@@ -502,9 +502,9 @@
'buildlog', tmp_orig_file_name)
return d.addCallback(got_orig_log)
- behavior = IBuildFarmJobBehavior(self.build)
- behavior.setBuilder(self.builder, slave)
- d = behavior.getLogFromSlave(self.build.buildqueue_record)
+ behaviour = IBuildFarmJobBehaviour(self.build)
+ behaviour.setBuilder(self.builder, slave)
+ d = behaviour.getLogFromSlave(self.build.buildqueue_record)
return d.addCallback(got_log)
def test_private_build_log_storage(self):
=== modified file 'lib/lp/translations/configure.zcml'
--- lib/lp/translations/configure.zcml 2013-11-21 03:31:46 +0000
+++ lib/lp/translations/configure.zcml 2014-01-30 15:36:06 +0000
@@ -628,17 +628,17 @@
<allow interface="lp.buildmaster.interfaces.buildfarmjob.ISpecificBuildFarmJobSource"/>
</securedutility>
- <!-- TranslationTemplateBuildBehavior -->
+ <!-- TranslationTemplateBuildBehaviour -->
<class
- class="lp.translations.model.translationtemplatesbuildbehavior.TranslationTemplatesBuildBehavior">
+ class="lp.translations.model.translationtemplatesbuildbehaviour.TranslationTemplatesBuildBehaviour">
<allow
- interface="lp.buildmaster.interfaces.buildfarmjobbehavior.IBuildFarmJobBehavior"/>
+ interface="lp.buildmaster.interfaces.buildfarmjobbehaviour.IBuildFarmJobBehaviour"/>
</class>
<adapter
- provides="lp.buildmaster.interfaces.buildfarmjobbehavior.IBuildFarmJobBehavior"
+ provides="lp.buildmaster.interfaces.buildfarmjobbehaviour.IBuildFarmJobBehaviour"
for="lp.translations.model.translationtemplatesbuild.TranslationTemplatesBuild"
- factory="lp.translations.model.translationtemplatesbuildbehavior.TranslationTemplatesBuildBehavior"
+ factory="lp.translations.model.translationtemplatesbuildbehaviour.TranslationTemplatesBuildBehaviour"
/>
<webservice:register module="lp.translations.interfaces.webservice" />
=== modified file 'lib/lp/translations/doc/translationbuildapprover.txt'
--- lib/lp/translations/doc/translationbuildapprover.txt 2010-04-12 16:05:17 +0000
+++ lib/lp/translations/doc/translationbuildapprover.txt 2014-01-30 15:36:06 +0000
@@ -4,7 +4,7 @@
TranslationBranchApprover. The latter tries to detect when templates have
been removed or renamed and refuses to approve anything when that happens.
This new approver does not care about these things but tries to approve as
-many templates as possible. If this behavior proofs practical, it should
+many templates as possible. If this behaviour proofs practical, it should
replace the TranslationBranchApprover in the future.
>>> from lp.translations.interfaces.translationimportqueue import (
=== modified file 'lib/lp/translations/javascript/pofile.js'
--- lib/lp/translations/javascript/pofile.js 2013-03-20 22:32:47 +0000
+++ lib/lp/translations/javascript/pofile.js 2014-01-30 15:36:06 +0000
@@ -621,7 +621,7 @@
};
/*
- * Controls the behavior for reseting current translations
+ * Controls the behaviour for reseting current translations
*/
var resetTranslation = function (event, translation_id) {
if (this === null) {
@@ -655,7 +655,7 @@
* Ticking the 'Someone should review this translation' will automatically
* select the new empty translation.
*/
-var initializeResetBehavior = function (fields) {
+var initializeResetBehaviour = function (fields) {
var key;
for (key = 0; key < fields.length; key++) {
var html_parts = fields[key].split('_');
@@ -678,7 +678,7 @@
*
* This will add event-key bindings such as moving to the next or previous
* field, or copying original text.
- * It will also initializing the reset checkbox behavior and will show the
+ * It will also initializing the reset checkbox behaviour and will show the
* error notifications.
*/
var initializeBaseTranslate = function () {
@@ -696,9 +696,9 @@
try {
var fields = translations_order.split(' ');
- initializeResetBehavior(fields);
- } catch (initialize_reset_behavior_error) {
- Y.log(initialize_reset_behavior_error, "error");
+ initializeResetBehaviour(fields);
+ } catch (initialize_reset_behaviour_error) {
+ Y.log(initialize_reset_behaviour_error, "error");
}
try {
=== renamed file 'lib/lp/translations/model/translationtemplatesbuildbehavior.py' => 'lib/lp/translations/model/translationtemplatesbuildbehaviour.py'
--- lib/lp/translations/model/translationtemplatesbuildbehavior.py 2013-11-21 03:32:37 +0000
+++ lib/lp/translations/model/translationtemplatesbuildbehaviour.py 2014-01-30 15:36:06 +0000
@@ -1,14 +1,14 @@
# Copyright 2010-2013 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-"""An `IBuildFarmJobBehavior` for `TranslationTemplatesBuild`.
+"""An `IBuildFarmJobBehaviour` for `TranslationTemplatesBuild`.
Dispatches translation template build jobs to build-farm slaves.
"""
__metaclass__ = type
__all__ = [
- 'TranslationTemplatesBuildBehavior',
+ 'TranslationTemplatesBuildBehaviour',
]
import logging
@@ -24,10 +24,12 @@
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
from lp.buildmaster.enums import BuildStatus
from lp.buildmaster.interfaces.builder import CannotBuild
-from lp.buildmaster.interfaces.buildfarmjobbehavior import (
- IBuildFarmJobBehavior,
- )
-from lp.buildmaster.model.buildfarmjobbehavior import BuildFarmJobBehaviorBase
+from lp.buildmaster.interfaces.buildfarmjobbehaviour import (
+ IBuildFarmJobBehaviour,
+ )
+from lp.buildmaster.model.buildfarmjobbehaviour import (
+ BuildFarmJobBehaviourBase,
+ )
from lp.registry.interfaces.productseries import IProductSeriesSet
from lp.translations.interfaces.translationimportqueue import (
ITranslationImportQueue,
@@ -35,9 +37,9 @@
from lp.translations.model.approver import TranslationBuildApprover
-class TranslationTemplatesBuildBehavior(BuildFarmJobBehaviorBase):
+class TranslationTemplatesBuildBehaviour(BuildFarmJobBehaviourBase):
"""Dispatches `TranslationTemplateBuildJob`s to slaves."""
- implements(IBuildFarmJobBehavior)
+ implements(IBuildFarmJobBehaviour)
# Identify the type of job to the slave.
build_type = 'translation-templates'
@@ -54,7 +56,7 @@
return "translationtemplates_%s_%d.txt" % (safe_name, self.build.id)
def dispatchBuildToSlave(self, build_queue_item, logger):
- """See `IBuildFarmJobBehavior`."""
+ """See `IBuildFarmJobBehaviour`."""
chroot = self._getChroot()
if chroot is None:
distroarchseries = self._getDistroArchSeries()
@@ -84,7 +86,7 @@
return ubuntu.currentseries.nominatedarchindep
def logStartBuild(self, logger):
- """See `IBuildFarmJobBehavior`."""
+ """See `IBuildFarmJobBehaviour`."""
logger.info(
"Starting templates build %s for %s." % (
self.getBuildCookie(),
=== modified file 'lib/lp/translations/tests/test_pofile.py'
--- lib/lp/translations/tests/test_pofile.py 2013-04-04 06:35:56 +0000
+++ lib/lp/translations/tests/test_pofile.py 2014-01-30 15:36:06 +0000
@@ -50,7 +50,7 @@
class TestTranslationSharedPOFileSourcePackage(TestCaseWithFactory):
- """Test behavior of PO files with shared POTMsgSets on a source package.
+ """Test behaviour of PO files with shared POTMsgSets on a source package.
"""
layer = ZopelessDatabaseLayer
@@ -723,7 +723,7 @@
# product series, therefore they are "upstream" files. As a
# consequence "this side" in this test refers to "upstream" and
# "other side" refers to "ubuntu" translations. We keep the generic
- # terms, though, because the behavior is symmetrical.
+ # terms, though, because the behaviour is symmetrical.
# If there are no translations on either side, nothing is listed.
found_translations = list(
=== modified file 'lib/lp/translations/tests/test_potmsgset.py'
--- lib/lp/translations/tests/test_potmsgset.py 2013-01-14 02:33:31 +0000
+++ lib/lp/translations/tests/test_potmsgset.py 2014-01-30 15:36:06 +0000
@@ -790,7 +790,7 @@
def test_getLocalTranslationMessages_include_unreviewed(self):
# Setting include_unreviewed to True and include_dismissed to False
# will only return those that have not been dismissed. This is
- # the default behavior but is made explicit here.
+ # the default behaviour but is made explicit here.
self._setUp_for_getLocalTranslationMessages()
self.assertContentEqual(
[self.suggestion2],
=== modified file 'lib/lp/translations/tests/test_translationtemplatesbuild.py'
--- lib/lp/translations/tests/test_translationtemplatesbuild.py 2013-11-19 09:27:01 +0000
+++ lib/lp/translations/tests/test_translationtemplatesbuild.py 2014-01-30 15:36:06 +0000
@@ -39,7 +39,7 @@
How do you fake a utility that is implemented as a class, not a
factory? By inheriting from `TranslationTemplatesBuild`, this class
"copies" the utility. But you can make it fake the utility's
- behavior by setting an attribute of the class (not an object!) at
+ behaviour by setting an attribute of the class (not an object!) at
the beginning of every test.
"""
# Fake _hasPotteryCompatibleSetup, and if so, make it give what
=== renamed file 'lib/lp/translations/tests/test_translationtemplatesbuildbehavior.py' => 'lib/lp/translations/tests/test_translationtemplatesbuildbehaviour.py'
--- lib/lp/translations/tests/test_translationtemplatesbuildbehavior.py 2013-11-15 07:56:00 +0000
+++ lib/lp/translations/tests/test_translationtemplatesbuildbehaviour.py 2014-01-30 15:36:06 +0000
@@ -1,7 +1,7 @@
# Copyright 2010-2013 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-"""Unit tests for TranslationTemplatesBuildBehavior."""
+"""Unit tests for TranslationTemplatesBuildBehaviour."""
import datetime
import logging
@@ -16,8 +16,8 @@
from lp.buildmaster.enums import BuildStatus
from lp.buildmaster.interactor import BuilderInteractor
from lp.buildmaster.interfaces.builder import CannotBuild
-from lp.buildmaster.interfaces.buildfarmjobbehavior import (
- IBuildFarmJobBehavior,
+from lp.buildmaster.interfaces.buildfarmjobbehaviour import (
+ IBuildFarmJobBehaviour,
)
from lp.buildmaster.tests.mock_slaves import (
SlaveTestHelpers,
@@ -42,35 +42,35 @@
class FakeBuildQueue:
"""Pretend `BuildQueue`."""
- def __init__(self, behavior):
- """Pretend to be a BuildQueue item for the given build behavior.
+ def __init__(self, behaviour):
+ """Pretend to be a BuildQueue item for the given build behaviour.
- Copies its builder from the behavior object.
+ Copies its builder from the behaviour object.
"""
- self.builder = behavior._builder
- self.specific_build = behavior.build
+ self.builder = behaviour._builder
+ self.specific_build = behaviour.build
self.date_started = datetime.datetime.now(pytz.UTC)
self.destroySelf = FakeMethod()
-class MakeBehaviorMixin(object):
+class MakeBehaviourMixin(object):
"""Provide common test methods."""
- def makeBehavior(self, branch=None, use_fake_chroot=True, **kwargs):
- """Create a TranslationTemplatesBuildBehavior.
+ def makeBehaviour(self, branch=None, use_fake_chroot=True, **kwargs):
+ """Create a TranslationTemplatesBuildBehaviour.
Anything that might communicate with build slaves and such
(which we can't really do here) is mocked up.
"""
build = self.factory.makeTranslationTemplatesBuild(branch=branch)
- behavior = IBuildFarmJobBehavior(build)
+ behaviour = IBuildFarmJobBehaviour(build)
slave = WaitingSlave(**kwargs)
- behavior.setBuilder(self.factory.makeBuilder(), slave)
+ behaviour.setBuilder(self.factory.makeBuilder(), slave)
if use_fake_chroot:
lf = self.factory.makeLibraryFileAlias()
self.layer.txn.commit()
- behavior._getChroot = lambda: lf
- return behavior
+ behaviour._getChroot = lambda: lf
+ return behaviour
def makeProductSeriesWithBranchForTranslation(self):
productseries = self.factory.makeProductSeries()
@@ -82,43 +82,43 @@
return productseries
-class TestTranslationTemplatesBuildBehavior(
- TestCaseWithFactory, MakeBehaviorMixin):
- """Test `TranslationTemplatesBuildBehavior`."""
+class TestTranslationTemplatesBuildBehaviour(
+ TestCaseWithFactory, MakeBehaviourMixin):
+ """Test `TranslationTemplatesBuildBehaviour`."""
layer = LaunchpadZopelessLayer
run_tests_with = AsynchronousDeferredRunTest
def setUp(self):
- super(TestTranslationTemplatesBuildBehavior, self).setUp()
+ super(TestTranslationTemplatesBuildBehaviour, self).setUp()
self.slave_helper = self.useFixture(SlaveTestHelpers())
def test_getLogFileName(self):
# Each job has a unique log file name.
- b1 = self.makeBehavior()
- b2 = self.makeBehavior()
+ b1 = self.makeBehaviour()
+ b2 = self.makeBehaviour()
self.assertNotEqual(b1.getLogFileName(), b2.getLogFileName())
def test_dispatchBuildToSlave_no_chroot_fails(self):
# dispatchBuildToSlave will fail if the chroot does not exist.
- behavior = self.makeBehavior(use_fake_chroot=False)
+ behaviour = self.makeBehaviour(use_fake_chroot=False)
switch_dbuser(config.builddmaster.dbuser)
self.assertRaises(
- CannotBuild, behavior.dispatchBuildToSlave, None,
+ CannotBuild, behaviour.dispatchBuildToSlave, None,
logging)
def test_dispatchBuildToSlave(self):
# dispatchBuildToSlave ultimately causes the slave's build
# method to be invoked. The slave receives the URL of the
# branch it should build from.
- behavior = self.makeBehavior()
+ behaviour = self.makeBehaviour()
switch_dbuser(config.builddmaster.dbuser)
- d = behavior.dispatchBuildToSlave(FakeBuildQueue(behavior), logging)
+ d = behaviour.dispatchBuildToSlave(FakeBuildQueue(behaviour), logging)
def got_dispatch((status, info)):
# call_log lives on the mock WaitingSlave and tells us what
# calls to the slave that the behaviour class made.
- call_log = behavior._slave.call_log
+ call_log = behaviour._slave.call_log
build_params = call_log[-1]
self.assertEqual('build', build_params[0])
build_type = build_params[2]
@@ -127,7 +127,7 @@
# The slave receives the public http URL for the branch.
self.assertEqual(
branch_url,
- behavior.build.branch.composePublicURL())
+ behaviour.build.branch.composePublicURL())
return d.addCallback(got_dispatch)
def test_getChroot(self):
@@ -142,18 +142,18 @@
fake_chroot_file = getUtility(ILibraryFileAliasSet)[1]
distroarchseries.addOrUpdateChroot(fake_chroot_file)
- behavior = self.makeBehavior(use_fake_chroot=False)
- chroot = behavior._getChroot()
+ behaviour = self.makeBehaviour(use_fake_chroot=False)
+ chroot = behaviour._getChroot()
self.assertNotEqual(None, chroot)
self.assertEqual(fake_chroot_file, chroot)
def test_readTarball(self):
- behavior = self.makeBehavior()
- buildqueue = FakeBuildQueue(behavior)
- path = behavior.templates_tarball_path
+ behaviour = self.makeBehaviour()
+ buildqueue = FakeBuildQueue(behaviour)
+ path = behaviour.templates_tarball_path
# Poke the file we're expecting into the mock slave.
- behavior._slave.valid_file_hashes.append(path)
+ behaviour._slave.valid_file_hashes.append(path)
def got_tarball(filename):
tarball = open(filename, 'r')
@@ -164,42 +164,42 @@
tarball.close()
os.remove(filename)
- d = behavior._readTarball(buildqueue, {path: path}, logging)
+ d = behaviour._readTarball(buildqueue, {path: path}, logging)
return d.addCallback(got_tarball)
def test_handleStatus_OK(self):
# Hopefully, a build will succeed and produce a tarball.
- behavior = self.makeBehavior(
+ behaviour = self.makeBehaviour(
filemap={'translation-templates.tar.gz': 'foo'})
- behavior._uploadTarball = FakeMethod()
- queue_item = FakeBuildQueue(behavior)
- slave = behavior._slave
+ behaviour._uploadTarball = FakeMethod()
+ queue_item = FakeBuildQueue(behaviour)
+ slave = behaviour._slave
- d = behavior.dispatchBuildToSlave(queue_item, logging)
+ d = behaviour.dispatchBuildToSlave(queue_item, logging)
def got_dispatch((status, info)):
self.assertEqual(0, queue_item.destroySelf.call_count)
slave_call_log = slave.call_log
self.assertNotIn('clean', slave_call_log)
- self.assertEqual(0, behavior._uploadTarball.call_count)
+ self.assertEqual(0, behaviour._uploadTarball.call_count)
return slave.status_dict()
def got_status(status):
return (
- behavior.handleStatus(
+ behaviour.handleStatus(
queue_item, BuilderInteractor.extractBuildStatus(status),
status),
slave.call_log)
def build_updated(ignored):
- self.assertEqual(BuildStatus.FULLYBUILT, behavior.build.status)
+ self.assertEqual(BuildStatus.FULLYBUILT, behaviour.build.status)
# Log file is stored.
- self.assertIsNotNone(behavior.build.log)
+ self.assertIsNotNone(behaviour.build.log)
slave_call_log = slave.call_log
self.assertEqual(1, queue_item.destroySelf.call_count)
self.assertIn('clean', slave_call_log)
- self.assertEqual(1, behavior._uploadTarball.call_count)
+ self.assertEqual(1, behaviour._uploadTarball.call_count)
d.addCallback(got_dispatch)
d.addCallback(got_status)
@@ -208,11 +208,11 @@
def test_handleStatus_failed(self):
# Builds may also fail (and produce no tarball).
- behavior = self.makeBehavior(state='BuildStatus.FAILEDTOBUILD')
- behavior._uploadTarball = FakeMethod()
- queue_item = FakeBuildQueue(behavior)
- slave = behavior._slave
- d = behavior.dispatchBuildToSlave(queue_item, logging)
+ behaviour = self.makeBehaviour(state='BuildStatus.FAILEDTOBUILD')
+ behaviour._uploadTarball = FakeMethod()
+ queue_item = FakeBuildQueue(behaviour)
+ slave = behaviour._slave
+ d = behaviour.dispatchBuildToSlave(queue_item, logging)
def got_dispatch((status, info)):
# Now that we've dispatched, get the status.
@@ -220,18 +220,18 @@
def got_status(status):
del status['filemap']
- return behavior.handleStatus(
+ return behaviour.handleStatus(
queue_item,
BuilderInteractor.extractBuildStatus(status),
status),
def build_updated(ignored):
- self.assertEqual(BuildStatus.FAILEDTOBUILD, behavior.build.status)
+ self.assertEqual(BuildStatus.FAILEDTOBUILD, behaviour.build.status)
# Log file is stored.
- self.assertIsNotNone(behavior.build.log)
+ self.assertIsNotNone(behaviour.build.log)
self.assertEqual(1, queue_item.destroySelf.call_count)
self.assertIn('clean', slave.call_log)
- self.assertEqual(0, behavior._uploadTarball.call_count)
+ self.assertEqual(0, behaviour._uploadTarball.call_count)
d.addCallback(got_dispatch)
d.addCallback(got_status)
@@ -240,28 +240,28 @@
def test_handleStatus_notarball(self):
# Even if the build status is "OK," absence of a tarball will
- # not faze the Behavior class.
- behavior = self.makeBehavior()
- behavior._uploadTarball = FakeMethod()
- queue_item = FakeBuildQueue(behavior)
- slave = behavior._slave
- d = behavior.dispatchBuildToSlave(queue_item, logging)
+ # not faze the Behaviour class.
+ behaviour = self.makeBehaviour()
+ behaviour._uploadTarball = FakeMethod()
+ queue_item = FakeBuildQueue(behaviour)
+ slave = behaviour._slave
+ d = behaviour.dispatchBuildToSlave(queue_item, logging)
def got_dispatch((status, info)):
return slave.status_dict()
def got_status(status):
del status['filemap']
- return behavior.handleStatus(
+ return behaviour.handleStatus(
queue_item,
BuilderInteractor.extractBuildStatus(status),
status),
def build_updated(ignored):
- self.assertEqual(BuildStatus.FULLYBUILT, behavior.build.status)
+ self.assertEqual(BuildStatus.FULLYBUILT, behaviour.build.status)
self.assertEqual(1, queue_item.destroySelf.call_count)
self.assertIn('clean', slave.call_log)
- self.assertEqual(0, behavior._uploadTarball.call_count)
+ self.assertEqual(0, behaviour._uploadTarball.call_count)
d.addCallback(got_dispatch)
d.addCallback(got_status)
@@ -271,12 +271,12 @@
def test_handleStatus_uploads(self):
productseries = self.makeProductSeriesWithBranchForTranslation()
branch = productseries.branch
- behavior = self.makeBehavior(
+ behaviour = self.makeBehaviour(
branch=branch, filemap={'translation-templates.tar.gz': 'foo'})
- queue_item = FakeBuildQueue(behavior)
- slave = behavior._slave
+ queue_item = FakeBuildQueue(behaviour)
+ slave = behaviour._slave
- d = behavior.dispatchBuildToSlave(queue_item, logging)
+ d = behaviour.dispatchBuildToSlave(queue_item, logging)
def fake_getFile(sum, file):
dummy_tar = os.path.join(
@@ -290,13 +290,13 @@
return slave.status_dict()
def got_status(status):
- return behavior.handleStatus(
+ return behaviour.handleStatus(
queue_item,
BuilderInteractor.extractBuildStatus(status),
status),
def build_updated(ignored):
- self.assertEqual(BuildStatus.FULLYBUILT, behavior.build.status)
+ self.assertEqual(BuildStatus.FULLYBUILT, behaviour.build.status)
entries = getUtility(
ITranslationImportQueue).getAllEntries(target=productseries)
expected_templates = [
@@ -314,14 +314,14 @@
return d
-class TestTTBuildBehaviorTranslationsQueue(
- TestCaseWithFactory, MakeBehaviorMixin):
+class TestTTBuildBehaviourTranslationsQueue(
+ TestCaseWithFactory, MakeBehaviourMixin):
"""Test uploads to the import queue."""
layer = LaunchpadZopelessLayer
def setUp(self):
- super(TestTTBuildBehaviorTranslationsQueue, self).setUp()
+ super(TestTTBuildBehaviourTranslationsQueue, self).setUp()
self.queue = getUtility(ITranslationImportQueue)
self.dummy_tar = os.path.join(
@@ -331,8 +331,8 @@
def test_uploadTarball(self):
# Files from the tarball end up in the import queue.
- behavior = self.makeBehavior()
- behavior._uploadTarball(
+ behaviour = self.makeBehaviour()
+ behaviour._uploadTarball(
self.branch, file(self.dummy_tar).read(), None)
entries = self.queue.getAllEntries(target=self.productseries)
@@ -347,8 +347,8 @@
def test_uploadTarball_approved(self):
# Uploaded template files are automatically approved.
- behavior = self.makeBehavior()
- behavior._uploadTarball(
+ behaviour = self.makeBehaviour()
+ behaviour._uploadTarball(
self.branch, file(self.dummy_tar).read(), None)
entries = self.queue.getAllEntries(target=self.productseries)
@@ -358,8 +358,8 @@
def test_uploadTarball_importer(self):
# Files from the tarball are owned by the branch owner.
- behavior = self.makeBehavior()
- behavior._uploadTarball(
+ behaviour = self.makeBehaviour()
+ behaviour._uploadTarball(
self.branch, file(self.dummy_tar).read(), None)
entries = self.queue.getAllEntries(target=self.productseries)
=== modified file 'setup.cfg'
--- setup.cfg 2009-07-15 20:10:28 +0000
+++ setup.cfg 2014-01-30 15:36:06 +0000
@@ -1,5 +1,5 @@
[easy_install]
-# These settings control the behavior of the bootstrap.py script. They keep
+# These settings control the behaviour of the bootstrap.py script. They keep
# the version of setuptools and zc.buildout found in the download-cache as the
# ones used to make the bin/buildout script. Therefore, if your system Python
# already has setuptools installed, this file will keep the system from going
Follow ups