Skip to content
This repository has been archived by the owner. It is now read-only.

Uses deprecated twisted interfaces #455

Closed
macosforgebot opened this issue Jun 19, 2008 · 10 comments
Closed

Uses deprecated twisted interfaces #455

macosforgebot opened this issue Jun 19, 2008 · 10 comments

Comments

@macosforgebot
Copy link

@macosforgebot macosforgebot commented Jun 19, 2008

@agx originally submitted this as ticket:285


In Debian we splitted out things enough (so we don't have to ship our own twisted). We only ship the patched web2 plugin + twistedcaldav. With recent twisted we're seeing:

/usr/lib/python2.5/site-packages/twisted/plugins/twisted_web2.py:22: DeprecationWarning: mktap and related support modules are deprecated as of Twisted 8.0.  Use Twisted Application Plugins with the 'twistd' command directly, as described in 'Writing a Twisted Application Plugin for twistd' chapter of the Developer Guide.
  from twisted.scripts.mktap import _tapHelper

This is 1.2 but the code in 1.3 looks pretty much the same. I assume you guys will want switch to newer twisted sooner or later. Any hints on how to fix this in a way that can go into your SVN.

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Jul 17, 2008

@wsanchez originally submitted this as comment:1:⁠ticket:285

  • Description modified
@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Jul 17, 2008

@wsanchez originally submitted this as comment:2:⁠ticket:285

  • Status changed from new to closed
  • Resolution set to worksforme

I think you can avoid this by simply deleting /usr/lib/python2.5/site-packages/twisted/plugins/twisted_web2.py. I don't think we use that TAP plugin in any form, but the way Twisted loads its plugins causes some code to run even if you don't use them... Yeah, it doesn't look lie we install them in our OS X build. We do install

  • caldav (ours)
  • kqueuereactor (not ours, but in from our source tree until we merge forward)
  • twisted_reactors
  • twisted_trial
@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Aug 8, 2008

@agx originally submitted this as comment:3:⁠ticket:285

  • Status changed from closed to reopened
  • Resolution worksforme deleted

removing /usr/lib/python2.5/site-packages/twisted/plugins/twisted_web2.py moves the warning to /usr/lib/python2.5/site-packages/twistedcaldav/tap.py - removing this one breaks the calendarserver startup:

/usr/bin/twistd: unkown command: caldav

So while I agree that this is a minor issue for the "official" version it's at least a small annoyance for other ports.

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Aug 8, 2008

@wsanchez originally submitted this as comment:4:⁠ticket:285

  • Status changed from reopened to closed
  • Resolution set to worksforme

My point is that the bug isn't in the Calendar Server; we can't fix this. The problem is in your separate Twisted web2 install; the warning is coming from twisted_web2.py, which is not owned by this project.

I don't think that installing the patched web2 plugin into a system location is advisable, since that prevents you form installing the current web2 plugin from Twisted without breaking Calendar Server. Unfortunately, given how Python does its path searching, that does require installing a complete separate Twisted for Calendar Server.

The real problem is that we're on an old branch of web2, which I think is a different bug.

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Aug 8, 2008

@agx originally submitted this as comment:5:⁠ticket:285


I won't press this issue, but (as I wrote above)j if I work around the twisted_web2.py case there's another warning in twistedcaldav/tap.py which is part of calendarserver. I'd still be happier to have this bug in the Linux-Port section but it's your call.

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Aug 11, 2008

@wsanchez originally submitted this as comment:6:⁠ticket:285


If you are getting unkown command: caldav, that's usually cause by (a) not finding the caldav plugin or (b) an exception while init'ing the plugin.

This warning shouldn't be raising an exception. Are you sure that's what's causing the error?

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Aug 15, 2008

@agx originally submitted this as comment:7:⁠ticket:285


The error happens after I remove twisted_web2.py (as you suggested) and then twistedcaldav/tap.py (which is the second place causing this warning) so I think this is expected. Which means: there are parts within the calendarserver project (and not only in twisted) that cause the deprecation warning (which means this is a valid bug IMHO).

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Aug 15, 2008

@wsanchez originally submitted this as comment:8:⁠ticket:285

  • Status changed from closed to reopened
  • Priority changed from 5: Not set to 4: Nice to have
  • Milestone set to 2.x
  • Resolution worksforme deleted

OK, can you paste in the error when it's coming from our plugin?

@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Oct 26, 2009

@wsanchez originally submitted this as comment:9:⁠ticket:285

  • Owner changed from @wsanchez to @agx
  • Status changed from reopened to new
@macosforgebot
Copy link
Author

@macosforgebot macosforgebot commented Feb 25, 2010

@wsanchez originally submitted this as comment:10:⁠ticket:285

  • Status changed from new to closed
  • Milestone changed from CalendarServer-2.x to CalendarServer-3.0
  • Resolution set to Software changed

Trunk will use the system Twisted if your Twisted version >= 9. That should address this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.