{"action":"created","issue":{"url":"https://api.github.com/repos/astropy/astropy/issues/4793","repository_url":"https://api.github.com/repos/astropy/astropy","labels_url":"https://api.github.com/repos/astropy/astropy/issues/4793/labels{/name}","comments_url":"https://api.github.com/repos/astropy/astropy/issues/4793/comments","events_url":"https://api.github.com/repos/astropy/astropy/issues/4793/events","html_url":"https://github.com/astropy/astropy/pull/4793","id":149694466,"number":4793,"title":"current workaround #4792 for appveyor python 3.5 does not work correctly","user":{"login":"MSeifert04","id":14200878,"avatar_url":"https://avatars.githubusercontent.com/u/14200878?v=3","gravatar_id":"","url":"https://api.github.com/users/MSeifert04","html_url":"https://github.com/MSeifert04","followers_url":"https://api.github.com/users/MSeifert04/followers","following_url":"https://api.github.com/users/MSeifert04/following{/other_user}","gists_url":"https://api.github.com/users/MSeifert04/gists{/gist_id}","starred_url":"https://api.github.com/users/MSeifert04/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MSeifert04/subscriptions","organizations_url":"https://api.github.com/users/MSeifert04/orgs","repos_url":"https://api.github.com/users/MSeifert04/repos","events_url":"https://api.github.com/users/MSeifert04/events{/privacy}","received_events_url":"https://api.github.com/users/MSeifert04/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/astropy/astropy/labels/Affects-release","name":"Affects-release","color":"0052cc"},{"url":"https://api.github.com/repos/astropy/astropy/labels/io.fits","name":"io.fits","color":"c7def8"},{"url":"https://api.github.com/repos/astropy/astropy/labels/Ready-for-final-review","name":"Ready-for-final-review","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2016-04-20T08:15:25Z","updated_at":"2016-06-11T08:57:29Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/astropy/astropy/pulls/4793","html_url":"https://github.com/astropy/astropy/pull/4793","diff_url":"https://github.com/astropy/astropy/pull/4793.diff","patch_url":"https://github.com/astropy/astropy/pull/4793.patch"},"body":"I thought #4792 might be a good idea and at least the tests are passing but inside this workaround just hides the error message. So I dug a bit deeper and I found out that the function `io.fits.util._is_append_mode_platform` was just a workaround because [`python.io.FitsIO`-Instances lost their `\"a\"`-mode](http://bugs.python.org/issue18876). This has been fixed for a while and ported to all supported python versions 2.7 and 3.3+\r\n\r\nThen I tried some things one could put into `io.fits.open` and noticed that on my machine the function call was unnecessary for all things I could think of (also including some things [I wouldn't have thought of](https://github.com/spacetelescope/PyFITS/issues/33)).\r\n\r\nSo this first commit is a test-case that fails with the \"fix\" from #4792 . It fails because depending on the built the [ctypes.cdll.mscvrt](https://docs.python.org/3.5/library/ctypes.html#loading-dynamic-link-libraries) is outdated and contains other constants than the msvcrt that python uses. These constants are hidden since [msvc 14 and are unlikely to be exported again](https://connect.microsoft.com/VisualStudio/feedback/details/1279133).\r\n\r\nI'll submit another commit shortly that (hopefilly) shows that the extra-functions are unnecessary since there is no lost `\"a\"`-mode anymore and even if a file-handle would lose it it's unlikely to be recovered by the current function."},"comment":{"url":"https://api.github.com/repos/astropy/astropy/issues/comments/225345539","html_url":"https://github.com/astropy/astropy/pull/4793#issuecomment-225345539","issue_url":"https://api.github.com/repos/astropy/astropy/issues/4793","id":225345539,"user":{"login":"astrofrog","id":314716,"avatar_url":"https://avatars.githubusercontent.com/u/314716?v=3","gravatar_id":"","url":"https://api.github.com/users/astrofrog","html_url":"https://github.com/astrofrog","followers_url":"https://api.github.com/users/astrofrog/followers","following_url":"https://api.github.com/users/astrofrog/following{/other_user}","gists_url":"https://api.github.com/users/astrofrog/gists{/gist_id}","starred_url":"https://api.github.com/users/astrofrog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astrofrog/subscriptions","organizations_url":"https://api.github.com/users/astrofrog/orgs","repos_url":"https://api.github.com/users/astrofrog/repos","events_url":"https://api.github.com/users/astrofrog/events{/privacy}","received_events_url":"https://api.github.com/users/astrofrog/received_events","type":"User","site_admin":false},"created_at":"2016-06-11T08:57:29Z","updated_at":"2016-06-11T08:57:29Z","body":"Sorry that I let this slip through - I think this does need a quick look by @embray or someone else familiar with ``io.fits`` before we can merge.\r\n\r\n@embray - does this look ok?"}}
{"actor":{"display_login":"astrofrog"}}