{"action":"closed","issue":{"url":"https://api.github.com/repos/numpy/numpy/issues/10712","repository_url":"https://api.github.com/repos/numpy/numpy","labels_url":"https://api.github.com/repos/numpy/numpy/issues/10712/labels{/name}","comments_url":"https://api.github.com/repos/numpy/numpy/issues/10712/comments","events_url":"https://api.github.com/repos/numpy/numpy/issues/10712/events","html_url":"https://github.com/numpy/numpy/issues/10712","id":303733989,"number":10712,"title":"BUG: distutils: Template processing doesn't remove the definition of the \"loop variables\".","user":{"login":"WarrenWeckesser","id":321463,"avatar_url":"https://avatars2.githubusercontent.com/u/321463?v=4","gravatar_id":"","url":"https://api.github.com/users/WarrenWeckesser","html_url":"https://github.com/WarrenWeckesser","followers_url":"https://api.github.com/users/WarrenWeckesser/followers","following_url":"https://api.github.com/users/WarrenWeckesser/following{/other_user}","gists_url":"https://api.github.com/users/WarrenWeckesser/gists{/gist_id}","starred_url":"https://api.github.com/users/WarrenWeckesser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WarrenWeckesser/subscriptions","organizations_url":"https://api.github.com/users/WarrenWeckesser/orgs","repos_url":"https://api.github.com/users/WarrenWeckesser/repos","events_url":"https://api.github.com/users/WarrenWeckesser/events{/privacy}","received_events_url":"https://api.github.com/users/WarrenWeckesser/received_events","type":"User","site_admin":false},"labels":[{"id":6359214,"url":"https://api.github.com/repos/numpy/numpy/labels/00%20-%20Bug","name":"00 - Bug","color":"fef2c0","default":false},{"id":16917063,"url":"https://api.github.com/repos/numpy/numpy/labels/component:%20numpy.distutils","name":"component: numpy.distutils","color":"009800","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-09T06:03:39Z","updated_at":"2018-03-11T01:19:45Z","closed_at":"2018-03-11T01:19:45Z","author_association":"CONTRIBUTOR","body":"Initially this problem was reported as https://github.com/scipy/scipy/issues/8539, where you can see an example of the issue.  It turns out the problem is in numpy/distutils.\r\n\r\nHere's a simple example.  The file `foo.pyf.src` is:\r\n```\r\npython module foo\r\n    <_rd=real,double precision>\r\n    interface\r\n        subroutine <s,d>foosub(tol)\r\n            <_rd>, intent(in,out) :: tol\r\n        end subroutine <s,d>foosub\r\n    end interface\r\nend python module foo\r\n```\r\nWhen this file is processed by `numpy/numpy/distutils/from_template.py`, the result is\r\n```\r\npython module foo\r\n    <_rd=real,double precision>\r\n    interface\r\n        subroutine sfoosub(tol)\r\n            real, intent(in,out) :: tol\r\n        end subroutine sfoosub\r\n\r\n        subroutine dfoosub(tol)\r\n            double precision, intent(in,out) :: tol\r\n        end subroutine dfoosub\r\n\r\n\r\n    end interface\r\nend python module foo\r\n```\r\nThe problem is that the line `<_rd=real,double precision>` has been copied to the output file.  If you process that file with `f2py`, you'll get a warning message stating `crackline:1: No pattern for line`."}}
{"actor":{"display_login":"charris"}}