[CalendarServer-changes] [3855] CalendarServer/branches/exarkun/update-twisted-3816
source_changes at macosforge.org
source_changes at macosforge.org
Thu Mar 12 15:47:53 PDT 2009
Revision: 3855
http://trac.macosforge.org/projects/calendarserver/changeset/3855
Author: exarkun at twistedmatrix.com
Date: 2009-03-12 15:47:53 -0700 (Thu, 12 Mar 2009)
Log Message:
-----------
More adjustments to work with recent Twisted
Don't pass type keyword to IQ
use twisted.internet.task.deferLater instead of the one from the web2 unit tests
Modified Paths:
--------------
CalendarServer/branches/exarkun/update-twisted-3816/run
CalendarServer/branches/exarkun/update-twisted-3816/twistedcaldav/notify.py
CalendarServer/branches/exarkun/update-twisted-3816/twistedcaldav/test/test_index.py
Modified: CalendarServer/branches/exarkun/update-twisted-3816/run
===================================================================
--- CalendarServer/branches/exarkun/update-twisted-3816/run 2009-03-12 21:52:50 UTC (rev 3854)
+++ CalendarServer/branches/exarkun/update-twisted-3816/run 2009-03-12 22:47:53 UTC (rev 3855)
@@ -636,7 +636,7 @@
;;
esac;
svn_uri="${proto}://svn.twistedmatrix.com/svn/Twisted/branches/dav-take-two-3081-3";
-svn_get "Twisted" "${twisted}" "${svn_uri}" 26343;
+svn_get "Twisted" "${twisted}" "${svn_uri}" 26347;
# No py_build step, since we tend to do edit Twisted, we want the sources in
# PYTHONPATH, not a build directory.
Modified: CalendarServer/branches/exarkun/update-twisted-3816/twistedcaldav/notify.py
===================================================================
--- CalendarServer/branches/exarkun/update-twisted-3816/twistedcaldav/notify.py 2009-03-12 21:52:50 UTC (rev 3854)
+++ CalendarServer/branches/exarkun/update-twisted-3816/twistedcaldav/notify.py 2009-03-12 22:47:53 UTC (rev 3855)
@@ -720,7 +720,8 @@
return
try:
- iq = IQ(self.xmlStream, type='get')
+ # XXX This codepath is not unit tested
+ iq = IQ(self.xmlStream, 'get')
child = iq.addElement('pubsub',
defaultUri=self.pubsubNS+"#owner")
child = child.addElement('configure')
@@ -755,7 +756,7 @@
formElement = configureElement.firstChildElement()
if formElement['type'] == 'form':
# We've found the form; start building a response
- filledIq = IQ(self.xmlStream, type='set')
+ filledIq = IQ(self.xmlStream, 'set')
filledPubSub = filledIq.addElement('pubsub',
defaultUri=self.pubsubNS+"#owner")
filledConfigure = filledPubSub.addElement('configure')
@@ -784,7 +785,8 @@
valueElement.addContent(value)
# filledForm.addChild(field)
if configMatches:
- cancelIq = IQ(self.xmlStream, type='set')
+ # XXX This codepath is not unit tested
+ cancelIq = IQ(self.xmlStream, 'set')
cancelPubSub = cancelIq.addElement('pubsub',
defaultUri=self.pubsubNS+"#owner")
cancelConfig = cancelPubSub.addElement('configure')
@@ -892,7 +894,7 @@
def requestRoster(self):
if self.doRoster:
self.roster = {}
- rosterIq = IQ(self.xmlStream, type='get')
+ rosterIq = IQ(self.xmlStream, 'get')
rosterIq.addElement("query", "jabber:iq:roster")
d = rosterIq.send()
d.addCallback(self.handleRoster)
@@ -950,7 +952,8 @@
self.xmlStream.send(response)
# remove from roster as well
- removal = IQ(self.xmlStream, type='set')
+ # XXX This codepath is not unit tested
+ removal = IQ(self.xmlStream, 'set')
query = removal.addElement("query", "jabber:iq:roster")
query.addElement("item")
query.item["jid"] = iq["from"]
Modified: CalendarServer/branches/exarkun/update-twisted-3816/twistedcaldav/test/test_index.py
===================================================================
--- CalendarServer/branches/exarkun/update-twisted-3816/twistedcaldav/test/test_index.py 2009-03-12 21:52:50 UTC (rev 3854)
+++ CalendarServer/branches/exarkun/update-twisted-3816/twistedcaldav/test/test_index.py 2009-03-12 22:47:53 UTC (rev 3855)
@@ -19,7 +19,8 @@
import twistedcaldav.test.util
from twistedcaldav.test.util import InMemoryMemcacheProtocol
from twistedcaldav.index import ReservationError, MemcachedUIDReserver
-from twisted.web2.test.test_http import deferLater
+from twisted.internet import reactor
+from twisted.internet.task import deferLater
class SQLIndexTests (twistedcaldav.test.util.TestCase):
"""
@@ -80,7 +81,7 @@
d.addCallback(lambda _: self.db.reserveUID(uid))
d.addCallback(lambda _: self.db.isReservedUID(uid))
d.addCallback(self.assertTrue)
- d.addCallback(lambda _: deferLater(2))
+ d.addCallback(lambda _: deferLater(reactor, 2, lambda: None))
d.addCallback(lambda _: self.db.isReservedUID(uid))
d.addCallback(self.assertFalse)
d.addBoth(_finally)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20090312/28f2a661/attachment.html>
More information about the calendarserver-changes
mailing list