You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gs...@apache.org on 2015/08/19 20:57:19 UTC

[1/2] qpid-proton git commit: PROTON-950: don't force sasl layer by default

Repository: qpid-proton
Updated Branches:
  refs/heads/master 1888a59c6 -> 4e878602d


PROTON-950: don't force sasl layer by default


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/14956b07
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/14956b07
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/14956b07

Branch: refs/heads/master
Commit: 14956b07edc3de93f67179c753bbedcd9eba51a6
Parents: 1888a59
Author: Gordon Sim <gs...@redhat.com>
Authored: Wed Aug 19 16:18:47 2015 +0100
Committer: Gordon Sim <gs...@redhat.com>
Committed: Wed Aug 19 16:19:00 2015 +0100

----------------------------------------------------------------------
 proton-c/bindings/python/proton/reactor.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/14956b07/proton-c/bindings/python/proton/reactor.py
----------------------------------------------------------------------
diff --git a/proton-c/bindings/python/proton/reactor.py b/proton-c/bindings/python/proton/reactor.py
index dce1e08..8de5d89 100644
--- a/proton-c/bindings/python/proton/reactor.py
+++ b/proton-c/bindings/python/proton/reactor.py
@@ -504,14 +504,17 @@ class Connector(Handler):
         connection.hostname = "%s:%s" % (url.host, url.port)
         logging.info("connecting to %s..." % connection.hostname)
 
+        transport = Transport()
+        sasl = None
         if url.username:
             connection.user = url.username
+            sasl = transport.sasl()
+            sasl.allow_insecure_mechs = self.allow_insecure_mechs
         if url.password:
             connection.password = url.password
-        transport = Transport()
-        sasl = transport.sasl()
-        sasl.allow_insecure_mechs = self.allow_insecure_mechs
         if self.allowed_mechs:
+            if sasl == None:
+                sasl = transport.sasl()
             sasl.allowed_mechs(self.allowed_mechs)
         transport.bind(connection)
         if self.heartbeat:


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[2/2] qpid-proton git commit: NO-JIRA: ensure message content is based on strings rather than binary values, even for python 2.x

Posted by gs...@apache.org.
NO-JIRA: ensure message content is based on strings rather than binary values, even for python 2.x


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/4e878602
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/4e878602
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/4e878602

Branch: refs/heads/master
Commit: 4e878602da4f0059ea21361559523da1694d80d7
Parents: 14956b0
Author: Gordon Sim <gs...@redhat.com>
Authored: Wed Aug 19 19:58:57 2015 +0100
Committer: Gordon Sim <gs...@redhat.com>
Committed: Wed Aug 19 19:58:57 2015 +0100

----------------------------------------------------------------------
 examples/python/client.py            | 2 +-
 examples/python/db_send.py           | 2 +-
 examples/python/direct_send.py       | 2 +-
 examples/python/helloworld.py        | 2 +-
 examples/python/helloworld_direct.py | 2 +-
 examples/python/simple_send.py       | 2 +-
 examples/python/test_examples.py     | 6 +++---
 examples/python/tx_send.py           | 2 +-
 8 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/4e878602/examples/python/client.py
----------------------------------------------------------------------
diff --git a/examples/python/client.py b/examples/python/client.py
index 18dc81a..86f2c76 100755
--- a/examples/python/client.py
+++ b/examples/python/client.py
@@ -18,7 +18,7 @@
 # under the License.
 #
 
-from __future__ import print_function
+from __future__ import print_function, unicode_literals
 import optparse
 from proton import Message
 from proton.handlers import MessagingHandler

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/4e878602/examples/python/db_send.py
----------------------------------------------------------------------
diff --git a/examples/python/db_send.py b/examples/python/db_send.py
index dc85df9..c07dcc0 100755
--- a/examples/python/db_send.py
+++ b/examples/python/db_send.py
@@ -18,7 +18,7 @@
 # under the License.
 #
 
-from __future__ import print_function
+from __future__ import print_function, unicode_literals
 import optparse
 import time
 try:

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/4e878602/examples/python/direct_send.py
----------------------------------------------------------------------
diff --git a/examples/python/direct_send.py b/examples/python/direct_send.py
index f551e1e..35bd2f5 100755
--- a/examples/python/direct_send.py
+++ b/examples/python/direct_send.py
@@ -18,7 +18,7 @@
 # under the License.
 #
 
-from __future__ import print_function
+from __future__ import print_function, unicode_literals
 import optparse
 from proton import Message
 from proton.handlers import MessagingHandler

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/4e878602/examples/python/helloworld.py
----------------------------------------------------------------------
diff --git a/examples/python/helloworld.py b/examples/python/helloworld.py
index 9fcd6f1..7a91aa4 100755
--- a/examples/python/helloworld.py
+++ b/examples/python/helloworld.py
@@ -18,7 +18,7 @@
 # under the License.
 #
 
-from __future__ import print_function
+from __future__ import print_function, unicode_literals
 from proton import Message
 from proton.handlers import MessagingHandler
 from proton.reactor import Container

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/4e878602/examples/python/helloworld_direct.py
----------------------------------------------------------------------
diff --git a/examples/python/helloworld_direct.py b/examples/python/helloworld_direct.py
index 264e5b8..0292abe 100755
--- a/examples/python/helloworld_direct.py
+++ b/examples/python/helloworld_direct.py
@@ -18,7 +18,7 @@
 # under the License.
 #
 
-from __future__ import print_function
+from __future__ import print_function, unicode_literals
 from proton import Message
 from proton.handlers import MessagingHandler
 from proton.reactor import Container

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/4e878602/examples/python/simple_send.py
----------------------------------------------------------------------
diff --git a/examples/python/simple_send.py b/examples/python/simple_send.py
index 75ab550..7717a16 100755
--- a/examples/python/simple_send.py
+++ b/examples/python/simple_send.py
@@ -18,7 +18,7 @@
 # under the License.
 #
 
-from __future__ import print_function
+from __future__ import print_function, unicode_literals
 import optparse
 from proton import Message
 from proton.handlers import MessagingHandler

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/4e878602/examples/python/test_examples.py
----------------------------------------------------------------------
diff --git a/examples/python/test_examples.py b/examples/python/test_examples.py
index 7f87616..3d97b97 100644
--- a/examples/python/test_examples.py
+++ b/examples/python/test_examples.py
@@ -56,7 +56,7 @@ class ExamplesTest(unittest.TestCase):
         s.wait()
         r.wait()
         actual = [l.strip() for l in r.stdout]
-        expected = ["{'sequence': %i}" % (i+1) for i in range(100)]
+        expected = ["{%s'sequence': %i}" % (_unicode_prefix, (i+1)) for i in range(100)]
         self.assertEqual(actual, expected)
 
     def test_client_server(self, client=['client.py'], server=['server.py'], sleep=0):
@@ -135,7 +135,7 @@ class ExamplesTest(unittest.TestCase):
         s.wait()
         r.wait()
         actual = [l.strip() for l in r.stdout]
-        expected = ["{'sequence': %i}" % (i+1) for i in range(100)]
+        expected = ["{%s'sequence': %i}" % (_unicode_prefix, (i+1)) for i in range(100)]
         self.assertEqual(actual, expected)
 
     def test_direct_send_simple_recv(self):
@@ -147,5 +147,5 @@ class ExamplesTest(unittest.TestCase):
         r.wait()
         s.wait()
         actual = [l.strip() for l in r.stdout]
-        expected = ["{'sequence': %i}" % (i+1) for i in range(100)]
+        expected = ["{%s'sequence': %i}" % (_unicode_prefix, (i+1)) for i in range(100)]
         self.assertEqual(actual, expected)

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/4e878602/examples/python/tx_send.py
----------------------------------------------------------------------
diff --git a/examples/python/tx_send.py b/examples/python/tx_send.py
index 5e30174..bda6780 100755
--- a/examples/python/tx_send.py
+++ b/examples/python/tx_send.py
@@ -18,7 +18,7 @@
 # under the License.
 #
 
-from __future__ import print_function
+from __future__ import print_function, unicode_literals
 import optparse
 from proton import Message, Url
 from proton.reactor import Container


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org