From 2dc230a68b8a614cc31130177496fdfae568abf6 Mon Sep 17 00:00:00 2001 From: Rodolfo Carvalho Date: Fri, 30 Dec 2011 00:08:05 -0200 Subject: [PATCH 1/3] Replace pydns with dnspython in the comments of the examples. --- examples/adhoc_provider.py | 2 +- examples/adhoc_user.py | 2 +- examples/disco_browser.py | 2 +- examples/echo_client.py | 2 +- examples/muc.py | 2 +- examples/ping.py | 2 +- examples/proxy_echo_client.py | 2 +- examples/roster_browser.py | 2 +- examples/send_client.py | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/adhoc_provider.py b/examples/adhoc_provider.py index 0a7905b8..aaa9a6e7 100755 --- a/examples/adhoc_provider.py +++ b/examples/adhoc_provider.py @@ -192,7 +192,7 @@ if __name__ == '__main__': # Connect to the XMPP server and start processing XMPP stanzas. if xmpp.connect(): - # If you do not have the pydns library installed, you will need + # If you do not have the dnspython library installed, you will need # to manually specify the name of the server if it does not match # the one in the JID. For example, to use Google Talk you would # need to use: diff --git a/examples/adhoc_user.py b/examples/adhoc_user.py index ac157edd..17013068 100755 --- a/examples/adhoc_user.py +++ b/examples/adhoc_user.py @@ -198,7 +198,7 @@ if __name__ == '__main__': # Connect to the XMPP server and start processing XMPP stanzas. if xmpp.connect(): - # If you do not have the pydns library installed, you will need + # If you do not have the dnspython library installed, you will need # to manually specify the name of the server if it does not match # the one in the JID. For example, to use Google Talk you would # need to use: diff --git a/examples/disco_browser.py b/examples/disco_browser.py index 0526bfc4..628add1c 100755 --- a/examples/disco_browser.py +++ b/examples/disco_browser.py @@ -188,7 +188,7 @@ if __name__ == '__main__': # Connect to the XMPP server and start processing XMPP stanzas. if xmpp.connect(): - # If you do not have the pydns library installed, you will need + # If you do not have the dnspython library installed, you will need # to manually specify the name of the server if it does not match # the one in the JID. For example, to use Google Talk you would # need to use: diff --git a/examples/echo_client.py b/examples/echo_client.py index 7e882a4a..02ede14c 100755 --- a/examples/echo_client.py +++ b/examples/echo_client.py @@ -132,7 +132,7 @@ if __name__ == '__main__': # Connect to the XMPP server and start processing XMPP stanzas. if xmpp.connect(): - # If you do not have the pydns library installed, you will need + # If you do not have the dnspython library installed, you will need # to manually specify the name of the server if it does not match # the one in the JID. For example, to use Google Talk you would # need to use: diff --git a/examples/muc.py b/examples/muc.py index 96b5fb83..24555d7f 100755 --- a/examples/muc.py +++ b/examples/muc.py @@ -175,7 +175,7 @@ if __name__ == '__main__': # Connect to the XMPP server and start processing XMPP stanzas. if xmpp.connect(): - # If you do not have the pydns library installed, you will need + # If you do not have the dnspython library installed, you will need # to manually specify the name of the server if it does not match # the one in the JID. For example, to use Google Talk you would # need to use: diff --git a/examples/ping.py b/examples/ping.py index 68772e6b..d2749894 100755 --- a/examples/ping.py +++ b/examples/ping.py @@ -129,7 +129,7 @@ if __name__ == '__main__': # Connect to the XMPP server and start processing XMPP stanzas. if xmpp.connect(): - # If you do not have the pydns library installed, you will need + # If you do not have the dnspython library installed, you will need # to manually specify the name of the server if it does not match # the one in the JID. For example, to use Google Talk you would # need to use: diff --git a/examples/proxy_echo_client.py b/examples/proxy_echo_client.py index 3466dc9b..eeeb4fbb 100755 --- a/examples/proxy_echo_client.py +++ b/examples/proxy_echo_client.py @@ -156,7 +156,7 @@ if __name__ == '__main__': # Connect to the XMPP server and start processing XMPP stanzas. if xmpp.connect(): - # If you do not have the pydns library installed, you will need + # If you do not have the dnspython library installed, you will need # to manually specify the name of the server if it does not match # the one in the JID. For example, to use Google Talk you would # need to use: diff --git a/examples/roster_browser.py b/examples/roster_browser.py index 4a58cc1c..e145338e 100644 --- a/examples/roster_browser.py +++ b/examples/roster_browser.py @@ -160,7 +160,7 @@ if __name__ == '__main__': # Connect to the XMPP server and start processing XMPP stanzas. if xmpp.connect(): - # If you do not have the pydns library installed, you will need + # If you do not have the dnspython library installed, you will need # to manually specify the name of the server if it does not match # the one in the JID. For example, to use Google Talk you would # need to use: diff --git a/examples/send_client.py b/examples/send_client.py index d1dafee6..1ddac659 100755 --- a/examples/send_client.py +++ b/examples/send_client.py @@ -131,7 +131,7 @@ if __name__ == '__main__': # Connect to the XMPP server and start processing XMPP stanzas. if xmpp.connect(): - # If you do not have the pydns library installed, you will need + # If you do not have the dnspython library installed, you will need # to manually specify the name of the server if it does not match # the one in the JID. For example, to use Google Talk you would # need to use: From b74ea47650b8f75f30c367d038bdefb6bfee0711 Mon Sep 17 00:00:00 2001 From: Rodolfo Carvalho Date: Fri, 30 Dec 2011 17:08:32 -0200 Subject: [PATCH 2/3] Fix docstring of a method of Message stanzas. --- sleekxmpp/stanza/message.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sleekxmpp/stanza/message.py b/sleekxmpp/stanza/message.py index 3518fc7a..19d4d9e2 100644 --- a/sleekxmpp/stanza/message.py +++ b/sleekxmpp/stanza/message.py @@ -79,7 +79,7 @@ class Message(RootStanza): return self def normal(self): - """Set the message type to 'chat'.""" + """Set the message type to 'normal'.""" self['type'] = 'normal' return self From 8cafa8578f35aa96205b7c163ba9c272ca27a1b5 Mon Sep 17 00:00:00 2001 From: Rodolfo Carvalho Date: Fri, 30 Dec 2011 17:25:03 -0200 Subject: [PATCH 3/3] Update examples to use the block'' argument instead of the deprecated threaded''. --- examples/adhoc_provider.py | 2 +- examples/adhoc_user.py | 2 +- examples/disco_browser.py | 2 +- examples/echo_client.py | 2 +- examples/echo_component.py | 2 +- examples/muc.py | 2 +- examples/ping.py | 2 +- examples/proxy_echo_client.py | 2 +- examples/roster_browser.py | 2 +- examples/send_client.py | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/adhoc_provider.py b/examples/adhoc_provider.py index aaa9a6e7..4d4c3610 100755 --- a/examples/adhoc_provider.py +++ b/examples/adhoc_provider.py @@ -199,7 +199,7 @@ if __name__ == '__main__': # # if xmpp.connect(('talk.google.com', 5222)): # ... - xmpp.process(threaded=False) + xmpp.process(block=True) print("Done") else: print("Unable to connect.") diff --git a/examples/adhoc_user.py b/examples/adhoc_user.py index 17013068..0bc03c15 100755 --- a/examples/adhoc_user.py +++ b/examples/adhoc_user.py @@ -205,7 +205,7 @@ if __name__ == '__main__': # # if xmpp.connect(('talk.google.com', 5222)): # ... - xmpp.process(threaded=False) + xmpp.process(block=True) print("Done") else: print("Unable to connect.") diff --git a/examples/disco_browser.py b/examples/disco_browser.py index 628add1c..6023dd7e 100755 --- a/examples/disco_browser.py +++ b/examples/disco_browser.py @@ -195,6 +195,6 @@ if __name__ == '__main__': # # if xmpp.connect(('talk.google.com', 5222)): # ... - xmpp.process(threaded=False) + xmpp.process(block=True) else: print("Unable to connect.") diff --git a/examples/echo_client.py b/examples/echo_client.py index 02ede14c..cbb04683 100755 --- a/examples/echo_client.py +++ b/examples/echo_client.py @@ -139,7 +139,7 @@ if __name__ == '__main__': # # if xmpp.connect(('talk.google.com', 5222)): # ... - xmpp.process(threaded=False) + xmpp.process(block=True) print("Done") else: print("Unable to connect.") diff --git a/examples/echo_component.py b/examples/echo_component.py index f569e001..d8bcd752 100755 --- a/examples/echo_component.py +++ b/examples/echo_component.py @@ -116,7 +116,7 @@ if __name__ == '__main__': # Connect to the XMPP server and start processing XMPP stanzas. if xmpp.connect(): - xmpp.process(threaded=False) + xmpp.process(block=True) print("Done") else: print("Unable to connect.") diff --git a/examples/muc.py b/examples/muc.py index 24555d7f..7af37449 100755 --- a/examples/muc.py +++ b/examples/muc.py @@ -182,7 +182,7 @@ if __name__ == '__main__': # # if xmpp.connect(('talk.google.com', 5222)): # ... - xmpp.process(threaded=False) + xmpp.process(block=True) print("Done") else: print("Unable to connect.") diff --git a/examples/ping.py b/examples/ping.py index d2749894..d5622ffd 100755 --- a/examples/ping.py +++ b/examples/ping.py @@ -136,7 +136,7 @@ if __name__ == '__main__': # # if xmpp.connect(('talk.google.com', 5222)): # ... - xmpp.process(threaded=False) + xmpp.process(block=True) print("Done") else: print("Unable to connect.") diff --git a/examples/proxy_echo_client.py b/examples/proxy_echo_client.py index eeeb4fbb..1f4ba9d3 100755 --- a/examples/proxy_echo_client.py +++ b/examples/proxy_echo_client.py @@ -163,7 +163,7 @@ if __name__ == '__main__': # # if xmpp.connect(('talk.google.com', 5222)): # ... - xmpp.process(threaded=False) + xmpp.process(block=True) print("Done") else: print("Unable to connect.") diff --git a/examples/roster_browser.py b/examples/roster_browser.py index e145338e..7926b096 100644 --- a/examples/roster_browser.py +++ b/examples/roster_browser.py @@ -167,7 +167,7 @@ if __name__ == '__main__': # # if xmpp.connect(('talk.google.com', 5222)): # ... - xmpp.process(threaded=False) + xmpp.process(block=True) else: print("Unable to connect.") diff --git a/examples/send_client.py b/examples/send_client.py index 1ddac659..94bb584d 100755 --- a/examples/send_client.py +++ b/examples/send_client.py @@ -138,7 +138,7 @@ if __name__ == '__main__': # # if xmpp.connect(('talk.google.com', 5222)): # ... - xmpp.process(threaded=False) + xmpp.process(block=True) print("Done") else: print("Unable to connect.")