{"action":"created","issue":{"url":"https://api.github.com/repos/tavendo/AutobahnPython/issues/487","labels_url":"https://api.github.com/repos/tavendo/AutobahnPython/issues/487/labels{/name}","comments_url":"https://api.github.com/repos/tavendo/AutobahnPython/issues/487/comments","events_url":"https://api.github.com/repos/tavendo/AutobahnPython/issues/487/events","html_url":"https://github.com/tavendo/AutobahnPython/issues/487","id":105251257,"number":487,"title":"Import from private Twisted module breaks Autobahn on Windows","user":{"login":"egwhoi","id":3065703,"avatar_url":"https://avatars.githubusercontent.com/u/3065703?v=3","gravatar_id":"","url":"https://api.github.com/users/egwhoi","html_url":"https://github.com/egwhoi","followers_url":"https://api.github.com/users/egwhoi/followers","following_url":"https://api.github.com/users/egwhoi/following{/other_user}","gists_url":"https://api.github.com/users/egwhoi/gists{/gist_id}","starred_url":"https://api.github.com/users/egwhoi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egwhoi/subscriptions","organizations_url":"https://api.github.com/users/egwhoi/orgs","repos_url":"https://api.github.com/users/egwhoi/repos","events_url":"https://api.github.com/users/egwhoi/events{/privacy}","received_events_url":"https://api.github.com/users/egwhoi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tavendo/AutobahnPython/labels/bug","name":"bug","color":"e10c02"},{"url":"https://api.github.com/repos/tavendo/AutobahnPython/labels/Twisted","name":"Twisted","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-07T17:42:09Z","updated_at":"2015-09-08T16:22:57Z","closed_at":null,"body":"When running on Windows with Twisted 15.4.0, the changes made in c517e9f generate an exception, since importing ```PipeAddress``` from ```twisted.internet._posixstdio``` calls ```detectLinuxBrokenPipeBehavior```, which only works on Posix systems.\r\n\r\nRemoving the changes from this commit fixes the problem, and seems to only make a cosmetic change.  Arguably, importing from a private module is fraught with peril, and probably shouldn't be done.\r\n\r\nHere is an example stack trace showing the problem:\r\n```\r\nTraceback (most recent call last):\r\n  File \"C:\\Python27\\Scripts\\crossbar-script.py\", line 9, in <module>\r\n    load_entry_point('crossbar==0.10.4', 'console_scripts', 'crossbar')()\r\n  File \"C:\\Python27\\lib\\site-packages\\crossbar\\controller\\cli.py\", line 665, in run\r\n    options.func(options)\r\n  File \"C:\\Python27\\lib\\site-packages\\crossbar\\controller\\cli.py\", line 402, in run_command_start\r\n    from crossbar.controller.node import Node\r\n  File \"C:\\Python27\\lib\\site-packages\\crossbar\\controller\\node.py\", line 51, in <module>\r\n    from crossbar.controller.process import NodeControllerSession\r\n  File \"C:\\Python27\\lib\\site-packages\\crossbar\\controller\\process.py\", line 52, in <module>\r\n    from autobahn.twisted.util import sleep\r\n  File \"C:\\Python27\\lib\\site-packages\\autobahn\\twisted\\util.py\", line 31, in <module>\r\n    from twisted.internet._posixstdio import PipeAddress\r\n  File \"C:\\Python27\\lib\\site-packages\\twisted\\internet\\_posixstdio.py\", line 16, in <module>\r\n    from twisted.internet import process, error, interfaces\r\n  File \"C:\\Python27\\lib\\site-packages\\twisted\\internet\\process.py\", line 119, in <module>\r\n    brokenLinuxPipeBehavior = detectLinuxBrokenPipeBehavior()\r\n  File \"C:\\Python27\\lib\\site-packages\\twisted\\internet\\process.py\", line 107, in detectLinuxBrokenPipeBehavior\r\n    reads, writes, exes = select.select([w], [], [], 0)\r\nselect.error: (10038, 'An operation was attempted on something that is not a socket')\r\n```"},"comment":{"url":"https://api.github.com/repos/tavendo/AutobahnPython/issues/comments/138619640","html_url":"https://github.com/tavendo/AutobahnPython/issues/487#issuecomment-138619640","issue_url":"https://api.github.com/repos/tavendo/AutobahnPython/issues/487","id":138619640,"user":{"login":"meejah","id":145599,"avatar_url":"https://avatars.githubusercontent.com/u/145599?v=3","gravatar_id":"","url":"https://api.github.com/users/meejah","html_url":"https://github.com/meejah","followers_url":"https://api.github.com/users/meejah/followers","following_url":"https://api.github.com/users/meejah/following{/other_user}","gists_url":"https://api.github.com/users/meejah/gists{/gist_id}","starred_url":"https://api.github.com/users/meejah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meejah/subscriptions","organizations_url":"https://api.github.com/users/meejah/orgs","repos_url":"https://api.github.com/users/meejah/repos","events_url":"https://api.github.com/users/meejah/events{/privacy}","received_events_url":"https://api.github.com/users/meejah/received_events","type":"User","site_admin":false},"created_at":"2015-09-08T16:22:57Z","updated_at":"2015-09-08T16:22:57Z","body":"I could do something a little cheezy like:\r\n\r\n```python\r\ntry:\r\n    import ... PipeAddress\r\nexcept:\r\n    PipeAddress = None\r\n```"}}