{"action":"created","issue":{"url":"https://api.github.com/repos/python/mypy/issues/1504","repository_url":"https://api.github.com/repos/python/mypy","labels_url":"https://api.github.com/repos/python/mypy/issues/1504/labels{/name}","comments_url":"https://api.github.com/repos/python/mypy/issues/1504/comments","events_url":"https://api.github.com/repos/python/mypy/issues/1504/events","html_url":"https://github.com/python/mypy/pull/1504","id":153579469,"number":1504,"title":"Windows test fixes and CI with AppVeyor","user":{"login":"jtatum","id":340001,"avatar_url":"https://avatars.githubusercontent.com/u/340001?v=3","gravatar_id":"","url":"https://api.github.com/users/jtatum","html_url":"https://github.com/jtatum","followers_url":"https://api.github.com/users/jtatum/followers","following_url":"https://api.github.com/users/jtatum/following{/other_user}","gists_url":"https://api.github.com/users/jtatum/gists{/gist_id}","starred_url":"https://api.github.com/users/jtatum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtatum/subscriptions","organizations_url":"https://api.github.com/users/jtatum/orgs","repos_url":"https://api.github.com/users/jtatum/repos","events_url":"https://api.github.com/users/jtatum/events{/privacy}","received_events_url":"https://api.github.com/users/jtatum/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-05-07T07:28:36Z","updated_at":"2016-05-07T20:53:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/python/mypy/pulls/1504","html_url":"https://github.com/python/mypy/pull/1504","diff_url":"https://github.com/python/mypy/pull/1504.diff","patch_url":"https://github.com/python/mypy/pull/1504.patch"},"body":"I noticed in #1353 that testing for the new parser is needed on Windows. I thought I'd get that started with some CI from AppVeyor. It turned out to be a bit more complicated than that.\r\n\r\n* util.try_find_python2_interpreter() doesn't work well on Windows. I cheat in appveyor.yml by renaming Python 2.7's python.exe to python2.exe. I'm not sure how you could find multiple interpreters in the path on Windows since those handy version symlinks (python3, python35, etc) don't exist.\r\n* waiter, the parallel execution task runner, used some posix tricks to run multiple processes at once and wait for the first one to return. I replaced all that clever code with some much uglier and stupider polling that works on both Windows and saner OSes.\r\n* waiter also tried to open a file that was already open. On Windows, this is impossible. It's okay, though, because NamedTemporaryFile (and TemporaryFile) give you a file-like object with a file already open in binary mode. It looks like the stub generation test cases are failing with a similar issue.\r\n\r\nThis is what the tests look like on Windows: https://ci.appveyor.com/project/jtatum/mypy/build/1.0.16\r\n\r\nStill to-do:\r\n\r\n- [x] Fix failing tests on Windows. Most look like path differences (forward vs. backslash) and NamedTempFile. A couple seem a bit more mysterious.\r\n- [x] Add os.replace() to typeshed"},"comment":{"url":"https://api.github.com/repos/python/mypy/issues/comments/217668246","html_url":"https://github.com/python/mypy/pull/1504#issuecomment-217668246","issue_url":"https://api.github.com/repos/python/mypy/issues/1504","id":217668246,"user":{"login":"jtatum","id":340001,"avatar_url":"https://avatars.githubusercontent.com/u/340001?v=3","gravatar_id":"","url":"https://api.github.com/users/jtatum","html_url":"https://github.com/jtatum","followers_url":"https://api.github.com/users/jtatum/followers","following_url":"https://api.github.com/users/jtatum/following{/other_user}","gists_url":"https://api.github.com/users/jtatum/gists{/gist_id}","starred_url":"https://api.github.com/users/jtatum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtatum/subscriptions","organizations_url":"https://api.github.com/users/jtatum/orgs","repos_url":"https://api.github.com/users/jtatum/repos","events_url":"https://api.github.com/users/jtatum/events{/privacy}","received_events_url":"https://api.github.com/users/jtatum/received_events","type":"User","site_admin":false},"created_at":"2016-05-07T20:53:20Z","updated_at":"2016-05-07T20:53:20Z","body":"I'm not sure why the type checking works on Python 3.2 after adding os.replace() to typeshed (I put it on a conditional for Python 3.3 or newer) but everything looks good now. Latest Windows build: https://ci.appveyor.com/project/jtatum/mypy/build/1.0.21"}}