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 0a7905b..aaa9a6e 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 ac157ed..1701306 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 0526bfc..628add1 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 7e882a4..02ede14 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 96b5fb8..24555d7 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 68772e6..d274989 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 3466dc9..eeeb4fb 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 4a58cc1..e145338 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 d1dafee..1ddac65 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 3518fc7..19d4d9e 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 aaa9a6e..4d4c361 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 1701306..0bc03c1 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 628add1..6023dd7 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 02ede14..cbb0468 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 f569e00..d8bcd75 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 24555d7..7af3744 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 d274989..d5622ff 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 eeeb4fb..1f4ba9d 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 e145338..7926b09 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 1ddac65..94bb584 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.")