← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~jml/launchpad/syncUpdate-huh into lp:launchpad

 

Jonathan Lange has proposed merging lp:~jml/launchpad/syncUpdate-huh into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~jml/launchpad/syncUpdate-huh/+merge/66162

Removes syncUpdate. Why not?

(Running tests atm).
-- 
https://code.launchpad.net/~jml/launchpad/syncUpdate-huh/+merge/66162
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jml/launchpad/syncUpdate-huh into lp:launchpad.
=== modified file 'lib/canonical/launchpad/doc/account.txt'
--- lib/canonical/launchpad/doc/account.txt	2011-04-21 10:15:40 +0000
+++ lib/canonical/launchpad/doc/account.txt	2011-06-28 15:11:22 +0000
@@ -212,7 +212,6 @@
 New Accounts are created using the AccountSet.new() method. The account
 rationale and displayname are required.
 
-    >>> from canonical.launchpad.ftests import syncUpdate
     >>> from canonical.launchpad.interfaces.account import (
     ...     AccountCreationRationale)
 
@@ -236,7 +235,6 @@
     >>> passworded_account = account_set.new(
     ...     AccountCreationRationale.OWNER_CREATED_LAUNCHPAD , 'Passworded',
     ...     password=u'clear_password')
-    >>> syncUpdate(passworded_account)
     >>> passworded_account.password == u'clear_password'
     False
 
@@ -246,7 +244,6 @@
     >>> clear_account = account_set.new(
     ...     AccountCreationRationale.OWNER_CREATED_LAUNCHPAD , 'Clear',
     ...     password=u'clear_password', password_is_encrypted=True)
-    >>> syncUpdate(clear_account)
     >>> print clear_account.password
     clear_password
 
@@ -261,7 +258,6 @@
     >>> account = account_set.new(
     ...     AccountCreationRationale.USER_CREATED,
     ...     "Valid Account Test")
-    >>> syncUpdate(account)
     >>> account.status = AccountStatus.ACTIVE
     >>> account.is_valid
     False

=== modified file 'lib/canonical/launchpad/doc/webapp-authorization.txt'
--- lib/canonical/launchpad/doc/webapp-authorization.txt	2010-10-20 01:36:53 +0000
+++ lib/canonical/launchpad/doc/webapp-authorization.txt	2011-06-28 15:11:22 +0000
@@ -60,13 +60,11 @@
 access to private objects.  For instance, the above principal has
 permission to read private and non-private objects (READ_PRIVATE).
 
-    >>> from canonical.launchpad.ftests import syncUpdate
     >>> from lp.bugs.interfaces.bug import IBugSet
     >>> login('test@xxxxxxxxxxxxx')
     >>> bug_1 = getUtility(IBugSet).get(1)
     >>> bug_1.setPrivate(True, sample_person)
     True
-    >>> syncUpdate(bug_1)
     >>> check_permission('launchpad.View', bug_1)
     True
 

=== modified file 'lib/canonical/launchpad/doc/webapp-publication.txt'
--- lib/canonical/launchpad/doc/webapp-publication.txt	2011-05-26 18:56:27 +0000
+++ lib/canonical/launchpad/doc/webapp-publication.txt	2011-06-28 15:11:22 +0000
@@ -906,7 +906,6 @@
 be automatically reverted in a GET request.
 
     >>> from canonical.launchpad.database.emailaddress import EmailAddress
-    >>> from canonical.launchpad.ftests import syncUpdate
     >>> from canonical.launchpad.interfaces.lpstorm import IMasterStore
     >>> from lp.registry.model.person import Person
     >>> login('foo.bar@xxxxxxxxxxxxx')
@@ -920,7 +919,6 @@
     >>> print foo_bar.homepage_content
     None
     >>> foo_bar.homepage_content = 'Montreal'
-    >>> syncUpdate(foo_bar)
 
     >>> request, publication = get_request_and_publication(method='GET')
 
@@ -939,7 +937,6 @@
 
     >>> txn = transaction.begin()
     >>> get_foo_bar_person().homepage_content = 'Darwin'
-    >>> syncUpdate(foo_bar)
 
     >>> request, publication = get_request_and_publication(method='POST')
 
@@ -1195,7 +1192,6 @@
     >>> import pytz
     >>> now = datetime.now(pytz.timezone('UTC'))
     >>> access_token.date_expires = now - timedelta(days=1)
-    >>> syncUpdate(access_token)
     >>> form2 = form.copy()
     >>> form2['oauth_nonce'] = '1764572616e48616d6d65724c61686'
     >>> test_request = LaunchpadTestRequest(form=form2)
@@ -1205,7 +1201,6 @@
     TokenException: Expired token...
 
     >>> access_token.date_expires = now + timedelta(days=1)
-    >>> syncUpdate(access_token)
 
     >>> form2 = form.copy()
     >>> form2['oauth_token'] += 'z'

=== modified file 'lib/canonical/launchpad/ftests/__init__.py'
--- lib/canonical/launchpad/ftests/__init__.py	2011-06-23 13:10:40 +0000
+++ lib/canonical/launchpad/ftests/__init__.py	2011-06-28 15:11:22 +0000
@@ -17,7 +17,6 @@
     'print_date_attribute',
     'set_so_attr',
     'sync',
-    'syncUpdate',
     ]
 
 from canonical.launchpad.ftests._launchpadformharness import (
@@ -27,7 +26,6 @@
     print_date_attribute,
     set_so_attr,
     sync,
-    syncUpdate,
     )
 from canonical.launchpad.ftests.keys_for_tests import (
     decrypt_content,

=== modified file 'lib/canonical/launchpad/ftests/_sqlobject.py'
--- lib/canonical/launchpad/ftests/_sqlobject.py	2010-08-20 20:31:18 +0000
+++ lib/canonical/launchpad/ftests/_sqlobject.py	2011-06-28 15:11:22 +0000
@@ -1,12 +1,13 @@
-# Copyright 2009 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 """Helper functions for testing SQLObjects."""
 
-__all__ = ['print_date_attribute',
-           'set_so_attr',
-           'sync',
-           'syncUpdate']
+__all__ = [
+    'print_date_attribute',
+    'set_so_attr',
+    'sync',
+    ]
 
 from storm.sqlobject import SQLObjectBase as SQLObject
 from zope.security.proxy import (
@@ -30,14 +31,6 @@
         raise TypeError('%r is not an SQLObject' % object)
 
 
-def syncUpdate(object):
-    """Write the object's changes to the database."""
-    if zope_isinstance(object, SQLObject):
-        removeSecurityProxy(object).syncUpdate()
-    else:
-        raise TypeError('%r is not an SQLObject' % object)
-
-
 def set_so_attr(object, colname, value):
     """Set the underlying SQLObject's column value.
 
@@ -62,7 +55,6 @@
     """
     if zope_isinstance(object, SQLObject):
         cls = removeSecurityProxy(object).__class__
-        syncUpdate(object)
         query_template = 'id=%%s AND %s=%%s' % colname
         found_object = cls.selectOne(
             query_template % sqlvalues(object.id, UTC_NOW))

=== modified file 'lib/lp/answers/doc/faq.txt'
--- lib/lp/answers/doc/faq.txt	2011-05-21 19:41:52 +0000
+++ lib/lp/answers/doc/faq.txt	2011-06-28 15:11:22 +0000
@@ -281,9 +281,6 @@
 
     # Flush the faq attribute change.
 
-    >>> from canonical.launchpad.ftests import syncUpdate
-    >>> syncUpdate(fnord_question)
-
     >>> for question in firefox_faq.related_questions:
     ...     print question.title
     Are there Fnords on the web?
@@ -301,7 +298,6 @@
     >>> print other_question.status.title
     Answered
 
-    >>> syncUpdate(other_question)
     >>> for question in firefox_faq.related_questions:
     ...     print question.title
     Firefox loses focus and gets stuck
@@ -317,7 +313,6 @@
 
 After this, only the original question will remain linked to the FAQ.
 
-    >>> syncUpdate(other_question)
     >>> for question in firefox_faq.related_questions:
     ...     print question.title
     Are there Fnords on the web?

=== modified file 'lib/lp/archiveuploader/tests/nascentupload-announcements.txt'
--- lib/lp/archiveuploader/tests/nascentupload-announcements.txt	2011-06-16 10:00:35 +0000
+++ lib/lp/archiveuploader/tests/nascentupload-announcements.txt	2011-06-28 15:11:22 +0000
@@ -128,11 +128,6 @@
     >>> import transaction
     >>> transaction.commit()
 
-Ensure the previous transaction is *really* in the database before the next
-test:
-
-    >>> from canonical.launchpad.ftests import syncUpdate
-    >>> syncUpdate(bar_src.queue_root)
 
 Uploading the same package again will result in a rejection email:
 

=== modified file 'lib/lp/archiveuploader/tests/nascentupload.txt'
--- lib/lp/archiveuploader/tests/nascentupload.txt	2011-06-16 10:00:35 +0000
+++ lib/lp/archiveuploader/tests/nascentupload.txt	2011-06-28 15:11:22 +0000
@@ -387,8 +387,6 @@
 The ed source would be in NEW, so punt it into accepted.
 
     >>> ed_src.queue_root.setAccepted()
-    >>> from canonical.launchpad.ftests import syncUpdate
-    >>> syncUpdate(ed_src.queue_root)
 
 
 Allow uploads missing debian/copyright file
@@ -434,7 +432,6 @@
 Let's reject the upload to avoid confusion during the next tests:
 
     >>> nocopyright_queue.setRejected()
-    >>> syncUpdate(nocopyright_queue)
 
 
 Refuse to ACCEPT duplicated sources
@@ -546,7 +543,6 @@
 Once we have a new queue entry we are able to accept it, step 2:
 
     >>> multibar_src_queue.setAccepted()
-    >>> syncUpdate(multibar_src_queue)
     >>> multibar_src_queue.status.name
     'ACCEPTED'
 

=== modified file 'lib/lp/bugs/browser/tests/bug-views.txt'
--- lib/lp/bugs/browser/tests/bug-views.txt	2011-06-17 21:13:22 +0000
+++ lib/lp/bugs/browser/tests/bug-views.txt	2011-06-28 15:11:22 +0000
@@ -399,10 +399,7 @@
     a dupe of bug #3, then Steve gets indirectly subscribed to bug #3, and
     is presented with the "Edit subscription" link.
 
-    >>> from canonical.launchpad.ftests import syncUpdate
-
     >>> bug_two.markAsDuplicate(bug_three)
-    >>> syncUpdate(bug_two)
 
     >>> bug_menu.subscription().text
     'Edit subscription'
@@ -413,7 +410,6 @@
     Subscribe link initially.
 
     >>> bug_two.markAsDuplicate(None)
-    >>> syncUpdate(bug_two)
 
     >>> login("foo.bar@xxxxxxxxxxxxx")
 
@@ -428,7 +424,6 @@
         <lp.bugs.model.bugsubscription.BugSubscription ...>
 
     >>> bug_two.markAsDuplicate(bug_three)
-    >>> syncUpdate(bug_two)
 
     >>> bug_menu.subscription().text
     'Subscribe'

=== modified file 'lib/lp/bugs/browser/tests/bugs-views.txt'
--- lib/lp/bugs/browser/tests/bugs-views.txt	2010-11-01 15:46:48 +0000
+++ lib/lp/bugs/browser/tests/bugs-views.txt	2011-06-28 15:11:22 +0000
@@ -31,7 +31,6 @@
 in the future.
 
     >>> login('test@xxxxxxxxxxxxx')
-    >>> from canonical.launchpad.ftests import syncUpdate
     >>> from lp.bugs.interfaces.bug import IBugSet
     >>> bug_eight = getUtility(IBugSet).get(8)
     >>> len(bug_eight.bugtasks)
@@ -42,7 +41,6 @@
     ...     bugtask = getUtility(IBugSet).get(bug_id).bugtasks[bugtask_index]
     ...     bugtask.transitionToStatus(
     ...         BugTaskStatus.FIXRELEASED, getUtility(ILaunchBag).user)
-    ...     syncUpdate(bugtask)
     >>> fix_bug(8)
 
 If we fix a few other bugs, these will turn up first in the list. It
@@ -79,7 +77,6 @@
     >>> bug_two = getUtility(IBugSet).get(2)
     >>> bug_two.setPrivate(True, getUtility(ILaunchBag).user)
     True
-    >>> syncUpdate(bug_two)
 
     >>> login('no-priv@xxxxxxxxxxxxx')
     >>> bugs_view = MaloneView(MaloneApplication(), LaunchpadTestRequest())
@@ -120,7 +117,6 @@
     ...         comment='Test bug #%s.' % index))
     ...     bug.bugtasks[0].transitionToStatus(
     ...     BugTaskStatus.FIXRELEASED, getUtility(ILaunchBag).user)
-    ...     syncUpdate(bug.bugtasks[0])
 
     >>> len(bugs_view.getMostRecentlyFixedBugs())
     5

=== modified file 'lib/lp/bugs/browser/tests/special/bugs-fixed-elsewhere.txt'
--- lib/lp/bugs/browser/tests/special/bugs-fixed-elsewhere.txt	2011-03-23 16:28:51 +0000
+++ lib/lp/bugs/browser/tests/special/bugs-fixed-elsewhere.txt	2011-06-28 15:11:22 +0000
@@ -52,11 +52,9 @@
 But if we mark the bug as fixed in the other, the count will increase
 by one.
 
-    >>> from canonical.launchpad.ftests import syncUpdate
     >>> from lp.bugs.interfaces.bugtask import BugTaskStatus
     >>> elsewhere.transitionToStatus(
     ...     BugTaskStatus.FIXRELEASED, getUtility(ILaunchBag).user)
-    >>> syncUpdate(elsewhere)
 
     >>> get_view().bugs_fixed_elsewhere_count
     1L
@@ -88,13 +86,11 @@
     >>> another_bug = filebug(bugtarget, 'Example Bug')
     >>> another_bug.setPrivate(True, getUtility(ILaunchBag).user)
     True
-    >>> syncUpdate(another_bug)
 
     >>> another_elsewhere = getUtility(IBugTaskSet).createTask(
     ...     another_bug, owner=getUtility(ILaunchBag).user, product=evolution)
     >>> another_elsewhere.transitionToStatus(
     ...     BugTaskStatus.FIXRELEASED, getUtility(ILaunchBag).user)
-    >>> syncUpdate(another_elsewhere)
 
     >>> get_view().bugs_fixed_elsewhere_count
     2L
@@ -112,7 +108,6 @@
     >>> login('foo.bar@xxxxxxxxxxxxx')
     >>> another_bug.setPrivate(False, getUtility(ILaunchBag).user)
     True
-    >>> syncUpdate(another_bug)
 
     >>> login('no-priv@xxxxxxxxxxxxx')
     >>> get_view().bugs_fixed_elsewhere_count
@@ -124,7 +119,6 @@
 Bugs that are duplicate of other bugs aren't included in the count.
 
     >>> another_bug.markAsDuplicate(bug)
-    >>> syncUpdate(another_bug)
 
     >>> get_view().bugs_fixed_elsewhere_count
     1L
@@ -141,7 +135,6 @@
     ...     print "Couldn't find a bugtasks for %r" % bugtarget
     >>> bugtask.transitionToStatus(
     ...     BugTaskStatus.FIXRELEASED, getUtility(ILaunchBag).user)
-    >>> syncUpdate(bugtask)
 
     >>> get_view().bugs_fixed_elsewhere_count
     0

=== modified file 'lib/lp/bugs/browser/tests/special/bugtarget-recently-touched-bugs.txt'
--- lib/lp/bugs/browser/tests/special/bugtarget-recently-touched-bugs.txt	2010-08-02 17:48:13 +0000
+++ lib/lp/bugs/browser/tests/special/bugtarget-recently-touched-bugs.txt	2011-06-28 15:11:22 +0000
@@ -12,11 +12,9 @@
 
     >>> import pytz
     >>> from datetime import datetime, timedelta
-    >>> from canonical.launchpad.ftests import syncUpdate
     >>> now = datetime.now(pytz.timezone('UTC'))
     >>> def set_date_updated(bug, minutes_in_future):
     ...     bug.date_last_updated = now + timedelta(minutes=minutes_in_future)
-    ...     syncUpdate(bug)
 
 If we have three bugs with a recent date_last_updated set, they will
 appear in the top of the list.
@@ -52,7 +50,6 @@
 
     >>> bug_c.setPrivate(True, getUtility(ILaunchBag).user)
     True
-    >>> syncUpdate(bug_c)
 
     >>> login('no-priv@xxxxxxxxxxxxx')
     >>> portlet_view = getMultiAdapter(
@@ -81,7 +78,6 @@
 well.
 
     >>> bug_b.markAsDuplicate(bug_c)
-    >>> syncUpdate(bug_b)
 
     >>> for bugtask in portlet_view.getMostRecentlyUpdatedBugTasks()[:2]:
     ...     print bugtask.bug.title

=== modified file 'lib/lp/bugs/doc/bugnotification-sending.txt'
--- lib/lp/bugs/doc/bugnotification-sending.txt	2011-06-15 11:19:21 +0000
+++ lib/lp/bugs/doc/bugnotification-sending.txt	2011-06-28 15:11:22 +0000
@@ -920,10 +920,8 @@
     >>> len(notifications)
     1
 
-    >>> from canonical.launchpad.ftests import syncUpdate
     >>> for notification in notifications:
     ...     notification.date_emailed = datetime.now(pytz.timezone('UTC'))
-    ...     syncUpdate(notification)
 
 
 If we then add a comment to the bug, the subscribers will receive

=== modified file 'lib/lp/bugs/doc/bugtask-expiration.txt'
--- lib/lp/bugs/doc/bugtask-expiration.txt	2011-05-27 19:53:20 +0000
+++ lib/lp/bugs/doc/bugtask-expiration.txt	2011-06-28 15:11:22 +0000
@@ -386,13 +386,11 @@
 If one of the bugs is set to private, anonymous users can no longer see
 it as being marked for expiration.
 
-    >>> from canonical.launchpad.ftests import syncUpdate
     >>> private_bug = ubuntu_bugtask.bug
     >>> private_bug.title
     u'expirable_distro'
     >>> private_bug.setPrivate(True, sample_person)
     True
-    >>> syncUpdate(private_bug)
 
     >>> expirable_bugtasks = bugtaskset.findExpirableBugTasks(
     ...     0, user=None, target=ubuntu)

=== modified file 'lib/lp/bugs/doc/bugtask-find-similar.txt'
--- lib/lp/bugs/doc/bugtask-find-similar.txt	2010-11-05 18:00:24 +0000
+++ lib/lp/bugs/doc/bugtask-find-similar.txt	2011-06-28 15:11:22 +0000
@@ -82,13 +82,11 @@
 the Firefox bug to private, and repeat the search as a user who isn't
 allowed to view it, only the Thunderbird bug will be returned this time.
 
-    >>> from canonical.launchpad.ftests import syncUpdate
     >>> from lp.bugs.interfaces.bug import IBugSet
     >>> login('test@xxxxxxxxxxxxx')
     >>> firefox_svg_bug = getUtility(IBugSet).get(1)
     >>> firefox_svg_bug.setPrivate(True, getUtility(ILaunchBag).user)
     True
-    >>> syncUpdate(firefox_svg_bug)
 
     >>> from canonical.launchpad.webapp.authorization import check_permission
     >>> login('no-priv@xxxxxxxxxxxxx')
@@ -105,7 +103,6 @@
     >>> login('test@xxxxxxxxxxxxx')
     >>> firefox_svg_bug.setPrivate(False, getUtility(ILaunchBag).user)
     True
-    >>> syncUpdate(firefox_svg_bug)
 
 
 == Ordering of search results ==

=== modified file 'lib/lp/bugs/doc/bugtask-package-bugcounts.txt'
--- lib/lp/bugs/doc/bugtask-package-bugcounts.txt	2010-10-09 16:36:22 +0000
+++ lib/lp/bugs/doc/bugtask-package-bugcounts.txt	2011-06-28 15:11:22 +0000
@@ -82,12 +82,10 @@
 If we mark the bug as critical, the open_critical count will increase.
 
     >>> login('foo.bar@xxxxxxxxxxxxx')
-    >>> from canonical.launchpad.ftests import syncUpdate
     >>> from lp.bugs.interfaces.bugtask import BugTaskImportance
     >>> [ubuntu_firefox_bugtask] = bug.bugtasks
     >>> ubuntu_firefox_bugtask.transitionToImportance(
     ...     BugTaskImportance.CRITICAL, getUtility(ILaunchBag).user)
-    >>> syncUpdate(ubuntu_firefox_bugtask)
 
     >>> package_counts = getUtility(IBugTaskSet).getBugCountsForPackages(
     ...     user=None, packages=packages)
@@ -103,7 +101,6 @@
 decrease.
 
     >>> ubuntu_firefox_bugtask.transitionToAssignee(foo_bar)
-    >>> syncUpdate(ubuntu_firefox_bugtask)
 
     >>> package_counts = getUtility(IBugTaskSet).getBugCountsForPackages(
     ...     user=None, packages=packages)
@@ -120,7 +117,6 @@
     >>> from lp.bugs.interfaces.bugtask import BugTaskStatus
     >>> ubuntu_firefox_bugtask.transitionToStatus(
     ...     BugTaskStatus.INPROGRESS, getUtility(ILaunchBag).user)
-    >>> syncUpdate(ubuntu_firefox_bugtask)
 
     >>> package_counts = getUtility(IBugTaskSet).getBugCountsForPackages(
     ...     user=None, packages=packages)
@@ -140,7 +136,6 @@
 
     >>> bug.setPrivate(True, getUtility(ILaunchBag).user)
     True
-    >>> syncUpdate(bug)
 
     >>> no_priv = getUtility(IPersonSet).getByEmail('no-priv@xxxxxxxxxxxxx')
     >>> package_counts = getUtility(IBugTaskSet).getBugCountsForPackages(
@@ -171,7 +166,6 @@
 
     >>> from lp.bugs.interfaces.bug import IBugSet
     >>> bug.markAsDuplicate(getUtility(IBugSet).get(1))
-    >>> syncUpdate(bug)
     >>> package_counts = getUtility(IBugTaskSet).getBugCountsForPackages(
     ...     user=foo_bar, packages=packages)
     >>> print_package_counts(package_counts[1])

=== modified file 'lib/lp/bugs/doc/bugtask-search.txt'
--- lib/lp/bugs/doc/bugtask-search.txt	2011-05-13 16:50:50 +0000
+++ lib/lp/bugs/doc/bugtask-search.txt	2011-06-28 15:11:22 +0000
@@ -98,9 +98,7 @@
 bugs return all of Firefox's bugs.
 
     >>> login('foo.bar@xxxxxxxxxxxxx')
-    >>> from canonical.launchpad.ftests import syncUpdate
     >>> firefox.setBugSupervisor(no_priv, no_priv)
-    >>> syncUpdate(firefox)
 
     >>> found_bugtasks = bugtask_set.search(no_priv_bug_supervisor)
     >>> found_bugtasks.count() == firefox_bugs.count()
@@ -126,7 +124,6 @@
     True
 
     >>> ubuntu.setBugSupervisor(no_priv, no_priv)
-    >>> syncUpdate(ubuntu)
     >>> found_bugtasks = bugtask_set.search(no_priv_bug_supervisor)
     >>> found_bugtasks.count() == firefox_bugs.count() + ubuntu_bugs.count()
     True
@@ -213,7 +210,6 @@
     >>> bug_four.description += (
     ...     '\nThat happens pretty often with the Fnord Highlighter '
     ...     'extension installed.')
-    >>> syncUpdate(bug_four)
 
     >>> found_bugtasks = firefox.searchTasks(text_search)
     >>> for bugtask in found_bugtasks:
@@ -494,7 +490,6 @@
     >>> print bugTaskInfo(bugtask)
     2 1 Mozilla Firefox Firefox does not support SVG
     >>> bugtask.milestone = product_milestone
-    >>> syncUpdate(bugtask)
     >>> params = BugTaskSearchParams(milestone=product_milestone, user=None)
     >>> milestone_tasks = bugtask_set.search(params)
     >>> for bugtask in milestone_tasks:
@@ -517,7 +512,6 @@
     >>> productseries_task = bugtask_set.createTask(
     ...     owner=no_priv, bug=bug_one, productseries=firefox_1_0)
     >>> productseries_task.milestone = product_milestone
-    >>> syncUpdate(productseries_task)
     >>> print bugTaskInfo(productseries_task)
     40 1 Mozilla Firefox 1.0 Firefox does not support SVG
 

=== modified file 'lib/lp/bugs/stories/bugattachments/xx-attachments-to-bug-report.txt'
--- lib/lp/bugs/stories/bugattachments/xx-attachments-to-bug-report.txt	2010-10-18 22:24:59 +0000
+++ lib/lp/bugs/stories/bugattachments/xx-attachments-to-bug-report.txt	2011-06-28 15:11:22 +0000
@@ -21,7 +21,7 @@
 
     >>> import StringIO
     >>> from zope.component import getUtility
-    >>> from canonical.launchpad.ftests import login, logout, syncUpdate
+    >>> from canonical.launchpad.ftests import login, logout
     >>> from canonical.launchpad.webapp.interfaces import ILaunchBag
     >>> from lp.bugs.interfaces.bug import IBugSet
     >>> login("test@xxxxxxxxxxxxx")
@@ -33,8 +33,6 @@
     ...     comment=bug_11.initial_message, filename='test.txt',
     ...     is_patch=False, content_type='text/plain',
     ...     description='sample data')
-    >>> syncUpdate(attachment)
-    >>> syncUpdate(bug_11)
     >>> logout()
 
 ...the first displayed comment shows a link to the attachment, but it
@@ -64,8 +62,6 @@
     ...     comment=bug_11.initial_message, filename='patch.txt',
     ...     is_patch=True, content_type='text/plain',
     ...     description='a patch')
-    >>> syncUpdate(patch_attachment)
-    >>> syncUpdate(bug_11)
     >>> logout()
     >>> browser.open("http://bugs.launchpad.dev/redfish/+bug/11";)
     >>> print extract_text(browser.contents)

=== modified file 'lib/lp/bugs/stories/bugs/xx-bugs-advanced-search-upstream-status.txt'
--- lib/lp/bugs/stories/bugs/xx-bugs-advanced-search-upstream-status.txt	2010-10-25 13:42:57 +0000
+++ lib/lp/bugs/stories/bugs/xx-bugs-advanced-search-upstream-status.txt	2011-06-28 15:11:22 +0000
@@ -38,7 +38,7 @@
 are not included in the report.
 
     >>> from zope.component import getUtility
-    >>> from canonical.launchpad.ftests import login, logout, syncUpdate
+    >>> from canonical.launchpad.ftests import login, logout
     >>> from canonical.launchpad.webapp.interfaces import ILaunchBag
     >>> from lp.bugs.interfaces.bug import IBugSet
     >>> from lp.bugs.interfaces.bugtask import BugTaskStatus
@@ -50,7 +50,6 @@
     ...     if not bugtask.target_uses_malone:
     ...         bugtask.transitionToStatus(
     ...             BugTaskStatus.INVALID, getUtility(ILaunchBag).user)
-    ...         syncUpdate(bugtask)
 
     >>> for bugtask in bug_two.bugtasks:
     ...     print "%s, %s" % (

=== modified file 'lib/lp/bugs/tests/bugtarget-bugcount.txt'
--- lib/lp/bugs/tests/bugtarget-bugcount.txt	2010-10-09 16:36:22 +0000
+++ lib/lp/bugs/tests/bugtarget-bugcount.txt	2011-06-28 15:11:22 +0000
@@ -69,7 +69,6 @@
 If we take a bug that is in one status and changes it to another, the
 former status' count will of course decrease, and the latter's increase.
 
-    >>> from canonical.launchpad.ftests import syncUpdate
     >>> bug = filebug(bugtarget, "Test Bug", status=BugTaskStatus.CONFIRMED)
     >>> Store.of(bug).flush()
     >>> old_counts = bugtarget.getBugCounts(None)
@@ -78,7 +77,6 @@
     ...         break
     >>> bugtask.transitionToStatus(
     ...     BugTaskStatus.INCOMPLETE, getUtility(ILaunchBag).user)
-    >>> syncUpdate(bugtask)
     >>> new_bug_counts = bugtarget.getBugCounts(None)
     >>> print_count_difference(
     ...     new_bug_counts, old_counts, BugTaskStatus.CONFIRMED)
@@ -98,7 +96,6 @@
     >>> old_counts = bugtarget.getBugCounts(None)
     >>> bug.setPrivate(True, getUtility(ILaunchBag).user)
     True
-    >>> syncUpdate(bug)
     >>> sample_person_counts = bugtarget.getBugCounts(
     ...     getUtility(IPersonSet).getByEmail('test@xxxxxxxxxxxxx'))
     >>> nopriv_counts = bugtarget.getBugCounts(
@@ -118,7 +115,6 @@
 
     >>> bug.setPrivate(False, getUtility(ILaunchBag).user)
     True
-    >>> syncUpdate(bug)
 
 == Duplicate Bugs ==
 
@@ -130,7 +126,6 @@
     >>> Store.of(another_bug).flush()
     >>> old_counts = bugtarget.getBugCounts(None)
     >>> another_bug.markAsDuplicate(bug)
-    >>> syncUpdate(another_bug)
     >>> new_counts = bugtarget.getBugCounts(None)
     >>> print_count_difference(
     ...     new_counts, old_counts, BugTaskStatus.NEW)

=== modified file 'lib/lp/code/doc/branch-visibility.txt'
--- lib/lp/code/doc/branch-visibility.txt	2011-05-27 19:53:20 +0000
+++ lib/lp/code/doc/branch-visibility.txt	2011-06-28 15:11:22 +0000
@@ -188,12 +188,6 @@
 
     >>> login('foo.bar@xxxxxxxxxxxxx')
 
-The syncUpdate call is necessary to make sure the database has the
-private flag set correctly for the branch.
-
-    >>> from canonical.launchpad.ftests import syncUpdate
-    >>> syncUpdate(branch)
-
     >>> branch_set = getUtility(IBranchSet)
 
 Anonymous users see just the public branches.

=== modified file 'lib/lp/registry/doc/mailinglist-subscriptions-xmlrpc.txt'
--- lib/lp/registry/doc/mailinglist-subscriptions-xmlrpc.txt	2010-10-18 22:24:59 +0000
+++ lib/lp/registry/doc/mailinglist-subscriptions-xmlrpc.txt	2011-06-28 15:11:22 +0000
@@ -301,8 +301,6 @@
 private before its mailing list is created.
 
     >>> team_three.visibility = PersonVisibility.PRIVATE
-    >>> from canonical.launchpad.ftests import syncUpdate
-    >>> syncUpdate(team_three)
     >>> queryAdapter(team_three, IObjectPrivacy).is_private
     True
 

=== modified file 'lib/lp/registry/doc/mailinglist-subscriptions.txt'
--- lib/lp/registry/doc/mailinglist-subscriptions.txt	2010-10-09 16:36:22 +0000
+++ lib/lp/registry/doc/mailinglist-subscriptions.txt	2011-06-28 15:11:22 +0000
@@ -9,9 +9,6 @@
     # and change their mailing list auto-subscription settings.
     >>> login('foo.bar@xxxxxxxxxxxxx')
 
-    # We'll need this throughout the test script.
-    >>> from canonical.launchpad.ftests import syncUpdate
-
     >>> from lp.registry.tests.mailinglists_helper import (
     ...     get_alternative_email, print_addresses)
     >>> anne = factory.makePersonByName('Anne')
@@ -158,7 +155,6 @@
 
     # Reverse the validation so that it doesn't affect subsequent tests.
     >>> alternative.status = EmailAddressStatus.NEW
-    >>> syncUpdate(alternative)
 
 
 MailingListSubscription objects
@@ -1420,17 +1416,14 @@
     # the security context in order to set it.
     >>> from zope.security.proxy import removeSecurityProxy
     >>> removeSecurityProxy(list_seven).status = MailingListStatus.MODIFIED
-    >>> syncUpdate(list_seven)
     >>> list_seven.subscribe(teri)
     >>> list_seven.unsubscribe(teri)
 
     >>> removeSecurityProxy(list_seven).status = MailingListStatus.UPDATING
-    >>> syncUpdate(list_seven)
     >>> list_seven.subscribe(teri)
     >>> list_seven.unsubscribe(teri)
 
     >>> removeSecurityProxy(list_seven).status = MailingListStatus.MOD_FAILED
-    >>> syncUpdate(list_seven)
     >>> list_seven.subscribe(teri)
     >>> list_seven.unsubscribe(teri)
 
@@ -1439,35 +1432,30 @@
 
     # We don't need to test the INACTIVE state, as that's represented above.
     >>> removeSecurityProxy(list_seven).status = MailingListStatus.REGISTERED
-    >>> syncUpdate(list_seven)
     >>> list_seven.subscribe(teri)
     Traceback (most recent call last):
     ...
     CannotSubscribe: Mailing list is not usable: Team 7
 
     >>> removeSecurityProxy(list_seven).status = MailingListStatus.APPROVED
-    >>> syncUpdate(list_seven)
     >>> list_seven.subscribe(teri)
     Traceback (most recent call last):
     ...
     CannotSubscribe: Mailing list is not usable: Team 7
 
     >>> removeSecurityProxy(list_seven).status = MailingListStatus.DECLINED
-    >>> syncUpdate(list_seven)
     >>> list_seven.subscribe(teri)
     Traceback (most recent call last):
     ...
     CannotSubscribe: Mailing list is not usable: Team 7
 
     >>> removeSecurityProxy(list_seven).status = MailingListStatus.CONSTRUCTING
-    >>> syncUpdate(list_seven)
     >>> list_seven.subscribe(teri)
     Traceback (most recent call last):
     ...
     CannotSubscribe: Mailing list is not usable: Team 7
 
     >>> removeSecurityProxy(list_seven).status = MailingListStatus.FAILED
-    >>> syncUpdate(list_seven)
     >>> list_seven.subscribe(teri)
     Traceback (most recent call last):
     ...
@@ -1475,7 +1463,6 @@
 
     >>> removeSecurityProxy(list_seven).status = (
     ...     MailingListStatus.DEACTIVATING)
-    >>> syncUpdate(list_seven)
     >>> list_seven.subscribe(teri)
     Traceback (most recent call last):
     ...

=== modified file 'lib/lp/registry/doc/message-holds.txt'
--- lib/lp/registry/doc/message-holds.txt	2011-05-13 16:50:50 +0000
+++ lib/lp/registry/doc/message-holds.txt	2011-06-28 15:11:22 +0000
@@ -150,8 +150,6 @@
     >>> print owner.displayname
     No Privileges Person
     >>> held_message.approve(owner)
-    >>> from canonical.launchpad.ftests import syncUpdate
-    >>> syncUpdate(held_message)
 
 This sets the status of the hold to APPROVAL_PENDING because Mailman
 still needs to see this approval.
@@ -183,7 +181,6 @@
     ... """)
     >>> held_message = list_one.holdMessage(message)
     >>> held_message.reject(owner)
-    >>> syncUpdate(held_message)
 
     >>> print held_message.message_id
     <second-post>
@@ -211,7 +208,6 @@
     ... """)
     >>> held_message = list_one.holdMessage(message)
     >>> held_message.discard(owner)
-    >>> syncUpdate(held_message)
 
     >>> print held_message.message_id
     <third-post>

=== modified file 'lib/lp/registry/doc/milestone.txt'
--- lib/lp/registry/doc/milestone.txt	2011-01-20 17:05:12 +0000
+++ lib/lp/registry/doc/milestone.txt	2011-06-28 15:11:22 +0000
@@ -230,7 +230,6 @@
 A project milestone is active, if at least one product milestone with
 the same name is active.
 
-    >>> from canonical.launchpad.ftests import syncUpdate
     >>> print applets_1_1.active, evolution_1_1.active
     True True
 
@@ -238,12 +237,10 @@
     True
 
     >>> applets_1_1.active = False
-    >>> syncUpdate(applets_1_1)
     >>> print gnome.getMilestone('1.1').active
     True
 
     >>> evolution_1_1.active = False
-    >>> syncUpdate(evolution_1_1)
     >>> print gnome.getMilestone('1.1').active
     False
 
@@ -258,14 +255,12 @@
     >>> from lp.testing import unlink_source_packages
     >>> unlink_source_packages(netapplet)
     >>> netapplet.active = False
-    >>> syncUpdate(netapplet)
     >>> print [milestone.name for milestone in gnome.milestones]
     []
 
     # Reset the product back to original status so future tests pass.
 
     >>> netapplet.active = True
-    >>> syncUpdate(netapplet)
 
 The dateexpected attribute is set to the minimum of the dateexpected
 values of the product milestones.
@@ -278,12 +273,10 @@
 
     >>> from datetime import datetime
     >>> applets_1_1.dateexpected = datetime(2007, 4, 2)
-    >>> syncUpdate(applets_1_1)
     >>> print gnome.getMilestone('1.1').dateexpected
     2007-04-02 00:00:00
 
     >>> evolution_1_1.dateexpected = datetime(2007, 4, 1)
-    >>> syncUpdate(evolution_1_1)
     >>> print gnome.getMilestone('1.1').dateexpected
     2007-04-01 00:00:00
 

=== modified file 'lib/lp/registry/doc/person.txt'
--- lib/lp/registry/doc/person.txt	2011-06-06 19:39:45 +0000
+++ lib/lp/registry/doc/person.txt	2011-06-28 15:11:22 +0000
@@ -339,8 +339,6 @@
     >>> from lp.registry.interfaces.person import PersonalStanding
     >>> lifeless.personal_standing = PersonalStanding.GOOD
     >>> lifeless.personal_standing_reason = 'Such a cool guy!'
-    >>> from canonical.launchpad.ftests import syncUpdate
-    >>> syncUpdate(lifeless)
 
     >>> lifeless.personal_standing
     <DBItem PersonalStanding.GOOD...

=== modified file 'lib/lp/registry/doc/product.txt'
--- lib/lp/registry/doc/product.txt	2011-05-12 18:25:06 +0000
+++ lib/lp/registry/doc/product.txt	2011-06-28 15:11:22 +0000
@@ -585,8 +585,6 @@
 Only active products are returned.
 
     >>> evo.active = False
-    >>> from canonical.launchpad.ftests import syncUpdate
-    >>> syncUpdate(firefox)
     >>> for product in productset.getProductsWithBranches():
     ...     print product.name
     firefox

=== modified file 'lib/lp/registry/doc/projectgroup.txt'
--- lib/lp/registry/doc/projectgroup.txt	2010-12-21 23:57:23 +0000
+++ lib/lp/registry/doc/projectgroup.txt	2011-06-28 15:11:22 +0000
@@ -248,12 +248,10 @@
 If a specification is assigned to series 1.0, it appears in
 mozilla_1_0_series.all_specifications.
 
-    >>> from canonical.launchpad.ftests import syncUpdate
     >>> filter = [SpecificationFilter.INFORMATIONAL]
     >>> extension_manager_upgrades = mozilla.specifications(filter=filter)[0]
     >>> series_1_0 = firefox.getSeries('1.0')
     >>> extension_manager_upgrades.proposeGoal(series_1_0, no_priv)
-    >>> syncUpdate(extension_manager_upgrades)
     >>> for spec in mozilla_series_1_0.all_specifications:
     ...     print spec.name
     extension-manager-upgrades
@@ -275,7 +273,6 @@
 
     >>> for spec in mozilla.all_specifications:
     ...     spec.proposeGoal(series_1_0, no_priv)
-    ...     syncUpdate(spec)
 
 we have the save five incomplete specs in the series 1.0 as we have for the
 project itself.
@@ -304,7 +301,6 @@
 
     >>> firefox = getUtility(IProductSet).getByName('firefox')
     >>> firefox.active = False
-    >>> syncUpdate(firefox)
     >>> filter = [SpecificationFilter.INCOMPLETE]
     >>> mozilla_series_1_0.specifications(filter=filter).count()
     0
@@ -312,7 +308,6 @@
 Reset firefox so we don't mess up later tests.
 
     >>> firefox.active = True
-    >>> syncUpdate(firefox)
 
 We can get all the specifications via the all_specifications property,
 and all valid specifications via the valid_specifications property:

=== modified file 'lib/lp/registry/doc/sourcepackage.txt'
--- lib/lp/registry/doc/sourcepackage.txt	2011-06-23 13:02:23 +0000
+++ lib/lp/registry/doc/sourcepackage.txt	2011-06-28 15:11:22 +0000
@@ -131,13 +131,11 @@
     >>> from lp.soyuz.model.component import Component
     >>> from lp.soyuz.model.publishing import (
     ...     SourcePackagePublishingHistory)
-    >>> from canonical.launchpad.ftests import syncUpdate
 
     >>> latest_publishing = SourcePackagePublishingHistory.get(
     ...     publishing_history[-1].id)
     >>> universe = Component.byName('universe')
     >>> latest_publishing.component = universe
-    >>> syncUpdate(latest_publishing)
     >>> flush_database_caches()
 
     >>> for release in firefox_warty.distinctreleases:
@@ -153,7 +151,6 @@
     >>> from lp.soyuz.enums import PackagePublishingStatus
 
     >>> latest_publishing.status = PackagePublishingStatus.SUPERSEDED
-    >>> syncUpdate(latest_publishing)
     >>> print firefox_warty.latest_published_component
     None
 
@@ -191,7 +188,6 @@
 
     >>> from datetime import timedelta
     >>> pub.dateremoved = pub.datesuperseded + timedelta(days=1)
-    >>> syncUpdate(pub)
 
     >>> for release in pmount_hoary.releases:
     ...     print release.title, release.publishing_history[0].status.name

=== modified file 'lib/lp/registry/doc/standing.txt'
--- lib/lp/registry/doc/standing.txt	2011-05-13 16:50:50 +0000
+++ lib/lp/registry/doc/standing.txt	2011-06-28 15:11:22 +0000
@@ -15,13 +15,12 @@
     ...     IPersonSet,
     ...     PersonalStanding,
     ...     )
-    >>> from canonical.launchpad.ftests import sync, syncUpdate
+    >>> from canonical.launchpad.ftests import sync
 
     >>> person_set = getUtility(IPersonSet)
     >>> lifeless = person_set.getByName('lifeless')
     >>> lifeless.personal_standing = PersonalStanding.UNKNOWN
     >>> lifeless.personal_standing_reason = ''
-    >>> syncUpdate(lifeless)
 
     # A unique Message-ID generator.
     >>> from itertools import count
@@ -53,7 +52,6 @@
     >>> def lifeless_post(to_team_name):
     ...     return post_message('robertc@xxxxxxxxxxxxxxxxx', to_team_name)
 
-    >>> import logging
     >>> from lp.registry.scripts.standing import (
     ...     UpdatePersonalStanding)
     >>> from canonical.config import config

=== modified file 'lib/lp/registry/doc/teammembership.txt'
--- lib/lp/registry/doc/teammembership.txt	2011-05-31 03:49:23 +0000
+++ lib/lp/registry/doc/teammembership.txt	2011-06-28 15:11:22 +0000
@@ -796,8 +796,6 @@
     >>> login_person(karl)
     >>> karl.renewTeamMembership(mirror_admins)
 
-    >>> from canonical.launchpad.ftests import syncUpdate
-    >>> syncUpdate(karl_on_mirroradmins)
 
 Now the membership can't be renewed by the member as it's not going to
 expire soon.

=== modified file 'lib/lp/registry/tests/test_commercialprojects_vocabularies.py'
--- lib/lp/registry/tests/test_commercialprojects_vocabularies.py	2010-10-04 19:50:45 +0000
+++ lib/lp/registry/tests/test_commercialprojects_vocabularies.py	2011-06-28 15:11:22 +0000
@@ -17,7 +17,6 @@
     ANONYMOUS,
     login,
     logout,
-    syncUpdate,
     )
 from canonical.launchpad.interfaces.emailaddress import EmailAddressStatus
 from canonical.testing.layers import LaunchpadFunctionalLayer
@@ -56,13 +55,11 @@
                                          licenses=[License.OTHER_PROPRIETARY])
             naked_widget = removeSecurityProxy(widget)
             naked_widget.owner = self.owner
-            syncUpdate(naked_widget)
         # Create an open source project with a GNU license.
         widget = factory.makeProduct(name='openwidget',
                                      licenses=[License.GNU_GPL_V3])
         naked_widget = removeSecurityProxy(widget)
         naked_widget.owner = self.owner
-        syncUpdate(naked_widget)
 
     def test_emptySearch(self):
         """An empty search should return all commercial projects."""
@@ -119,7 +116,6 @@
         widget = getUtility(IProductSet).getByName(project_name)
         naked_widget = removeSecurityProxy(widget)
         naked_widget.licenses = [License.GNU_GPL_V3]
-        syncUpdate(naked_widget)
 
         # The project is no longer commercial so it is not found.
         results = self.vocab.searchForTerms(project_name)

=== modified file 'lib/lp/registry/tests/test_product.py'
--- lib/lp/registry/tests/test_product.py	2011-03-07 19:05:44 +0000
+++ lib/lp/registry/tests/test_product.py	2011-06-28 15:11:22 +0000
@@ -11,7 +11,6 @@
 import pytz
 import transaction
 
-from canonical.launchpad.ftests import syncUpdate
 from canonical.launchpad.testing.pages import (
     find_main_content,
     get_feedback_messages,
@@ -250,7 +249,6 @@
                          (License.ACADEMIC, License.AFFERO))
         product_license = ProductLicense(
             product=self.product, license=License.PYTHON)
-        syncUpdate(product_license)
         # Cache doesn't see new value.
         self.assertEqual(self.product.licenses,
                          (License.ACADEMIC, License.AFFERO))
@@ -262,7 +260,6 @@
         transaction.abort()
         product_license = ProductLicense(
             product=self.product, license=License.MIT)
-        syncUpdate(product_license)
         self.assertEqual(self.product.licenses,
                          (License.ACADEMIC, License.AFFERO, License.MIT))
 
@@ -278,8 +275,6 @@
             purchaser=self.product.owner,
             sales_system_id='foo',
             whiteboard='bar')
-        # Cache does not see the change to the database.
-        syncUpdate(subscription)
         self.assertEqual(self.product.commercial_subscription, None)
         self.product.redeemSubscriptionVoucher(
             'hello', self.product.owner, self.product.owner, 1)
@@ -299,7 +294,6 @@
             purchaser=self.product.owner,
             sales_system_id='new',
             whiteboard='')
-        syncUpdate(subscription)
         # Cache is cleared and it sees database changes that occur
         # before the cache is populated.
         self.assertEqual(self.product.commercial_subscription.sales_system_id,

=== modified file 'lib/lp/registry/tests/test_project_milestone.py'
--- lib/lp/registry/tests/test_project_milestone.py	2010-11-01 03:32:29 +0000
+++ lib/lp/registry/tests/test_project_milestone.py	2011-06-28 15:11:22 +0000
@@ -14,7 +14,6 @@
 
 from canonical.launchpad.ftests import (
     login,
-    syncUpdate,
     )
 from canonical.launchpad.webapp.errorlog import globalErrorUtility
 from canonical.testing.layers import (
@@ -140,12 +139,10 @@
         self.assertEqual(gnome_milestone.dateexpected, None)
 
         evolution_milestone.dateexpected = datetime(2007, 4, 2)
-        syncUpdate(evolution_milestone)
         gnome_milestone = gnome.getMilestone('1.1')
         self.assertEqual(gnome_milestone.dateexpected, datetime(2007, 4, 2))
 
         gnomebaker_milestone.dateexpected = datetime(2007, 4, 1)
-        syncUpdate(gnomebaker_milestone)
         gnome_milestone = gnome.getMilestone('1.1')
         self.assertEqual(gnome_milestone.dateexpected, datetime(2007, 4, 1))
 
@@ -164,12 +161,10 @@
         self.assertEqual(gnome_milestone.active, True)
 
         gnomebaker_milestone.active = False
-        syncUpdate(gnomebaker_milestone)
         gnome_milestone = gnome.getMilestone('1.1')
         self.assertEqual(gnome_milestone.active, True)
 
         evolution_milestone.active = False
-        syncUpdate(evolution_milestone)
         gnome_milestone = gnome.getMilestone('1.1')
         self.assertEqual(gnome_milestone.active, False)
 
@@ -216,7 +211,6 @@
             owner=sample_person,
             product=product)
         spec.milestone = product.getMilestone(milestone_name)
-        syncUpdate(spec)
         return spec
 
     def test_milestone_specifications(self):
@@ -254,7 +248,6 @@
         bug = product.createBug(params)
         [bugtask] = bug.bugtasks
         bugtask.milestone = milestone
-        syncUpdate(bugtask)
 
     def _createProductSeriesBugtask(self, product_name, product_series_name,
                                     milestone_name):
@@ -275,7 +268,6 @@
         for bugtask in bug.bugtasks:
             if bugtask.productseries is not None:
                 bugtask.milestone = milestone
-                syncUpdate(bugtask)
 
     def test_milestone_bugtasks(self):
         """Bugtasks and project milestones.
@@ -310,7 +302,6 @@
         gnomebaker_milestone = self.createProductMilestone(
             '1.2', 'gnomebaker', datetime(2011, 4, 2))
         gnomebaker_milestone.active = False
-        syncUpdate(gnomebaker_milestone)
 
         evolution_milestone = self.createProductMilestone(
             '1.3', 'evolution', datetime(2012, 4, 1))
@@ -318,8 +309,6 @@
         gnomebaker_milestone = self.createProductMilestone(
             '1.3', 'gnomebaker', datetime(2012, 4, 2))
         gnomebaker_milestone.active = False
-        syncUpdate(evolution_milestone)
-        syncUpdate(gnomebaker_milestone)
 
         self.createSpecification('1.1', 'evolution')
         self.createSpecification('1.1', 'gnomebaker')

=== modified file 'lib/lp/services/memcache/doc/restful-cache.txt'
--- lib/lp/services/memcache/doc/restful-cache.txt	2010-11-27 23:10:17 +0000
+++ lib/lp/services/memcache/doc/restful-cache.txt	2011-06-28 15:11:22 +0000
@@ -90,8 +90,6 @@
 cache.
 
     >>> person.homepage_content = "Whatever"
-    >>> from canonical.launchpad.ftests import syncUpdate
-    >>> syncUpdate(person)
 
     >>> print cache.get(person, json_type, "beta", default="missing")
     missing

=== modified file 'lib/lp/soyuz/doc/archive-dependencies.txt'
--- lib/lp/soyuz/doc/archive-dependencies.txt	2011-06-11 00:49:33 +0000
+++ lib/lp/soyuz/doc/archive-dependencies.txt	2011-06-28 15:11:22 +0000
@@ -90,7 +90,6 @@
 A proper name for this "model" would be 'cross-component-dependency'.
 
     >>> from canonical.database.sqlbase import flush_database_caches
-    >>> from canonical.launchpad.ftests import syncUpdate
     >>> from lp.soyuz.interfaces.component import IComponentSet
 
     >>> ubuntu_components = [
@@ -108,7 +107,6 @@
     ...     for component in ubuntu_components:
     ...         component = getUtility(IComponentSet)[component]
     ...         ogre_pub.component = component
-    ...         syncUpdate(ogre_pub)
     ...         flush_database_caches()
     ...         components_term = " ".join(
     ...             get_components_for_context(
@@ -137,7 +135,6 @@
 
     >>> naked_build = removeSecurityProxy(ogre_build)
     >>> naked_build.pocket = PackagePublishingPocket.BACKPORTS
-    >>> syncUpdate(ogre_build)
 
 Ultimately, it means that a build targeted to the BACKPORTS pocket
 will behave as if it were published in the multiverse component,

=== modified file 'lib/lp/soyuz/doc/buildd-queuebuilder-lookup.txt'
--- lib/lp/soyuz/doc/buildd-queuebuilder-lookup.txt	2010-08-24 15:29:01 +0000
+++ lib/lp/soyuz/doc/buildd-queuebuilder-lookup.txt	2011-06-28 15:11:22 +0000
@@ -42,14 +42,12 @@
 
 Creating a single source publishing record:
 
-    >>> from canonical.launchpad.ftests import syncUpdate
     >>> def create_publication(distroseries, pocket, archive, status):
-    ...     pub = SourcePackagePublishingHistory(
+    ...     SourcePackagePublishingHistory(
     ...         sourcepackagerelease=the_spr, component=the_spr.component,
     ...         section=the_spr.section, datecreated=UTC_NOW,
     ...         distroseries=distroseries, status=status,
     ...         pocket=pocket, archive=archive)
-    ...     syncUpdate(pub)
 
 Create a collection of source publishing records in different
 archives, pockets and statuses. This function creates:

=== modified file 'lib/lp/soyuz/doc/distribution.txt'
--- lib/lp/soyuz/doc/distribution.txt	2011-06-10 20:23:19 +0000
+++ lib/lp/soyuz/doc/distribution.txt	2011-06-28 15:11:22 +0000
@@ -167,8 +167,6 @@
 Neither in UNAPPROVED:
 
     >>> queue.setUnapproved()
-    >>> from canonical.launchpad.ftests import syncUpdate
-    >>> syncUpdate(queue)
     >>> queue.status.name
     'UNAPPROVED'
 
@@ -178,7 +176,6 @@
 Only records in ACCEPTED does:
 
     >>> queue.setAccepted()
-    >>> syncUpdate(queue)
     >>> queue.status.name
     'ACCEPTED'
 
@@ -190,7 +187,6 @@
 Records in DONE also do not trigger pending-acceptance state in PPAs:
 
     >>> queue.setDone()
-    >>> syncUpdate(queue)
     >>> queue.status.name
     'DONE'
 

=== modified file 'lib/lp/soyuz/doc/distroseriesqueue.txt'
--- lib/lp/soyuz/doc/distroseriesqueue.txt	2011-06-24 09:41:05 +0000
+++ lib/lp/soyuz/doc/distroseriesqueue.txt	2011-06-28 15:11:22 +0000
@@ -304,7 +304,6 @@
 
 Performing full acceptance:
 
-    >>> from canonical.launchpad.ftests import syncUpdate
     >>> items = breezy_autotest.getPackageUploads(PackageUploadStatus.NEW)
     >>> for item in items:
     ...      try:
@@ -313,7 +312,6 @@
     ...          print item.displayname, e
     ...      else:
     ...          print item.displayname, item.status.name
-    ...      syncUpdate(item)
     netapplet-1.0.0.tar.gz ACCEPTED
     netapplet-1.0.0.tar.gz ACCEPTED
     alsa-utils ACCEPTED
@@ -328,7 +326,6 @@
     >>> for item in items:
     ...     item.setNew()
     ...     print item.displayname, item.status.name
-    ...     syncUpdate(item)
     netapplet-1.0.0.tar.gz NEW
     netapplet-1.0.0.tar.gz NEW
     alsa-utils NEW

=== modified file 'lib/lp/soyuz/doc/queuebuilder.txt'
--- lib/lp/soyuz/doc/queuebuilder.txt	2010-12-24 15:52:56 +0000
+++ lib/lp/soyuz/doc/queuebuilder.txt	2011-06-28 15:11:22 +0000
@@ -274,9 +274,7 @@
 publications in PPA context are ignored; they don't result in any
 build nor a misleading error in determineArchitectureToBuild.
 
-    >>> from canonical.launchpad.ftests import syncUpdate
     >>> breezy_autotest_i386.supports_virtualized = False
-    >>> syncUpdate(breezy_autotest_i386)
 
     >>> pub_breezy_autotest_ppa = test_publisher.getPubSource(
     ...     sourcename='test-no-ppa-support', version='999',

=== modified file 'lib/lp/soyuz/doc/soyuz-set-of-uploads.txt'
--- lib/lp/soyuz/doc/soyuz-set-of-uploads.txt	2011-06-25 14:39:47 +0000
+++ lib/lp/soyuz/doc/soyuz-set-of-uploads.txt	2011-06-28 15:11:22 +0000
@@ -161,7 +161,6 @@
     >>> from zope.component import getUtility
     >>> from canonical.launchpad.ftests import (
     ...     login,
-    ...     syncUpdate,
     ...     )
     >>> from lp.registry.interfaces.distribution import IDistributionSet
 
@@ -174,7 +173,6 @@
     ...            status=PackageUploadStatus.ACCEPTED)
     ...         for item in items:
     ...             item.realiseUpload()
-    ...             syncUpdate(item)
 
 
 If an upload of ours ends up in the NEW queue, we need a way to process
@@ -188,12 +186,10 @@
     ...     items = dr.getPackageUploads(status=PackageUploadStatus.NEW)
     ...     for item in items:
     ...         item.setAccepted()
-    ...         syncUpdate(item)
     ...     items = dr.getPackageUploads(
     ...         status=PackageUploadStatus.UNAPPROVED)
     ...     for item in items:
     ...         item.setAccepted()
-    ...         syncUpdate(item)
 
 Finally, as a very simplistic publishing process, we may need to punt any
 given upload into the published state, so here's a very simplistic publisher
@@ -223,12 +219,10 @@
     ...     for src in srcs_to_publish:
     ...         src.status = PPS.PUBLISHED
     ...         src.datepublished = UTC_NOW
-    ...         syncUpdate(src)
     ...         published_one = True
     ...     for bin in bins_to_publish:
     ...         bin.status = PPS.PUBLISHED
     ...         bin.datepublished = UTC_NOW
-    ...         syncUpdate(bin)
     ...         published_one = True
     ...     return published_one
 
@@ -322,7 +316,6 @@
     >>> from lp.registry.interfaces.person import IPersonSet
     >>> name16 = getUtility(IPersonSet).getByName('name16')
     >>> name16.displayname = "Foo B. Bar"
-    >>> syncUpdate(name16)
 
 Check the email recipient for displayname containing special chars,
 '.', must be rfc2047 compliant:
@@ -363,7 +356,6 @@
 Revert changes:
 
     >>> name16.displayname = "Foo Bar"
-    >>> syncUpdate(name16)
 
 Check if we forcibly add the changer as recipient for "sync" uploads,
 which contains unsigned changesfile. Ensure it sends email to the

=== modified file 'lib/lp/soyuz/stories/soyuz/xx-package-diff.txt'
--- lib/lp/soyuz/stories/soyuz/xx-package-diff.txt	2011-03-03 00:43:44 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-package-diff.txt	2011-06-28 15:11:22 +0000
@@ -98,7 +98,6 @@
     >>> from zope.security.proxy import removeSecurityProxy
     >>> from StringIO import StringIO
     >>> from canonical.database.constants import UTC_NOW
-    >>> from canonical.launchpad.ftests import syncUpdate
     >>> from canonical.librarian.interfaces import ILibrarianClient
     >>> from lp.soyuz.enums import PackageDiffStatus
 
@@ -108,7 +107,6 @@
     ...     naked_diff.status = PackageDiffStatus.COMPLETED
     ...     naked_diff.diff_content = getUtility(ILibrarianClient).addFile(
     ...         filename, 3, StringIO('Foo'), 'application/gzipped-patch')
-    ...     syncUpdate(diff)
 
     >>> perform_fake_diff(diff_one, 'biscuit_1.0-1_1.0-2.diff.gz')
 

=== modified file 'lib/lp/soyuz/tests/soyuz.py'
--- lib/lp/soyuz/tests/soyuz.py	2010-11-06 12:50:22 +0000
+++ lib/lp/soyuz/tests/soyuz.py	2011-06-28 15:11:22 +0000
@@ -18,7 +18,6 @@
 from canonical.launchpad.database.librarian import LibraryFileAlias
 from canonical.launchpad.ftests import (
     import_public_test_keys,
-    syncUpdate,
     )
 from canonical.launchpad.testing.fakepackager import FakePackager
 from canonical.testing.layers import LaunchpadZopelessLayer
@@ -104,7 +103,6 @@
                 pocket=pocket)
             # Flush the object changes into DB do guarantee stable database
             # ID order as expected in the callsites.
-            syncUpdate(pub)
             sample_pub.append(pub)
         return sample_pub
 
@@ -129,7 +127,6 @@
                 pocket=pocket)
             # Flush the object changes into DB do guarantee stable database
             # ID order as expected in the callsites.
-            syncUpdate(pub)
             sample_pub.append(pub)
         return sample_pub
 

=== modified file 'lib/lp/translations/doc/translationimportqueue.txt'
--- lib/lp/translations/doc/translationimportqueue.txt	2011-05-27 19:53:20 +0000
+++ lib/lp/translations/doc/translationimportqueue.txt	2011-06-28 15:11:22 +0000
@@ -39,7 +39,7 @@
     >>> from lp.registry.model.distroseries import DistroSeries
     >>> from lp.registry.model.productseries import ProductSeries
     >>> from lp.registry.model.sourcepackagename import SourcePackageName
-    >>> from canonical.launchpad.ftests import login, syncUpdate
+    >>> from canonical.launchpad.ftests import login
 
     >>> translationimportqueue = getUtility(ITranslationImportQueue)
     >>> rosetta_experts = getUtility(ILaunchpadCelebrities).rosetta_experts
@@ -1056,7 +1056,6 @@
 Administrators temporarily block translation imports to Warty.
 
     >>> warty_distroseries.defer_translation_imports = True
-    >>> syncUpdate(warty_distroseries)
 
 While imports are blocked, Warty does not show up as having pending
 imports.
@@ -1073,7 +1072,6 @@
     >>> from lp.testing import unlink_source_packages
     >>> unlink_source_packages(firefox)
     >>> firefox.active = False
-    >>> syncUpdate(firefox)
 
 Now that Firefox is inactive, it no longer shows up as having pending
 imports.
@@ -1086,7 +1084,6 @@
 Firefox active again.
 
     >>> firefox.active = True
-    >>> syncUpdate(firefox)
 
 The import request for Firefox was not removed, so Firefox is listed as
 having pending imports again.
@@ -1586,14 +1583,11 @@
     >>> jokosher = productset['jokosher']
     >>> jokosher_trunk = jokosher.getSeries('trunk')
     >>> jokosher.translations_usage = ServiceUsage.LAUNCHPAD
-    >>> syncUpdate(jokosher)
     >>> jokosher_subset = potemplateset.getSubset(
     ...     productseries=jokosher_trunk)
     >>> template = jokosher_subset.new(
     ...     'jokosher', 'jokosher', 'jokosher.pot', rosetta_experts)
-    >>> syncUpdate(template)
     >>> entry = create_product_request('jokosher', 'jokosher')
-    >>> syncUpdate(entry)
     >>> print_queue_entries(translationimportqueue)
     jokosher    | jokosher    | messages.pot
 
@@ -1608,7 +1602,6 @@
 does not satisfy Launchpad policy, and disables it.
 
     >>> jokosher.active = False
-    >>> syncUpdate(jokosher)
 
 The request is now eligible for purging.  Since the Jokosher product is
 no longer usable, there is no point in keeping the entry on the queue.

=== modified file 'lib/lp/translations/scripts/tests/test_copy_distroseries_translations.py'
--- lib/lp/translations/scripts/tests/test_copy_distroseries_translations.py	2010-10-05 00:08:16 +0000
+++ lib/lp/translations/scripts/tests/test_copy_distroseries_translations.py	2011-06-28 15:11:22 +0000
@@ -13,7 +13,6 @@
 
 from zope.component import getUtility
 
-from canonical.launchpad.ftests import syncUpdate
 from canonical.testing.layers import LaunchpadZopelessLayer
 from lp.registry.interfaces.distroseries import IDistroSeriesSet
 from lp.testing.faketransaction import FakeTransaction
@@ -33,7 +32,6 @@
 
         sid.hide_all_translations = True
         sid.defer_translation_imports = True
-        syncUpdate(sid)
         copy_distroseries_translations(sid, self.txn, logging)
         sid = series_set.findByName('sid')[0]
         self.assertTrue(sid.hide_all_translations)
@@ -41,7 +39,6 @@
 
         sid.hide_all_translations = True
         sid.defer_translation_imports = False
-        syncUpdate(sid)
         copy_distroseries_translations(sid, self.txn, logging)
         sid = series_set.findByName('sid')[0]
         self.assertTrue(sid.hide_all_translations)
@@ -49,7 +46,6 @@
 
         sid.hide_all_translations = False
         sid.defer_translation_imports = True
-        syncUpdate(sid)
         copy_distroseries_translations(sid, self.txn, logging)
         sid = series_set.findByName('sid')[0]
         self.assertFalse(sid.hide_all_translations)
@@ -57,7 +53,6 @@
 
         sid.hide_all_translations = False
         sid.defer_translation_imports = False
-        syncUpdate(sid)
         copy_distroseries_translations(sid, self.txn, logging)
         sid = series_set.findByName('sid')[0]
         self.assertFalse(sid.hide_all_translations)

=== modified file 'lib/lp/translations/stories/standalone/xx-sourcepackage-export.txt'
--- lib/lp/translations/stories/standalone/xx-sourcepackage-export.txt	2011-05-27 19:53:20 +0000
+++ lib/lp/translations/stories/standalone/xx-sourcepackage-export.txt	2011-06-28 15:11:22 +0000
@@ -129,8 +129,6 @@
 This change gives Gussie the ability to download full package
 translations.
 
-    >>> from canonical.launchpad.ftests import syncUpdate
-    >>> syncUpdate(ubuntu)
     >>> can_download_translations(gussie_browser)
     True