{"action":"created","issue":{"url":"https://api.github.com/repos/crossbario/autobahn-python/issues/576","labels_url":"https://api.github.com/repos/crossbario/autobahn-python/issues/576/labels{/name}","comments_url":"https://api.github.com/repos/crossbario/autobahn-python/issues/576/comments","events_url":"https://api.github.com/repos/crossbario/autobahn-python/issues/576/events","html_url":"https://github.com/crossbario/autobahn-python/pull/576","id":126583533,"number":576,"title":"ConnectionDeny: improved Python 3 support.","user":{"login":"mrwhhc","id":13318941,"avatar_url":"https://avatars.githubusercontent.com/u/13318941?v=3","gravatar_id":"","url":"https://api.github.com/users/mrwhhc","html_url":"https://github.com/mrwhhc","followers_url":"https://api.github.com/users/mrwhhc/followers","following_url":"https://api.github.com/users/mrwhhc/following{/other_user}","gists_url":"https://api.github.com/users/mrwhhc/gists{/gist_id}","starred_url":"https://api.github.com/users/mrwhhc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrwhhc/subscriptions","organizations_url":"https://api.github.com/users/mrwhhc/orgs","repos_url":"https://api.github.com/users/mrwhhc/repos","events_url":"https://api.github.com/users/mrwhhc/events{/privacy}","received_events_url":"https://api.github.com/users/mrwhhc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-14T06:06:16Z","updated_at":"2016-01-14T23:46:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/crossbario/autobahn-python/pulls/576","html_url":"https://github.com/crossbario/autobahn-python/pull/576","diff_url":"https://github.com/crossbario/autobahn-python/pull/576.diff","patch_url":"https://github.com/crossbario/autobahn-python/pull/576.patch"},"body":"Using Autobahn's Twisted server protocols on Python 3 can result in unreadable error messages when an incoming connection is denied.  That's because `ConnectionDeny` asserts that it's reason is of type `unicode`, which doesn't exist on Python 3.\r\n\r\nA solution is to a) change the assertion to check against `six.text_type` and b) ensure that all relevant call points provide a unicode string.\r\n\r\nThis pull request does just that, and also fixes a similar issue in `ConnectionAccept.`\r\n\r\nFuzz testing passed and unittest2 passed for Python 2 but I'm unclear how best to write a test for Python 3, as it appears the unit tests for Python 3 require asyncio."},"comment":{"url":"https://api.github.com/repos/crossbario/autobahn-python/issues/comments/171819329","html_url":"https://github.com/crossbario/autobahn-python/pull/576#issuecomment-171819329","issue_url":"https://api.github.com/repos/crossbario/autobahn-python/issues/576","id":171819329,"user":{"login":"mrwhhc","id":13318941,"avatar_url":"https://avatars.githubusercontent.com/u/13318941?v=3","gravatar_id":"","url":"https://api.github.com/users/mrwhhc","html_url":"https://github.com/mrwhhc","followers_url":"https://api.github.com/users/mrwhhc/followers","following_url":"https://api.github.com/users/mrwhhc/following{/other_user}","gists_url":"https://api.github.com/users/mrwhhc/gists{/gist_id}","starred_url":"https://api.github.com/users/mrwhhc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrwhhc/subscriptions","organizations_url":"https://api.github.com/users/mrwhhc/orgs","repos_url":"https://api.github.com/users/mrwhhc/repos","events_url":"https://api.github.com/users/mrwhhc/events{/privacy}","received_events_url":"https://api.github.com/users/mrwhhc/received_events","type":"User","site_admin":false},"created_at":"2016-01-14T23:46:17Z","updated_at":"2016-01-14T23:46:17Z","body":"This seems to close #573 "}}