[jira] [Commented] (PROTON-995) Url fails to parse URL

2016-03-04 Thread Alan Conway (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15179986#comment-15179986
 ] 

Alan Conway commented on PROTON-995:


Hi Javier. 

Your URL is invalid. The character '/' is reserved, to use it in a password or 
any non-reserved use use the hex quoted form "%2F". This didn't used to work 
properly but since this bug fix it does, as follows:
{code}
>>> u = proton.Url('amqps://name:pass%2fw...@example.com/queue-name')
>>> print u, "password=",u.password
amqps://name:pass%2fw...@example.com:amqps/queue-name password= pass/word
{code}
Note that %2F is used to construct the URL and in the printed form, but the 
u.password attribute returns the un-quoted "pass/word"

> Url fails to parse URL
> --
>
> Key: PROTON-995
> URL: https://issues.apache.org/jira/browse/PROTON-995
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: python-binding
>Affects Versions: 0.10
> Environment: Linux, Python 3.4.3
>Reporter: Javier Ruere
>Assignee: Alan Conway
> Fix For: 0.12.0
>
>
> proton.Url apparently parses an URL correctly but then it fails as if it was 
> parsed incorrectly.
> It appears to fail to handle the escaped characters in the password and using 
> a default port.
> {quote}
> >>> import proton
> >>> from proton.reactor import Container
> >>> url = 
> >>> 'amqps://a_name:1w6MN0yeUqLUwDdWHk%2FxIR2Z6aIrhslm69lYtHA0r5E%3D@a_namespace.servicebus.windows.net/a_topic/Subscriptions/a_subscription'
> >>> purl=proton.Url(url)
> >>> purl
> Url('amqps://a_name:1w6MN0yeUqLUwDdWHk/xIR2Z6aIrhslm69lYtHA0r5E=@a_namespace.servicebus.windows.net:amqps/a_topic/Subscriptions/a_subscription')
> >>> container = Container()
> >>> receiver = container.create_receiver(purl)
> Traceback (most recent call last):
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3940, in _port_int
> return int(value)
> ValueError: invalid literal for int() with base 10: '1w6MN0yeUqLUwDdWHk'
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3943, in _port_int
> return socket.getservbyname(value)
> OSError: service/proto not found
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
>   File "", line 1, in 
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 738, in create_receiver
> session = self._get_session(context)
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 660, in _get_session
> return self._get_session(self.connect(url=context))
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 637, in connect
> if url: connector.address = Urls([url])
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 577, in __init__
> self.values = [Url(v) for v in values]
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 577, in 
> self.values = [Url(v) for v in values]
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3967, in __init__
> if defaults: self.defaults()
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 4010, in defaults
> self.port = self.port or self.Port(self.scheme)
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3984, in _get_port
> return portstr and Url.Port(portstr)
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3928, in __new__
> port = super(Url.Port, cls).__new__(cls, cls._port_int(value))
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3949, in _port_int
> raise ValueError("Not a valid port number or service name: '%s'" % value)
> ValueError: Not a valid port number or service name: '1w6MN0yeUqLUwDdWHk'
> >>> 
> >>> purl.port
> 5671
> >>> purl.password
> '1w6MN0yeUqLUwDdWHk/xIR2Z6aIrhslm69lYtHA0r5E='
> >>> purl.host
> 'a_namespace.servicebus.windows.net'
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PROTON-995) Url fails to parse URL

2015-11-20 Thread Alan Conway (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15018012#comment-15018012
 ] 

Alan Conway commented on PROTON-995:


The problem was fixed in the C library so any bindings that wrap the C url will 
also be fixed.

> Url fails to parse URL
> --
>
> Key: PROTON-995
> URL: https://issues.apache.org/jira/browse/PROTON-995
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: python-binding
>Affects Versions: 0.10
> Environment: Linux, Python 3.4.3
>Reporter: Javier Ruere
>Assignee: Alan Conway
> Fix For: 0.12.0
>
>
> proton.Url apparently parses an URL correctly but then it fails as if it was 
> parsed incorrectly.
> It appears to fail to handle the escaped characters in the password and using 
> a default port.
> {quote}
> >>> import proton
> >>> from proton.reactor import Container
> >>> url = 
> >>> 'amqps://a_name:1w6MN0yeUqLUwDdWHk%2FxIR2Z6aIrhslm69lYtHA0r5E%3D@a_namespace.servicebus.windows.net/a_topic/Subscriptions/a_subscription'
> >>> purl=proton.Url(url)
> >>> purl
> Url('amqps://a_name:1w6MN0yeUqLUwDdWHk/xIR2Z6aIrhslm69lYtHA0r5E=@a_namespace.servicebus.windows.net:amqps/a_topic/Subscriptions/a_subscription')
> >>> container = Container()
> >>> receiver = container.create_receiver(purl)
> Traceback (most recent call last):
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3940, in _port_int
> return int(value)
> ValueError: invalid literal for int() with base 10: '1w6MN0yeUqLUwDdWHk'
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3943, in _port_int
> return socket.getservbyname(value)
> OSError: service/proto not found
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
>   File "", line 1, in 
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 738, in create_receiver
> session = self._get_session(context)
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 660, in _get_session
> return self._get_session(self.connect(url=context))
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 637, in connect
> if url: connector.address = Urls([url])
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 577, in __init__
> self.values = [Url(v) for v in values]
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 577, in 
> self.values = [Url(v) for v in values]
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3967, in __init__
> if defaults: self.defaults()
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 4010, in defaults
> self.port = self.port or self.Port(self.scheme)
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3984, in _get_port
> return portstr and Url.Port(portstr)
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3928, in __new__
> port = super(Url.Port, cls).__new__(cls, cls._port_int(value))
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3949, in _port_int
> raise ValueError("Not a valid port number or service name: '%s'" % value)
> ValueError: Not a valid port number or service name: '1w6MN0yeUqLUwDdWHk'
> >>> 
> >>> purl.port
> 5671
> >>> purl.password
> '1w6MN0yeUqLUwDdWHk/xIR2Z6aIrhslm69lYtHA0r5E='
> >>> purl.host
> 'a_namespace.servicebus.windows.net'
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PROTON-995) Url fails to parse URL

2015-11-19 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15014443#comment-15014443
 ] 

ASF subversion and git services commented on PROTON-995:


Commit aa226be319135943fd1a7545d030ff3324ab8cc9 in qpid-proton's branch 
refs/heads/master from [~aconway]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=aa226be ]

PROTON-995: Fix pn_url_str to use URL hex escapes to generate a valid URL 
string.

pn_url_parse decodes URL encoded hexadecimal escape sequences in the username
and password, but pn_url_str was not re-encoding them resulting in an invalid
URL string if they contained the forbidden characters ':', '/' or '@'.

This fixes pn_url_str to hex-encode those characters in username and password 
fields.

PROTON-995 was reported against the python binding, the python Url class wraps
a pn_url_t so this also fixes the python problem.


> Url fails to parse URL
> --
>
> Key: PROTON-995
> URL: https://issues.apache.org/jira/browse/PROTON-995
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: python-binding
>Affects Versions: 0.10
> Environment: Linux, Python 3.4.3
>Reporter: Javier Ruere
>Assignee: Alan Conway
>
> proton.Url apparently parses an URL correctly but then it fails as if it was 
> parsed incorrectly.
> It appears to fail to handle the escaped characters in the password and using 
> a default port.
> {quote}
> >>> import proton
> >>> from proton.reactor import Container
> >>> url = 
> >>> 'amqps://a_name:1w6MN0yeUqLUwDdWHk%2FxIR2Z6aIrhslm69lYtHA0r5E%3D@a_namespace.servicebus.windows.net/a_topic/Subscriptions/a_subscription'
> >>> purl=proton.Url(url)
> >>> purl
> Url('amqps://a_name:1w6MN0yeUqLUwDdWHk/xIR2Z6aIrhslm69lYtHA0r5E=@a_namespace.servicebus.windows.net:amqps/a_topic/Subscriptions/a_subscription')
> >>> container = Container()
> >>> receiver = container.create_receiver(purl)
> Traceback (most recent call last):
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3940, in _port_int
> return int(value)
> ValueError: invalid literal for int() with base 10: '1w6MN0yeUqLUwDdWHk'
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3943, in _port_int
> return socket.getservbyname(value)
> OSError: service/proto not found
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
>   File "", line 1, in 
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 738, in create_receiver
> session = self._get_session(context)
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 660, in _get_session
> return self._get_session(self.connect(url=context))
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 637, in connect
> if url: connector.address = Urls([url])
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 577, in __init__
> self.values = [Url(v) for v in values]
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 577, in 
> self.values = [Url(v) for v in values]
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3967, in __init__
> if defaults: self.defaults()
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 4010, in defaults
> self.port = self.port or self.Port(self.scheme)
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3984, in _get_port
> return portstr and Url.Port(portstr)
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3928, in __new__
> port = super(Url.Port, cls).__new__(cls, cls._port_int(value))
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3949, in _port_int
> raise ValueError("Not a valid port number or service name: '%s'" % value)
> ValueError: Not a valid port number or service name: '1w6MN0yeUqLUwDdWHk'
> >>> 
> >>> purl.port
> 5671
> >>> purl.password
> '1w6MN0yeUqLUwDdWHk/xIR2Z6aIrhslm69lYtHA0r5E='
> >>> purl.host
> 'a_namespace.servicebus.windows.net'
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PROTON-995) Url fails to parse URL

2015-11-19 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15014442#comment-15014442
 ] 

ASF subversion and git services commented on PROTON-995:


Commit aa226be319135943fd1a7545d030ff3324ab8cc9 in qpid-proton's branch 
refs/heads/master from [~aconway]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=aa226be ]

PROTON-995: Fix pn_url_str to use URL hex escapes to generate a valid URL 
string.

pn_url_parse decodes URL encoded hexadecimal escape sequences in the username
and password, but pn_url_str was not re-encoding them resulting in an invalid
URL string if they contained the forbidden characters ':', '/' or '@'.

This fixes pn_url_str to hex-encode those characters in username and password 
fields.

PROTON-995 was reported against the python binding, the python Url class wraps
a pn_url_t so this also fixes the python problem.


> Url fails to parse URL
> --
>
> Key: PROTON-995
> URL: https://issues.apache.org/jira/browse/PROTON-995
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: python-binding
>Affects Versions: 0.10
> Environment: Linux, Python 3.4.3
>Reporter: Javier Ruere
>Assignee: Alan Conway
>
> proton.Url apparently parses an URL correctly but then it fails as if it was 
> parsed incorrectly.
> It appears to fail to handle the escaped characters in the password and using 
> a default port.
> {quote}
> >>> import proton
> >>> from proton.reactor import Container
> >>> url = 
> >>> 'amqps://a_name:1w6MN0yeUqLUwDdWHk%2FxIR2Z6aIrhslm69lYtHA0r5E%3D@a_namespace.servicebus.windows.net/a_topic/Subscriptions/a_subscription'
> >>> purl=proton.Url(url)
> >>> purl
> Url('amqps://a_name:1w6MN0yeUqLUwDdWHk/xIR2Z6aIrhslm69lYtHA0r5E=@a_namespace.servicebus.windows.net:amqps/a_topic/Subscriptions/a_subscription')
> >>> container = Container()
> >>> receiver = container.create_receiver(purl)
> Traceback (most recent call last):
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3940, in _port_int
> return int(value)
> ValueError: invalid literal for int() with base 10: '1w6MN0yeUqLUwDdWHk'
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3943, in _port_int
> return socket.getservbyname(value)
> OSError: service/proto not found
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
>   File "", line 1, in 
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 738, in create_receiver
> session = self._get_session(context)
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 660, in _get_session
> return self._get_session(self.connect(url=context))
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 637, in connect
> if url: connector.address = Urls([url])
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 577, in __init__
> self.values = [Url(v) for v in values]
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 577, in 
> self.values = [Url(v) for v in values]
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3967, in __init__
> if defaults: self.defaults()
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 4010, in defaults
> self.port = self.port or self.Port(self.scheme)
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3984, in _get_port
> return portstr and Url.Port(portstr)
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3928, in __new__
> port = super(Url.Port, cls).__new__(cls, cls._port_int(value))
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3949, in _port_int
> raise ValueError("Not a valid port number or service name: '%s'" % value)
> ValueError: Not a valid port number or service name: '1w6MN0yeUqLUwDdWHk'
> >>> 
> >>> purl.port
> 5671
> >>> purl.password
> '1w6MN0yeUqLUwDdWHk/xIR2Z6aIrhslm69lYtHA0r5E='
> >>> purl.host
> 'a_namespace.servicebus.windows.net'
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PROTON-995) Url fails to parse URL

2015-11-19 Thread Alan Conway (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15013743#comment-15013743
 ] 

Alan Conway commented on PROTON-995:


problem with round trip parse/stringify 

> Url fails to parse URL
> --
>
> Key: PROTON-995
> URL: https://issues.apache.org/jira/browse/PROTON-995
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: python-binding
>Affects Versions: 0.10
> Environment: Linux, Python 3.4.3
>Reporter: Javier Ruere
>Assignee: Alan Conway
>
> proton.Url apparently parses an URL correctly but then it fails as if it was 
> parsed incorrectly.
> It appears to fail to handle the escaped characters in the password and using 
> a default port.
> {quote}
> >>> import proton
> >>> from proton.reactor import Container
> >>> url = 
> >>> 'amqps://a_name:1w6MN0yeUqLUwDdWHk%2FxIR2Z6aIrhslm69lYtHA0r5E%3D@a_namespace.servicebus.windows.net/a_topic/Subscriptions/a_subscription'
> >>> purl=proton.Url(url)
> >>> purl
> Url('amqps://a_name:1w6MN0yeUqLUwDdWHk/xIR2Z6aIrhslm69lYtHA0r5E=@a_namespace.servicebus.windows.net:amqps/a_topic/Subscriptions/a_subscription')
> >>> container = Container()
> >>> receiver = container.create_receiver(purl)
> Traceback (most recent call last):
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3940, in _port_int
> return int(value)
> ValueError: invalid literal for int() with base 10: '1w6MN0yeUqLUwDdWHk'
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3943, in _port_int
> return socket.getservbyname(value)
> OSError: service/proto not found
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
>   File "", line 1, in 
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 738, in create_receiver
> session = self._get_session(context)
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 660, in _get_session
> return self._get_session(self.connect(url=context))
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 637, in connect
> if url: connector.address = Urls([url])
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 577, in __init__
> self.values = [Url(v) for v in values]
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 577, in 
> self.values = [Url(v) for v in values]
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3967, in __init__
> if defaults: self.defaults()
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 4010, in defaults
> self.port = self.port or self.Port(self.scheme)
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3984, in _get_port
> return portstr and Url.Port(portstr)
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3928, in __new__
> port = super(Url.Port, cls).__new__(cls, cls._port_int(value))
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3949, in _port_int
> raise ValueError("Not a valid port number or service name: '%s'" % value)
> ValueError: Not a valid port number or service name: '1w6MN0yeUqLUwDdWHk'
> >>> 
> >>> purl.port
> 5671
> >>> purl.password
> '1w6MN0yeUqLUwDdWHk/xIR2Z6aIrhslm69lYtHA0r5E='
> >>> purl.host
> 'a_namespace.servicebus.windows.net'
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PROTON-995) Url fails to parse URL

2015-11-19 Thread Alan Conway (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15013736#comment-15013736
 ] 

Alan Conway commented on PROTON-995:


Note to self: review other language bindings with URL wrappers for similar 
round-trip issues. 
Go is OK (uses net.URL, not a wrapper) 
Ruby/C++ might have the same problem.
Javascript, Perl, PHP???


> Url fails to parse URL
> --
>
> Key: PROTON-995
> URL: https://issues.apache.org/jira/browse/PROTON-995
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: python-binding
>Affects Versions: 0.10
> Environment: Linux, Python 3.4.3
>Reporter: Javier Ruere
>Assignee: Alan Conway
>
> proton.Url apparently parses an URL correctly but then it fails as if it was 
> parsed incorrectly.
> It appears to fail to handle the escaped characters in the password and using 
> a default port.
> {quote}
> >>> import proton
> >>> from proton.reactor import Container
> >>> url = 
> >>> 'amqps://a_name:1w6MN0yeUqLUwDdWHk%2FxIR2Z6aIrhslm69lYtHA0r5E%3D@a_namespace.servicebus.windows.net/a_topic/Subscriptions/a_subscription'
> >>> purl=proton.Url(url)
> >>> purl
> Url('amqps://a_name:1w6MN0yeUqLUwDdWHk/xIR2Z6aIrhslm69lYtHA0r5E=@a_namespace.servicebus.windows.net:amqps/a_topic/Subscriptions/a_subscription')
> >>> container = Container()
> >>> receiver = container.create_receiver(purl)
> Traceback (most recent call last):
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3940, in _port_int
> return int(value)
> ValueError: invalid literal for int() with base 10: '1w6MN0yeUqLUwDdWHk'
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3943, in _port_int
> return socket.getservbyname(value)
> OSError: service/proto not found
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
>   File "", line 1, in 
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 738, in create_receiver
> session = self._get_session(context)
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 660, in _get_session
> return self._get_session(self.connect(url=context))
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 637, in connect
> if url: connector.address = Urls([url])
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 577, in __init__
> self.values = [Url(v) for v in values]
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 577, in 
> self.values = [Url(v) for v in values]
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3967, in __init__
> if defaults: self.defaults()
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 4010, in defaults
> self.port = self.port or self.Port(self.scheme)
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3984, in _get_port
> return portstr and Url.Port(portstr)
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3928, in __new__
> port = super(Url.Port, cls).__new__(cls, cls._port_int(value))
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3949, in _port_int
> raise ValueError("Not a valid port number or service name: '%s'" % value)
> ValueError: Not a valid port number or service name: '1w6MN0yeUqLUwDdWHk'
> >>> 
> >>> purl.port
> 5671
> >>> purl.password
> '1w6MN0yeUqLUwDdWHk/xIR2Z6aIrhslm69lYtHA0r5E='
> >>> purl.host
> 'a_namespace.servicebus.windows.net'
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PROTON-995) Url fails to parse URL

2015-11-19 Thread Alan Conway (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15013725#comment-15013725
 ] 

Alan Conway commented on PROTON-995:


Sorry, I mis-understood, you are 100% correct. The problem is in the python Url 
class. The underlying C URL parser decodes the escapes correctly but the python 
Url class does not re-encode them so the round-trip Url(str(Url('something with 
escapes')) causes madness. I can fix this for the next release and will post 
the patch here if that helps, otherwise in the short term try this workaround:

c = Container()
conn = 
Container.connection('amqps://a_name:1w6MN0yeUqLUwDdWHk%2FxIR2Z6aIrhslm69lYtHA0r5E%3D@a_namespace.servicebus.windows.net')
r = c.create_receiver(conn, source='a_topic/Subscriptions/a_subscription')

This should avoids the python URL class by sending the connection details 
straight to C. It means you have to keep track of the connection rather than 
letting the container do it for ou  (which personally I prefer) and you need to 
split out the path part of the URL yourself and pass as the source= arg to 
create_receiver. Use create_sender(conn, target=xxx) for a sender

> Url fails to parse URL
> --
>
> Key: PROTON-995
> URL: https://issues.apache.org/jira/browse/PROTON-995
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: python-binding
>Affects Versions: 0.10
> Environment: Linux, Python 3.4.3
>Reporter: Javier Ruere
>Assignee: Alan Conway
>
> proton.Url apparently parses an URL correctly but then it fails as if it was 
> parsed incorrectly.
> It appears to fail to handle the escaped characters in the password and using 
> a default port.
> {quote}
> >>> import proton
> >>> from proton.reactor import Container
> >>> url = 
> >>> 'amqps://a_name:1w6MN0yeUqLUwDdWHk%2FxIR2Z6aIrhslm69lYtHA0r5E%3D@a_namespace.servicebus.windows.net/a_topic/Subscriptions/a_subscription'
> >>> purl=proton.Url(url)
> >>> purl
> Url('amqps://a_name:1w6MN0yeUqLUwDdWHk/xIR2Z6aIrhslm69lYtHA0r5E=@a_namespace.servicebus.windows.net:amqps/a_topic/Subscriptions/a_subscription')
> >>> container = Container()
> >>> receiver = container.create_receiver(purl)
> Traceback (most recent call last):
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3940, in _port_int
> return int(value)
> ValueError: invalid literal for int() with base 10: '1w6MN0yeUqLUwDdWHk'
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3943, in _port_int
> return socket.getservbyname(value)
> OSError: service/proto not found
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
>   File "", line 1, in 
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 738, in create_receiver
> session = self._get_session(context)
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 660, in _get_session
> return self._get_session(self.connect(url=context))
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 637, in connect
> if url: connector.address = Urls([url])
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 577, in __init__
> self.values = [Url(v) for v in values]
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 577, in 
> self.values = [Url(v) for v in values]
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3967, in __init__
> if defaults: self.defaults()
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 4010, in defaults
> self.port = self.port or self.Port(self.scheme)
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3984, in _get_port
> return portstr and Url.Port(portstr)
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3928, in __new__
> port = super(Url.Port, cls).__new__(cls, cls._port_int(value))
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3949, in _port_int
> raise ValueError("Not a valid port number or service name: '%s'" % value)
> ValueError: Not a valid port number or service name: '1w6MN0yeUqLUwDdWHk'
> >>> 
> >>> purl.port
> 5671
> >>> purl.password
> '1w6MN0yeUqLUwDdWHk/xIR2Z6aIrhslm69

[jira] [Commented] (PROTON-995) Url fails to parse URL

2015-11-19 Thread Javier Ruere (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15013631#comment-15013631
 ] 

Javier Ruere commented on PROTON-995:
-

If you look at the end of the interpreter session I pasted, the Url properties 
seem OK. The problem appears when it's actually used.
Sorry the session is so long.

I'm using version 0.10 in Arch Linux connecting to Azure ServiceBus.

> Url fails to parse URL
> --
>
> Key: PROTON-995
> URL: https://issues.apache.org/jira/browse/PROTON-995
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: python-binding
>Affects Versions: 0.10
> Environment: Linux, Python 3.4.3
>Reporter: Javier Ruere
>Assignee: Alan Conway
>
> proton.Url apparently parses an URL correctly but then it fails as if it was 
> parsed incorrectly.
> It appears to fail to handle the escaped characters in the password and using 
> a default port.
> {quote}
> >>> import proton
> >>> from proton.reactor import Container
> >>> url = 
> >>> 'amqps://a_name:1w6MN0yeUqLUwDdWHk%2FxIR2Z6aIrhslm69lYtHA0r5E%3D@a_namespace.servicebus.windows.net/a_topic/Subscriptions/a_subscription'
> >>> purl=proton.Url(url)
> >>> purl
> Url('amqps://a_name:1w6MN0yeUqLUwDdWHk/xIR2Z6aIrhslm69lYtHA0r5E=@a_namespace.servicebus.windows.net:amqps/a_topic/Subscriptions/a_subscription')
> >>> container = Container()
> >>> receiver = container.create_receiver(purl)
> Traceback (most recent call last):
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3940, in _port_int
> return int(value)
> ValueError: invalid literal for int() with base 10: '1w6MN0yeUqLUwDdWHk'
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3943, in _port_int
> return socket.getservbyname(value)
> OSError: service/proto not found
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
>   File "", line 1, in 
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 738, in create_receiver
> session = self._get_session(context)
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 660, in _get_session
> return self._get_session(self.connect(url=context))
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 637, in connect
> if url: connector.address = Urls([url])
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 577, in __init__
> self.values = [Url(v) for v in values]
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 577, in 
> self.values = [Url(v) for v in values]
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3967, in __init__
> if defaults: self.defaults()
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 4010, in defaults
> self.port = self.port or self.Port(self.scheme)
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3984, in _get_port
> return portstr and Url.Port(portstr)
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3928, in __new__
> port = super(Url.Port, cls).__new__(cls, cls._port_int(value))
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3949, in _port_int
> raise ValueError("Not a valid port number or service name: '%s'" % value)
> ValueError: Not a valid port number or service name: '1w6MN0yeUqLUwDdWHk'
> >>> 
> >>> purl.port
> 5671
> >>> purl.password
> '1w6MN0yeUqLUwDdWHk/xIR2Z6aIrhslm69lYtHA0r5E='
> >>> purl.host
> 'a_namespace.servicebus.windows.net'
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PROTON-995) Url fails to parse URL

2015-11-18 Thread Alan Conway (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15012026#comment-15012026
 ] 

Alan Conway commented on PROTON-995:


This works for me on the current proton trunk. What version are you using? 
Here's the test I used to verify, all the data from the URL is parsed 
correctly, escapes in the password are substituted and the default port value 
5671 is the expected default value for an amqps:// URL.

def test_proton_995(self):
u = 
Url("amqps://a_name:1w6MN0yeUqLUwDdWHk%2FxIR2Z6aIrhslm69lYtHA0r5E%3D@a_namespace.servicebus.windows.net/a_topic/Subscriptions/a_subscription")
self.assertEqual('amqps', u.scheme)
self.assertEqual('a_name', u.username)
self.assertEqual('1w6MN0yeUqLUwDdWHk/xIR2Z6aIrhslm69lYtHA0r5E=', 
u.password) # escapes are substituted
self.assertEqual('a_namespace.servicebus.windows.net', u.host)
self.assertEqual(5671, u.port) # Default for amqps://
self.assertEqual('a_topic/Subscriptions/a_subscription', u.path)


> Url fails to parse URL
> --
>
> Key: PROTON-995
> URL: https://issues.apache.org/jira/browse/PROTON-995
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: python-binding
>Affects Versions: 0.10
> Environment: Linux, Python 3.4.3
>Reporter: Javier Ruere
>
> proton.Url apparently parses an URL correctly but then it fails as if it was 
> parsed incorrectly.
> It appears to fail to handle the escaped characters in the password and using 
> a default port.
> {quote}
> >>> import proton
> >>> from proton.reactor import Container
> >>> url = 
> >>> 'amqps://a_name:1w6MN0yeUqLUwDdWHk%2FxIR2Z6aIrhslm69lYtHA0r5E%3D@a_namespace.servicebus.windows.net/a_topic/Subscriptions/a_subscription'
> >>> purl=proton.Url(url)
> >>> purl
> Url('amqps://a_name:1w6MN0yeUqLUwDdWHk/xIR2Z6aIrhslm69lYtHA0r5E=@a_namespace.servicebus.windows.net:amqps/a_topic/Subscriptions/a_subscription')
> >>> container = Container()
> >>> receiver = container.create_receiver(purl)
> Traceback (most recent call last):
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3940, in _port_int
> return int(value)
> ValueError: invalid literal for int() with base 10: '1w6MN0yeUqLUwDdWHk'
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3943, in _port_int
> return socket.getservbyname(value)
> OSError: service/proto not found
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
>   File "", line 1, in 
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 738, in create_receiver
> session = self._get_session(context)
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 660, in _get_session
> return self._get_session(self.connect(url=context))
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 637, in connect
> if url: connector.address = Urls([url])
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 577, in __init__
> self.values = [Url(v) for v in values]
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 577, in 
> self.values = [Url(v) for v in values]
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3967, in __init__
> if defaults: self.defaults()
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 4010, in defaults
> self.port = self.port or self.Port(self.scheme)
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3984, in _get_port
> return portstr and Url.Port(portstr)
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3928, in __new__
> port = super(Url.Port, cls).__new__(cls, cls._port_int(value))
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3949, in _port_int
> raise ValueError("Not a valid port number or service name: '%s'" % value)
> ValueError: Not a valid port number or service name: '1w6MN0yeUqLUwDdWHk'
> >>> 
> >>> purl.port
> 5671
> >>> purl.password
> '1w6MN0yeUqLUwDdWHk/xIR2Z6aIrhslm69lYtHA0r5E='
> >>> purl.host
> 'a_namespace.servicebus.windows.net'
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PROTON-995) Url fails to parse URL

2015-11-16 Thread Javier Ruere (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15007479#comment-15007479
 ] 

Javier Ruere commented on PROTON-995:
-

Is any additional information needed?

> Url fails to parse URL
> --
>
> Key: PROTON-995
> URL: https://issues.apache.org/jira/browse/PROTON-995
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: python-binding
>Affects Versions: 0.10
> Environment: Linux, Python 3.4.3
>Reporter: Javier Ruere
>
> proton.Url apparently parses an URL correctly but then it fails as if it was 
> parsed incorrectly.
> It appears to fail to handle the escaped characters in the password and using 
> a default port.
> {quote}
> >>> import proton
> >>> from proton.reactor import Container
> >>> url = 
> >>> 'amqps://a_name:1w6MN0yeUqLUwDdWHk%2FxIR2Z6aIrhslm69lYtHA0r5E%3D@a_namespace.servicebus.windows.net/a_topic/Subscriptions/a_subscription'
> >>> purl=proton.Url(url)
> >>> purl
> Url('amqps://a_name:1w6MN0yeUqLUwDdWHk/xIR2Z6aIrhslm69lYtHA0r5E=@a_namespace.servicebus.windows.net:amqps/a_topic/Subscriptions/a_subscription')
> >>> container = Container()
> >>> receiver = container.create_receiver(purl)
> Traceback (most recent call last):
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3940, in _port_int
> return int(value)
> ValueError: invalid literal for int() with base 10: '1w6MN0yeUqLUwDdWHk'
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3943, in _port_int
> return socket.getservbyname(value)
> OSError: service/proto not found
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
>   File "", line 1, in 
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 738, in create_receiver
> session = self._get_session(context)
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 660, in _get_session
> return self._get_session(self.connect(url=context))
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 637, in connect
> if url: connector.address = Urls([url])
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 577, in __init__
> self.values = [Url(v) for v in values]
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/reactor.py",
>  line 577, in 
> self.values = [Url(v) for v in values]
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3967, in __init__
> if defaults: self.defaults()
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 4010, in defaults
> self.port = self.port or self.Port(self.scheme)
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3984, in _get_port
> return portstr and Url.Port(portstr)
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3928, in __new__
> port = super(Url.Port, cls).__new__(cls, cls._port_int(value))
>   File 
> "/home/javier/tmp/virtualenvs/ss-update/lib/python3.4/site-packages/proton/__init__.py",
>  line 3949, in _port_int
> raise ValueError("Not a valid port number or service name: '%s'" % value)
> ValueError: Not a valid port number or service name: '1w6MN0yeUqLUwDdWHk'
> >>> 
> >>> purl.port
> 5671
> >>> purl.password
> '1w6MN0yeUqLUwDdWHk/xIR2Z6aIrhslm69lYtHA0r5E='
> >>> purl.host
> 'a_namespace.servicebus.windows.net'
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)