Age | Commit message (Collapse) | Author | |
---|---|---|---|
2011-01-27 | Make stanza.plugins an OrderedDict. | Lance Stout | |
This allows you to determine the order in which substanzas were added in the original XML. | |||
2011-01-26 | Cleanup for stanzabase. | Lance Stout | |
Use stanza.values instead of _get/set_stanza_values where used. ElementBase stanzas can now use .tag May use class method tag_name() for stanza classes. ElementBase now has .clear() method. | |||
2011-01-26 | Upgraded how subitem works. | Lance Stout | |
May now use register_stanza_plugin(Foo, Bar, iterable=True) to add to the set of stanza classes used for iterable substanzas. It is no longer necessary to manually specify the contents of subitem if the new method is used. | |||
2011-01-19 | Make extending stanza objects nicer. | Lance Stout | |
A stanza object may add is_extension = True to its class definition to provide a single new interface to a parent stanza. For example: import sleekxmpp from sleekxmpp import Iq from sleekxmpp.xmlstream import ElementBase, register_stanza_plugin, ET class Foo(ElementBase): """ Test adding just an attribute to a parent stanza. Adding subelements works as expected. """ is_extension = True interfaces = set(('foo',)) plugin_attrib = 'foo' def setup(self, xml): # Don't include an XML element in the parent stanza # since we're adding just an attribute. # If adding a regular subelement, no need to do this. self.xml = ET.Element('') def set_foo(self, val): self.parent()._set_attr('foo', val) def get_foo(self): return self.parent()._get_attr('foo') def del_foo(self): self.parent()._del_attr('foo') register_stanza_plugin(Iq, Foo) i1 = Iq() i2 = Iq(xml=ET.fromstring("<iq xmlns='jabber:client' foo='bar' />")) >>> i1['foo'] = '3' >>> i1 '3' >>> i1 '<iq id="0" foo="3" />' >>> i2 '<iq id="0" foo="bar" />' >>> i2['foo'] 'bar' >>> del i2['foo'] >>> i2 '<iq id="0" />' | |||
2010-12-07 | Add support for using xml:lang values. | Lance Stout | |
Support is only for adding literal XML content to stanzas. Full support for things like multiple message bodies with different xml:lang values is still in the works. | |||
2010-11-06 | Logging no longer uses root logger. | Lance Stout | |
Each module should now log into its own logger. | |||
2010-10-17 | Underscore names by default. | Lance Stout | |
Stanza objects now accept the use of underscored names. The CamelCase versions are still available for backwards compatibility, but are discouraged. The property stanza.values now maps to the old getStanzaValues and setStanzaValues, in addition to _set_stanza_values and _get_stanza_values. | |||
2010-10-07 | Corrected test errors. | Lance Stout | |
There was a bug in the XML compare method. | |||
2010-10-06 | More PEP8 compliance cleanups. | Lance Stout | |
Cleaned up the atom entry stanza. | |||
2010-09-01 | A few cleanups to make things simpler. | Lance Stout | |
2010-08-30 | Fixed ElementBase.match to match using sub_interface elements. | Lance Stout | |
2010-08-30 | Fixed typos in ElementBase._fix_ns | Lance Stout | |
2010-08-30 | Updated ElementBase.match to respect namespaces with slashes. | Lance Stout | |
Required adding option to _fix_ns to not propagate namespaces to child elements. | |||
2010-08-27 | Added unit tests for StanzaBase. | Lance Stout | |
2010-08-27 | Updated StanzaBase with documentation. | Lance Stout | |
2010-08-26 | Added comments to _fix_ns to clarify the cleaning procedure. | Lance Stout | |
2010-08-26 | Fixed ElementBase._fix_ns and related methods to respect namespaces which ↵ | Lance Stout | |
contain forward slashes. | |||
2010-08-26 | Fixed indentation in StanzaBase. | Lance Stout | |
2010-08-26 | Clarify ElementBase documentation. | Lance Stout | |
2010-08-26 | Fixed line lengths in ElementBase to comply with PEP8. | Lance Stout | |
2010-08-26 | Finished the update of ElementBase with docs and unit tests. | Lance Stout | |
Corrected bugs in equality comparisons between stanzas. | |||
2010-08-26 | Updated the remaining ElementBase methods. | Lance Stout | |
Remaining ElementBase todos: Write the class documentation for ElementBase. Write unit tests for the __magic__ methods. | |||
2010-08-25 | Fixed ElementBase.match to respect namespaces. | Lance Stout | |
2010-08-25 | Updated ElementBase.match and added unit tests. | Lance Stout | |
2010-08-25 | Updated ElementBase._delSub and added unit tests. | Lance Stout | |
_delSub can now accept a path and will optionally remove any empty parent elements after deleting the target elements. | |||
2010-08-24 | Fixed indenting issue. | Lance Stout | |
2010-08-24 | Updated ElementBase._setSubText and added unit tests. | Lance Stout | |
_setSubText can now handle elements specified by an XPath expression, and will build up the element tree as needed, reusing an existing elements in the path. | |||
2010-08-24 | Updated ElementBase._getSubText and added unit tests. | Lance Stout | |
Also added ElementBase._fix_ns() to apply the stanza namespace to elements that don't have a namespace. | |||
2010-08-21 | added form compatibility with old api, stanzas now bool() to True on 2.x, ↵ | fritzy | |
jid attributes will return '' if not set | |||
2010-08-19 | Updated ElementBase methods _getAttr, _setAttr, and _delAttr with docs and ↵ | Lance Stout | |
tests. | |||
2010-08-19 | Small cleanup in ElementBase.__setitem__ | Lance Stout | |
2010-08-19 | Updated ElementBase.__delitem__ and added unit tests. | Lance Stout | |
2010-08-19 | Updated ElementBase.__setitem__ and added unit tests. | Lance Stout | |
2010-08-13 | Updated ElementBase.__getitem__ with docs and unit tests. | Lance Stout | |
2010-08-13 | Updated getStanzaValues and setStanzaValues with docs and unit tests. | Lance Stout | |
2010-08-13 | Updated ElementBase.enable and ElementBase.initPlugin | Lance Stout | |
2010-08-13 | Updated ElementBase.setup, and added unit tests. | Lance Stout | |
2010-08-13 | Updated ElementBase.__init__ | Lance Stout | |
2010-08-13 | Adjust first level indenting in ElementBase to prepare for cleanup. | Lance Stout | |
2010-08-13 | Updated registerStanzaPlugin and the XML test type. | Lance Stout | |
2010-08-12 | Cleaned stanzabase imports. | Lance Stout | |
2010-08-05 | Replaced the ToString class with a tostring function. | Lance Stout | |
The sleekxmpp.xmlstream.tostring and sleekxmpp.xmlstream.tostring26 packages have been merged to sleekxmpp.xmlstream.tostring. The __init__.py file will import the appropriate tostring function depending on the Python version. The setup.py file has been updated with the package changes. ElementBase is now a direct descendent of object and does not subclass ToString. Stanza objects now return their XML contents for __repr__. | |||
2010-07-30 | Added optional default value to _getAttr. | Lance Stout | |
2010-07-29 | Modified ElementBase _getSubText, _setSubText, and _delSubText to | Lance Stout | |
use the namespace in a tag name if one is given and to use self.namespace otherwise. | |||
2010-07-26 | Merge branch 'experimental' of git@github.com:fritzy/SleekXMPP into experimental | Nathan Fritz | |
2010-07-26 | removed jid from stanzabase to external file | Nathan Fritz | |
2010-07-26 | Replaced traceback calls to use logging.exception where applicable. | Lance Stout | |
2010-07-20 | Issue 26. Only set from address in reply() for components | Joe Hildebrand | |
2010-07-20 | Updated license notices to use the correct MIT format. Also corrected ↵ | Lance Stout | |
references to nonexistant license.txt to LICENSE. | |||
2010-07-19 | stanza should not have setValues/getValues because that conflicts with ↵ | Nathan Fritz | |
attribute accessors |