diff options
author | Lance Stout <lancestout@gmail.com> | 2011-02-14 13:49:43 -0500 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2011-02-14 13:49:43 -0500 |
commit | 75584d7ad74b284d30164cde0b5efec2c845d207 (patch) | |
tree | e171f1dcd9cd46c5be823cb19233311b49938f70 /sleekxmpp/stanza/roster.py | |
parent | e0f9025e7c6fe51243222aeb684b94eda1a2be5f (diff) | |
download | slixmpp-75584d7ad74b284d30164cde0b5efec2c845d207.tar.gz slixmpp-75584d7ad74b284d30164cde0b5efec2c845d207.tar.bz2 slixmpp-75584d7ad74b284d30164cde0b5efec2c845d207.tar.xz slixmpp-75584d7ad74b284d30164cde0b5efec2c845d207.zip |
Remap old method names in a better way.
This should prevent some reference cycles that will cause garbage
collection issues.
Diffstat (limited to 'sleekxmpp/stanza/roster.py')
-rw-r--r-- | sleekxmpp/stanza/roster.py | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/sleekxmpp/stanza/roster.py b/sleekxmpp/stanza/roster.py index 8f154a22..afe75516 100644 --- a/sleekxmpp/stanza/roster.py +++ b/sleekxmpp/stanza/roster.py @@ -38,23 +38,6 @@ class Roster(ElementBase): plugin_attrib = 'roster' interfaces = set(('items',)) - def setup(self, xml=None): - """ - Populate the stanza object using an optional XML object. - - Overrides StanzaBase.setup. - - Arguments: - xml -- Use an existing XML object for the stanza's values. - """ - # To comply with PEP8, method names now use underscores. - # Deprecated method names are re-mapped for backwards compatibility. - self.setItems = self.set_items - self.getItems = self.get_items - self.delItems = self.del_items - - return ElementBase.setup(self, xml) - def set_items(self, items): """ Set the roster entries in the <roster> stanza. @@ -123,3 +106,9 @@ class Roster(ElementBase): register_stanza_plugin(Iq, Roster) + +# To comply with PEP8, method names now use underscores. +# Deprecated method names are re-mapped for backwards compatibility. +Roster.setItems = Roster.set_items +Roster.getItems = Roster.get_items +Roster.delItems = Roster.del_items |