)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"d48be24c167f2752ba9f505872c4bc048d9b5477","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     melanie witt \u003cmelwitt@yahoo-inc.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-09-16 04:59:41 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"add the ability to get version from METADATA file"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This change adds the ability for pbr to read the package version from"},{"line_number":10,"context_line":"the METADATA file as well as the PKG-INFO file. The PKG-INFO file"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa98f980_9a975f3a","line":7,"updated":"2014-09-16 22:16:49.000000000","message":"Could you say something like\n\n\"Support reading versions from wheels\" - METADATA is the detail, but wheels are the key thing.","commit_id":"1e4826be1e46da472105d051d4196eddae359857"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"5e426a1b5a486bfa5802486a8980764f8d243650","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     melanie witt \u003cmelwitt@yahoo-inc.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-09-16 04:59:41 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"add the ability to get version from METADATA file"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This change adds the ability for pbr to read the package version from"},{"line_number":10,"context_line":"the METADATA file as well as the PKG-INFO file. The PKG-INFO file"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa98f980_1a044f17","line":7,"in_reply_to":"fa98f980_9a975f3a","updated":"2014-09-16 22:45:42.000000000","message":"Done","commit_id":"1e4826be1e46da472105d051d4196eddae359857"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"d48be24c167f2752ba9f505872c4bc048d9b5477","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This change adds the ability for pbr to read the package version from"},{"line_number":10,"context_line":"the METADATA file as well as the PKG-INFO file. The PKG-INFO file"},{"line_number":11,"context_line":"is present for package metadata 1.x but for package metadata 2.0,"},{"line_number":12,"context_line":"there is a METADATA file instead of a PKG-INFO file."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"The longterm guidance is for clients to use pkg_resources to get"},{"line_number":15,"context_line":"the package version instead of using pbr."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa98f980_3ac3d358","line":12,"updated":"2014-09-16 22:16:49.000000000","message":"So package metadata 2.0 is JSON - this is defined in http://legacy.python.org/dev/peps/pep-0427/#the-dist-info-directory - its a wheel thing. Could you please update the prose here to refer to wheels / pep 427, not metadata 2.0 (I know the file has 2.0 in it, but we can\u0027t have nice things :)","commit_id":"1e4826be1e46da472105d051d4196eddae359857"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"5e426a1b5a486bfa5802486a8980764f8d243650","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This change adds the ability for pbr to read the package version from"},{"line_number":10,"context_line":"the METADATA file as well as the PKG-INFO file. The PKG-INFO file"},{"line_number":11,"context_line":"is present for package metadata 1.x but for package metadata 2.0,"},{"line_number":12,"context_line":"there is a METADATA file instead of a PKG-INFO file."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"The longterm guidance is for clients to use pkg_resources to get"},{"line_number":15,"context_line":"the package version instead of using pbr."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa98f980_3a011307","line":12,"in_reply_to":"fa98f980_3ac3d358","updated":"2014-09-16 22:45:42.000000000","message":"Done","commit_id":"1e4826be1e46da472105d051d4196eddae359857"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"d48be24c167f2752ba9f505872c4bc048d9b5477","unresolved":false,"context_lines":[{"line_number":12,"context_line":"there is a METADATA file instead of a PKG-INFO file."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"The longterm guidance is for clients to use pkg_resources to get"},{"line_number":15,"context_line":"the package version instead of using pbr."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Closes-Bug: #1369179"},{"line_number":18,"context_line":"Change-Id: I2fe52c846fd88d37a4ab78de87eec9defce1ba0a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa98f980_3aecb3f3","line":15,"updated":"2014-09-16 22:16:49.000000000","message":"This paragraph here doesn\u0027t reflect consensus in the pbr team - and there are pretty significant implications if it is indeed the wrong thing (which I believe it to be). Could you please remove it.","commit_id":"1e4826be1e46da472105d051d4196eddae359857"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"5e426a1b5a486bfa5802486a8980764f8d243650","unresolved":false,"context_lines":[{"line_number":12,"context_line":"there is a METADATA file instead of a PKG-INFO file."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"The longterm guidance is for clients to use pkg_resources to get"},{"line_number":15,"context_line":"the package version instead of using pbr."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Closes-Bug: #1369179"},{"line_number":18,"context_line":"Change-Id: I2fe52c846fd88d37a4ab78de87eec9defce1ba0a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa98f980_7502cc0a","line":15,"in_reply_to":"fa98f980_3aecb3f3","updated":"2014-09-16 22:45:42.000000000","message":"Sorry about that -- I didn\u0027t realize it wasn\u0027t a consensus when I saw the discussion.","commit_id":"1e4826be1e46da472105d051d4196eddae359857"}],"pbr/packaging.py":[{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"d48be24c167f2752ba9f505872c4bc048d9b5477","unresolved":false,"context_lines":[{"line_number":901,"context_line":""},{"line_number":902,"context_line":""},{"line_number":903,"context_line":"def _get_version_from_pkg_metadata(package_name):"},{"line_number":904,"context_line":"    \"\"\"Get the version from PKG-INFO file (metadata 1.x) if we can."},{"line_number":905,"context_line":"    If that doesn\u0027t work, try to get the version from the METADATA"},{"line_number":906,"context_line":"    file (metadata 2.0)."},{"line_number":907,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_ef718bdf","line":904,"updated":"2014-09-16 22:16:49.000000000","message":"Nit: PEP 257 - blank line here.\n\nAlso the docstring is now confused on the first line. Can I suggest:\n\n \"\"\"Get the version from package metadata if present.\n \n This looks for PKG-INFO if present (for sdists), and if not looks\n for METADATA (for wheels) and failing that will return None.\n \"\"\"","commit_id":"1e4826be1e46da472105d051d4196eddae359857"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"5e426a1b5a486bfa5802486a8980764f8d243650","unresolved":false,"context_lines":[{"line_number":901,"context_line":""},{"line_number":902,"context_line":""},{"line_number":903,"context_line":"def _get_version_from_pkg_metadata(package_name):"},{"line_number":904,"context_line":"    \"\"\"Get the version from PKG-INFO file (metadata 1.x) if we can."},{"line_number":905,"context_line":"    If that doesn\u0027t work, try to get the version from the METADATA"},{"line_number":906,"context_line":"    file (metadata 2.0)."},{"line_number":907,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_fa06ab20","line":904,"in_reply_to":"fa98f980_ef718bdf","updated":"2014-09-16 22:45:42.000000000","message":"Done","commit_id":"1e4826be1e46da472105d051d4196eddae359857"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"d48be24c167f2752ba9f505872c4bc048d9b5477","unresolved":false,"context_lines":[{"line_number":916,"context_line":"        except email.MessageError:"},{"line_number":917,"context_line":"            continue"},{"line_number":918,"context_line":"        # Check to make sure we\u0027re in our own dir"},{"line_number":919,"context_line":"        if pkg_metadata.get(\u0027Name\u0027, None) !\u003d package_name:"},{"line_number":920,"context_line":"            continue"},{"line_number":921,"context_line":"        return pkg_metadata.get(\u0027Version\u0027, None)"},{"line_number":922,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_1a6a8f81","line":919,"updated":"2014-09-16 22:16:49.000000000","message":"The generalisation here is wrong: if we read a file with the wrong name, we\u0027re in the wrong place so it should just be: (And note that it sholdn\u0027t be inside the for loop - the for loop is only needed to find the file, not to check the contents.\n\n if pkg_metadata.get(\u0027Name\u0027, None) !\u003d package_name:\n     return None\n return pkg_metadata.get(\u0027Version\u0027, None)","commit_id":"1e4826be1e46da472105d051d4196eddae359857"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"5e426a1b5a486bfa5802486a8980764f8d243650","unresolved":false,"context_lines":[{"line_number":916,"context_line":"        except email.MessageError:"},{"line_number":917,"context_line":"            continue"},{"line_number":918,"context_line":"        # Check to make sure we\u0027re in our own dir"},{"line_number":919,"context_line":"        if pkg_metadata.get(\u0027Name\u0027, None) !\u003d package_name:"},{"line_number":920,"context_line":"            continue"},{"line_number":921,"context_line":"        return pkg_metadata.get(\u0027Version\u0027, None)"},{"line_number":922,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_da09e733","line":919,"in_reply_to":"fa98f980_1a6a8f81","updated":"2014-09-16 22:45:42.000000000","message":"Thanks for catching this.","commit_id":"1e4826be1e46da472105d051d4196eddae359857"}]}
