{"action":"created","issue":{"url":"https://api.github.com/repos/SurveyMonkey/pycobertura/issues/72","labels_url":"https://api.github.com/repos/SurveyMonkey/pycobertura/issues/72/labels{/name}","comments_url":"https://api.github.com/repos/SurveyMonkey/pycobertura/issues/72/comments","events_url":"https://api.github.com/repos/SurveyMonkey/pycobertura/issues/72/events","html_url":"https://github.com/SurveyMonkey/pycobertura/pull/72","id":115618571,"number":72,"title":"Added coverage v4.0.x compatibility by changing class element lookups to use 'filename' instead of the 'name' attribute","user":{"login":"JonSchuff","id":981899,"avatar_url":"https://avatars.githubusercontent.com/u/981899?v=3","gravatar_id":"","url":"https://api.github.com/users/JonSchuff","html_url":"https://github.com/JonSchuff","followers_url":"https://api.github.com/users/JonSchuff/followers","following_url":"https://api.github.com/users/JonSchuff/following{/other_user}","gists_url":"https://api.github.com/users/JonSchuff/gists{/gist_id}","starred_url":"https://api.github.com/users/JonSchuff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JonSchuff/subscriptions","organizations_url":"https://api.github.com/users/JonSchuff/orgs","repos_url":"https://api.github.com/users/JonSchuff/repos","events_url":"https://api.github.com/users/JonSchuff/events{/privacy}","received_events_url":"https://api.github.com/users/JonSchuff/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-07T00:36:22Z","updated_at":"2015-11-09T19:13:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/SurveyMonkey/pycobertura/pulls/72","html_url":"https://github.com/SurveyMonkey/pycobertura/pull/72","diff_url":"https://github.com/SurveyMonkey/pycobertura/pull/72.diff","patch_url":"https://github.com/SurveyMonkey/pycobertura/pull/72.patch"},"body":"**Description:**\r\n\r\nChanged cobertura's coverage.xml parsing behavior to lookup class elements by filename attribute for compatibility with coverage v3.7.1 and versions >=4.0.0 and updated the tests accordingly.\r\n\r\n**Rationale:**\r\n\r\nIn newer versions of the coverage library (> 3.7.1), the coverage.xml class element's 'name' attribute has changed from containing the filepath w/o the extension ( ex. \"project/view/myview\" ) to the base filename only ( ex. \"myview.py\" ). The package path context is now represented within the package's name attribute only, which means collisions during name-based lookups are bound to occur (\"project/view/\\__init\\__.py\" and \"project/\\__init\\__.py\" for instance), which will cause the tool to report inaccurate results. Using the filename attribute for identification and lookups is an easy win for compatibility across versions 3.7.1 and up.\r\n\r\nThis hasn't impacted everyone internally *yet* since our current pip index only contains coverage 3.7.1, implicitly locking everyone's coverage testing to that version. However, it will affect all projects that don't have coverage version locked since pytest-cov requires `coverage>=3.7.1` and devpi provides the newest version it can find (4.0.2).\r\n\r\nEdit: here's an [example](https://gist.github.com/JonSchuff/78f4d4ad3bb16bb8bf3a) of the coverage.xml changes."},"comment":{"url":"https://api.github.com/repos/SurveyMonkey/pycobertura/issues/comments/155160192","html_url":"https://github.com/SurveyMonkey/pycobertura/pull/72#issuecomment-155160192","issue_url":"https://api.github.com/repos/SurveyMonkey/pycobertura/issues/72","id":155160192,"user":{"login":"aconrad","id":247661,"avatar_url":"https://avatars.githubusercontent.com/u/247661?v=3","gravatar_id":"","url":"https://api.github.com/users/aconrad","html_url":"https://github.com/aconrad","followers_url":"https://api.github.com/users/aconrad/followers","following_url":"https://api.github.com/users/aconrad/following{/other_user}","gists_url":"https://api.github.com/users/aconrad/gists{/gist_id}","starred_url":"https://api.github.com/users/aconrad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aconrad/subscriptions","organizations_url":"https://api.github.com/users/aconrad/orgs","repos_url":"https://api.github.com/users/aconrad/repos","events_url":"https://api.github.com/users/aconrad/events{/privacy}","received_events_url":"https://api.github.com/users/aconrad/received_events","type":"User","site_admin":false},"created_at":"2015-11-09T19:13:35Z","updated_at":"2015-11-09T19:13:35Z","body":"Additionally, we should change any reference of \"class_name\" to \"class_filename\" since we're fundamentally changing how we identify a class. So renaming methods, doc strings, ... Are you up for the challenge? :)\r\n\r\nMaybe we should do this as part of another PR though (which I could do)."}}