Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#1686 enhancement closed fixed (fixed)

Better XML Stanza and error support

Reported by: ralphm Owned by:
Priority: highest Milestone: Words-0.4
Component: words Keywords:
Cc: Branch:
Author:

Description

The twisted.words.protocols.jabber.client module features an IQ class that models an <iq/> XML Stanza. However, this implementation is limited to the jabber:client namespace. Also, it would be very nice if worked with deferreds.

Support for <message/> and <presence/> XML Stanzas.

Also, support for errors (both stream level and stanza level) should be added:

  • Parsing of error elements
  • The ability to generate an exception object from an incoming error stanza
  • Have exception objects generate an error response stanza from the incoming stanza that caused the exception

Change History (5)

comment:1 Changed 13 years ago by ralphm

Keywords: review added
Owner: ralphm deleted
Priority: normalhighest

At this point, I see no immediate need for <message/> or <presence/> support.

The rest has been implemented in source:branches/xmpp-stanzas-1686. Please review.

comment:2 Changed 13 years ago by Jonathan Lange

Keywords: review removed
Owner: set to ralphm

From Pyflakes:

twisted/words/test/test_jabberxmlstream.py:3: 'defer' imported but unused
twisted/words/protocols/jabber/xmlstream.py:21: 'STREAM_CONNECTED_EVENT' imported but unused
twisted/words/protocols/jabber/xmlstream.py:22: 'STREAM_START_EVENT' imported but unused
twisted/words/protocols/jabber/xmlstream.py:23: 'STREAM_END_EVENT' imported but unused
  • Line 18 of test_jabberxmlstream violates 80 cols
  • Line 146 of test_jabbererror violates 80 cols
  • It's not clear at a glance what behaviour ExceptionFromStanzaTest is supposed to be testing

Otherwise, looks good. Do a full test run and merge.

comment:3 Changed 13 years ago by ralphm

Resolution: fixed
Status: newclosed

(In [16830]) Add stanza and stream error support, new IQ stanza helper.

Author: ralphm Reviewer: jml Fixes #1686

comment:4 Changed 13 years ago by ralphm

Milestone: Words-0.4

comment:5 Changed 8 years ago by <automation>

Owner: ralphm deleted
Note: See TracTickets for help on using tickets.