summaryrefslogtreecommitdiff
path: root/sleekxmpp/stanza/iq.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-02-14 13:49:43 -0500
committerLance Stout <lancestout@gmail.com>2011-02-14 13:49:43 -0500
commit75584d7ad74b284d30164cde0b5efec2c845d207 (patch)
treee171f1dcd9cd46c5be823cb19233311b49938f70 /sleekxmpp/stanza/iq.py
parente0f9025e7c6fe51243222aeb684b94eda1a2be5f (diff)
downloadslixmpp-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/iq.py')
-rw-r--r--sleekxmpp/stanza/iq.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/sleekxmpp/stanza/iq.py b/sleekxmpp/stanza/iq.py
index 330df6c2..2bfbc7b1 100644
--- a/sleekxmpp/stanza/iq.py
+++ b/sleekxmpp/stanza/iq.py
@@ -75,13 +75,6 @@ class Iq(RootStanza):
Overrides StanzaBase.__init__.
"""
StanzaBase.__init__(self, *args, **kwargs)
- # To comply with PEP8, method names now use underscores.
- # Deprecated method names are re-mapped for backwards compatibility.
- self.setPayload = self.set_payload
- self.getQuery = self.get_query
- self.setQuery = self.set_query
- self.delQuery = self.del_query
-
if self['id'] == '':
if self.stream is not None:
self['id'] = self.stream.getNewId()
@@ -229,3 +222,11 @@ class Iq(RootStanza):
else:
StanzaBase._set_stanza_values(self, values)
return self
+
+
+# To comply with PEP8, method names now use underscores.
+# Deprecated method names are re-mapped for backwards compatibility.
+Iq.setPayload = Iq.set_payload
+Iq.getQuery = Iq.get_query
+Iq.setQuery = Iq.set_query
+Iq.delQuery = Iq.del_query