[GitHub] qpid-proton pull request: PROTON-1126 - Allowed setting connection...

2016-02-04 Thread grs
Github user grs commented on a diff in the pull request:

https://github.com/apache/qpid-proton/pull/64#discussion_r51931488
  
--- Diff: proton-c/bindings/python/proton/__init__.py ---
@@ -2445,10 +2445,10 @@ def wrap(impl):
 else:
   return Connection(impl)
 
-  def __init__(self, impl = pn_connection):
+  def __init__(self, impl=pn_connection):
 Wrapper.__init__(self, impl, pn_connection_attachments)
 
-  def _init(self):
+  def _init(self, **kwargs):
--- End diff --

don't need this


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] qpid-proton pull request: PROTON-1126 - Allowed setting connection...

2016-02-04 Thread grs
Github user grs commented on a diff in the pull request:

https://github.com/apache/qpid-proton/pull/64#discussion_r51931527
  
--- Diff: proton-c/bindings/python/proton/reactor.py ---
@@ -671,7 +671,11 @@ def connect(self, url=None, urls=None, address=None, 
handler=None, reconnect=Non
 """
 conn = self.connection(handler)
 conn.container = self.container_id or str(generate_uuid())
-
+
+conn.offered_capabilities = kwargs.get('offered_capabilities')
+conn.desired_capabilities = kwargs.get('desired_capabilities')
+conn.properties = kwargs.get('properties')
--- End diff --

looks good


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] qpid-proton pull request: PROTON-1126 - Allowed setting connection...

2016-02-04 Thread grs
Github user grs commented on a diff in the pull request:

https://github.com/apache/qpid-proton/pull/64#discussion_r51931427
  
--- Diff: proton-c/bindings/python/proton/__init__.py ---
@@ -2445,10 +2445,10 @@ def wrap(impl):
 else:
   return Connection(impl)
 
-  def __init__(self, impl = pn_connection):
+  def __init__(self, impl=pn_connection):
--- End diff --

don't need this


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] qpid-proton pull request: PROTON-1126 - Allowed setting connection...

2016-02-04 Thread grs
Github user grs commented on a diff in the pull request:

https://github.com/apache/qpid-proton/pull/64#discussion_r51931699
  
--- Diff: tests/python/proton_tests/utils.py ---
@@ -72,6 +76,24 @@ def wait(self):
 self.event.wait(self.timeout)
 
 
+class ConnPropertiesServer(EchoServer):
+ def __init__(self, url, timeout):
+EchoServer.__init__(self, url, timeout)
+self.properties_received = False
+self.offered_capabilities_received = False
+self.desired_capabilities_received = False
+
+ def on_link_opening(self, event):
--- End diff --

this is fine; could also be on_connection_opening which might be clearer in 
intent, but this works also


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---