)]}'
{"tools/hacking.py":[{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"31d87d7d3d846f67b7170aef7782034537918dbb","unresolved":false,"context_lines":[{"line_number":47,"context_line":"#N9xx other"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"IMPORT_EXCEPTIONS \u003d [\u0027sqlalchemy\u0027, \u0027migrate\u0027, \u0027nova.db.sqlalchemy.session\u0027,"},{"line_number":50,"context_line":"                     \u0027nova.openstack.common.log.logging\u0027,"},{"line_number":51,"context_line":"                     \u0027nova.db.sqlalchemy.migration.versioning_api\u0027]"},{"line_number":52,"context_line":"START_DOCSTRING_TRIPLE \u003d [\u0027u\"\"\"\u0027, \u0027r\"\"\"\u0027, \u0027\"\"\"\u0027, \"u\u0027\u0027\u0027\", \"r\u0027\u0027\u0027\", \"\u0027\u0027\u0027\"]"},{"line_number":53,"context_line":"END_DOCSTRING_TRIPLE \u003d [\u0027\"\"\"\u0027, \"\u0027\u0027\u0027\"]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FI%2BI%3D","line":50,"updated":"2013-02-05 20:55:00.000000000","message":"If we want to add these, they need to be added to HACKING.rst as well","commit_id":"78486821bf05eb69f349c8b7c1e703f1dc003571"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"fffab262438ed415770c592b39d79b26df744672","unresolved":false,"context_lines":[{"line_number":47,"context_line":"#N9xx other"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"IMPORT_EXCEPTIONS \u003d [\u0027sqlalchemy\u0027, \u0027migrate\u0027, \u0027nova.db.sqlalchemy.session\u0027,"},{"line_number":50,"context_line":"                     \u0027nova.openstack.common.log.logging\u0027,"},{"line_number":51,"context_line":"                     \u0027nova.db.sqlalchemy.migration.versioning_api\u0027]"},{"line_number":52,"context_line":"START_DOCSTRING_TRIPLE \u003d [\u0027u\"\"\"\u0027, \u0027r\"\"\"\u0027, \u0027\"\"\"\u0027, \"u\u0027\u0027\u0027\", \"r\u0027\u0027\u0027\", \"\u0027\u0027\u0027\"]"},{"line_number":53,"context_line":"END_DOCSTRING_TRIPLE \u003d [\u0027\"\"\"\u0027, \"\u0027\u0027\u0027\"]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FI5k%3D","line":50,"in_reply_to":"AAAAM3%2F%2FI%2BI%3D","updated":"2013-02-05 21:58:31.000000000","message":"In technical perspective, now they are more like aliases.\n\nThis type of aliasing could be detectable and cache able, but since their number is low,  I am not sure worth to increase the code complexity.","commit_id":"78486821bf05eb69f349c8b7c1e703f1dc003571"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"6a86aff13e2338fee926ac2f9cc36ea968625dc2","unresolved":false,"context_lines":[{"line_number":47,"context_line":"#N9xx other"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"IMPORT_EXCEPTIONS \u003d [\u0027sqlalchemy\u0027, \u0027migrate\u0027, \u0027nova.db.sqlalchemy.session\u0027,"},{"line_number":50,"context_line":"                     \u0027nova.openstack.common.log.logging\u0027,"},{"line_number":51,"context_line":"                     \u0027nova.db.sqlalchemy.migration.versioning_api\u0027]"},{"line_number":52,"context_line":"START_DOCSTRING_TRIPLE \u003d [\u0027u\"\"\"\u0027, \u0027r\"\"\"\u0027, \u0027\"\"\"\u0027, \"u\u0027\u0027\u0027\", \"r\u0027\u0027\u0027\", \"\u0027\u0027\u0027\"]"},{"line_number":53,"context_line":"END_DOCSTRING_TRIPLE \u003d [\u0027\"\"\"\u0027, \"\u0027\u0027\u0027\"]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FI1c%3D","line":50,"in_reply_to":"AAAAM3%2F%2FI5k%3D","updated":"2013-02-05 22:06:11.000000000","message":"Lets just add them as exceptions in HACKING.rst","commit_id":"78486821bf05eb69f349c8b7c1e703f1dc003571"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"31d87d7d3d846f67b7170aef7782034537918dbb","unresolved":false,"context_lines":[{"line_number":168,"context_line":"    Okay: from os import path"},{"line_number":169,"context_line":"    Okay: import os.path"},{"line_number":170,"context_line":"    N302: from os.path import dirname as dirname2"},{"line_number":171,"context_line":"    N303: from os.path import *"},{"line_number":172,"context_line":"    N304: from .moduleY import spam"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    Imports should usually be on separate lines."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FI98%3D","line":171,"updated":"2013-02-05 20:55:00.000000000","message":"HACKING.rst doesn\u0027t completely disallow wildcard imports currently.  As long as it imports modules only.\n\nAs I am not sure if wildcard imports can be  completely removed, it would be nice to see an attempt to enable this test.","commit_id":"78486821bf05eb69f349c8b7c1e703f1dc003571"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"31d87d7d3d846f67b7170aef7782034537918dbb","unresolved":false,"context_lines":[{"line_number":169,"context_line":"    Okay: import os.path"},{"line_number":170,"context_line":"    N302: from os.path import dirname as dirname2"},{"line_number":171,"context_line":"    N303: from os.path import *"},{"line_number":172,"context_line":"    N304: from .moduleY import spam"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    Imports should usually be on separate lines."},{"line_number":175,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FI9M%3D","line":172,"updated":"2013-02-05 20:55:00.000000000","message":"As this is the relative import test, it would be nice to have an Okay example importing the same item in an absolute fashion.","commit_id":"78486821bf05eb69f349c8b7c1e703f1dc003571"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"fffab262438ed415770c592b39d79b26df744672","unresolved":false,"context_lines":[{"line_number":169,"context_line":"    Okay: import os.path"},{"line_number":170,"context_line":"    N302: from os.path import dirname as dirname2"},{"line_number":171,"context_line":"    N303: from os.path import *"},{"line_number":172,"context_line":"    N304: from .moduleY import spam"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    Imports should usually be on separate lines."},{"line_number":175,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FI5E%3D","line":172,"in_reply_to":"AAAAM3%2F%2FI9M%3D","updated":"2013-02-05 21:58:31.000000000","message":"OK.","commit_id":"78486821bf05eb69f349c8b7c1e703f1dc003571"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"31d87d7d3d846f67b7170aef7782034537918dbb","unresolved":false,"context_lines":[{"line_number":221,"context_line":"            return  # \u0027,\u0027 is not supported by the N302 checker yet"},{"line_number":222,"context_line":"        pos \u003d logical_line.find(\u0027*\u0027)"},{"line_number":223,"context_line":"        if pos !\u003d -1:"},{"line_number":224,"context_line":"            yield pos, \"N303: No * import.\""},{"line_number":225,"context_line":"            return"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"        if split_line_len in (2, 4, 6) and split_line[1] !\u003d \"__future__\":"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FI9I%3D","line":224,"updated":"2013-02-05 20:55:00.000000000","message":"it may be nice to say: \"no wildcard (*) import\"","commit_id":"78486821bf05eb69f349c8b7c1e703f1dc003571"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"fffab262438ed415770c592b39d79b26df744672","unresolved":false,"context_lines":[{"line_number":221,"context_line":"            return  # \u0027,\u0027 is not supported by the N302 checker yet"},{"line_number":222,"context_line":"        pos \u003d logical_line.find(\u0027*\u0027)"},{"line_number":223,"context_line":"        if pos !\u003d -1:"},{"line_number":224,"context_line":"            yield pos, \"N303: No * import.\""},{"line_number":225,"context_line":"            return"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"        if split_line_len in (2, 4, 6) and split_line[1] !\u003d \"__future__\":"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FI44%3D","line":224,"in_reply_to":"AAAAM3%2F%2FI9I%3D","updated":"2013-02-05 21:58:31.000000000","message":"OK. I\u0027ll do it.","commit_id":"78486821bf05eb69f349c8b7c1e703f1dc003571"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"af3051131c8430582b95048c891918985cb2f790","unresolved":false,"context_lines":[{"line_number":222,"context_line":"            return  # \u0027,\u0027 is not supported by the N302 checker yet"},{"line_number":223,"context_line":"        pos \u003d logical_line.find(\u0027*\u0027)"},{"line_number":224,"context_line":"        if pos !\u003d -1:"},{"line_number":225,"context_line":"            yield pos, \"N303: No wildcard (*) import.\""},{"line_number":226,"context_line":"            return"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"        if split_line_len in (2, 4, 6) and split_line[1] !\u003d \"__future__\":"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2FHbo%3D","line":225,"updated":"2013-02-06 18:29:56.000000000","message":"HACKING.rst doesn\u0027t completely disallow wildcard imports currently. As long as it imports modules only.\nAs I am not sure if wildcard imports can be completely removed, it would be nice to see an attempt to enable this test.","commit_id":"b14fa26e45a01f3a66a1d7ebb15ac05f0bec1556"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"989dd83e5f40a96cc80c501948fe255bbda91326","unresolved":false,"context_lines":[{"line_number":222,"context_line":"            return  # \u0027,\u0027 is not supported by the N302 checker yet"},{"line_number":223,"context_line":"        pos \u003d logical_line.find(\u0027*\u0027)"},{"line_number":224,"context_line":"        if pos !\u003d -1:"},{"line_number":225,"context_line":"            yield pos, \"N303: No wildcard (*) import.\""},{"line_number":226,"context_line":"            return"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"        if split_line_len in (2, 4, 6) and split_line[1] !\u003d \"__future__\":"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2FFHY%3D","line":225,"in_reply_to":"AAAAM3%2F%2FGM0%3D","updated":"2013-02-07 20:00:29.000000000","message":"good point.  how about updating HACKING.rst to explicitly forbid this?","commit_id":"b14fa26e45a01f3a66a1d7ebb15ac05f0bec1556"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"1b0401cd9cb07c2b9d243d35d2353f2d506ae44f","unresolved":false,"context_lines":[{"line_number":222,"context_line":"            return  # \u0027,\u0027 is not supported by the N302 checker yet"},{"line_number":223,"context_line":"        pos \u003d logical_line.find(\u0027*\u0027)"},{"line_number":224,"context_line":"        if pos !\u003d -1:"},{"line_number":225,"context_line":"            yield pos, \"N303: No wildcard (*) import.\""},{"line_number":226,"context_line":"            return"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"        if split_line_len in (2, 4, 6) and split_line[1] !\u003d \"__future__\":"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2FGM0%3D","line":225,"in_reply_to":"AAAAM3%2F%2FHbo%3D","updated":"2013-02-07 07:39:16.000000000","message":"The HACKING.rst, said \"Do not import more than one module per line\".\nThe *  usually causes multiple import. If it really just cause one module import, it should be denied twice.","commit_id":"b14fa26e45a01f3a66a1d7ebb15ac05f0bec1556"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"af3051131c8430582b95048c891918985cb2f790","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        pos \u003d logical_line.find(\u0027*\u0027)"},{"line_number":224,"context_line":"        if pos !\u003d -1:"},{"line_number":225,"context_line":"            yield pos, \"N303: No wildcard (*) import.\""},{"line_number":226,"context_line":"            return"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"        if split_line_len in (2, 4, 6) and split_line[1] !\u003d \"__future__\":"},{"line_number":229,"context_line":"            if \u0027from\u0027 \u003d\u003d split_line[0] and split_line_len \u003e 3:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2FHbs%3D","line":226,"updated":"2013-02-06 18:29:56.000000000","message":"Is this return needed?","commit_id":"b14fa26e45a01f3a66a1d7ebb15ac05f0bec1556"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"989dd83e5f40a96cc80c501948fe255bbda91326","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        pos \u003d logical_line.find(\u0027*\u0027)"},{"line_number":224,"context_line":"        if pos !\u003d -1:"},{"line_number":225,"context_line":"            yield pos, \"N303: No wildcard (*) import.\""},{"line_number":226,"context_line":"            return"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"        if split_line_len in (2, 4, 6) and split_line[1] !\u003d \"__future__\":"},{"line_number":229,"context_line":"            if \u0027from\u0027 \u003d\u003d split_line[0] and split_line_len \u003e 3:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2FFHA%3D","line":226,"in_reply_to":"AAAAM3%2F%2FGNU%3D","updated":"2013-02-07 20:00:29.000000000","message":"Good to know","commit_id":"b14fa26e45a01f3a66a1d7ebb15ac05f0bec1556"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"1b0401cd9cb07c2b9d243d35d2353f2d506ae44f","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        pos \u003d logical_line.find(\u0027*\u0027)"},{"line_number":224,"context_line":"        if pos !\u003d -1:"},{"line_number":225,"context_line":"            yield pos, \"N303: No wildcard (*) import.\""},{"line_number":226,"context_line":"            return"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"        if split_line_len in (2, 4, 6) and split_line[1] !\u003d \"__future__\":"},{"line_number":229,"context_line":"            if \u0027from\u0027 \u003d\u003d split_line[0] and split_line_len \u003e 3:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2FGNU%3D","line":226,"in_reply_to":"AAAAM3%2F%2FGk0%3D","updated":"2013-02-07 07:39:16.000000000","message":"pos gets value two times.\n\ndef foo():\n    yield \"spam\"\n    print \"foo\"\n    yield \"egg\"\n    return\n    yield \"baz\" \n\n\n# this prints foo\n\nret \u003d list(foo())\n\n# this prints [\u0027spam\u0027, \u0027egg\u0027]\n\nprint ret\n\n# baz never reached \n~","commit_id":"b14fa26e45a01f3a66a1d7ebb15ac05f0bec1556"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"810113b0798ae0aade5cdafc88da72cf375fb59a","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        pos \u003d logical_line.find(\u0027*\u0027)"},{"line_number":224,"context_line":"        if pos !\u003d -1:"},{"line_number":225,"context_line":"            yield pos, \"N303: No wildcard (*) import.\""},{"line_number":226,"context_line":"            return"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"        if split_line_len in (2, 4, 6) and split_line[1] !\u003d \"__future__\":"},{"line_number":229,"context_line":"            if \u0027from\u0027 \u003d\u003d split_line[0] and split_line_len \u003e 3:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2FGk0%3D","line":226,"in_reply_to":"AAAAM3%2F%2FGn4%3D","updated":"2013-02-07 02:16:08.000000000","message":"isn\u0027t the return under the \n\n if pos !\u003d -1: \n\nstatement, so it won\u0027t ever get hit?","commit_id":"b14fa26e45a01f3a66a1d7ebb15ac05f0bec1556"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"b49571faf9d9f7dbd57d54102baa2baa54be4b02","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        pos \u003d logical_line.find(\u0027*\u0027)"},{"line_number":224,"context_line":"        if pos !\u003d -1:"},{"line_number":225,"context_line":"            yield pos, \"N303: No wildcard (*) import.\""},{"line_number":226,"context_line":"            return"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"        if split_line_len in (2, 4, 6) and split_line[1] !\u003d \"__future__\":"},{"line_number":229,"context_line":"            if \u0027from\u0027 \u003d\u003d split_line[0] and split_line_len \u003e 3:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2FGn4%3D","line":226,"in_reply_to":"AAAAM3%2F%2FHbs%3D","updated":"2013-02-07 01:46:03.000000000","message":"Yes. We are unable to process any further check at the moment.","commit_id":"b14fa26e45a01f3a66a1d7ebb15ac05f0bec1556"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"af3051131c8430582b95048c891918985cb2f790","unresolved":false,"context_lines":[{"line_number":232,"context_line":"                        return"},{"line_number":233,"context_line":"                if re_relative_import.search(logical_line):"},{"line_number":234,"context_line":"                    yield logical_line.find(\u0027.\u0027), (\"N304: No \""},{"line_number":235,"context_line":"                        \"relative imports. \u0027%s\u0027 is a relative import\""},{"line_number":236,"context_line":"                        % logical_line)"},{"line_number":237,"context_line":"                    return"},{"line_number":238,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2FHac%3D","line":235,"updated":"2013-02-06 18:29:56.000000000","message":"This doesn\u0027t cover all relative imports.  For example (http://programmers.stackexchange.com/questions/159503/whats-wrong-with-relative-imports-in-python):\n\n\n /cake\n   /__init__.py\n   /icing.py\n   /sponge.py\n\nand in the sponge package I write:\n\n import icing\n\ninstead of\n\n import cake.icing\n\nyou should get a N304","commit_id":"b14fa26e45a01f3a66a1d7ebb15ac05f0bec1556"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"989dd83e5f40a96cc80c501948fe255bbda91326","unresolved":false,"context_lines":[{"line_number":232,"context_line":"                        return"},{"line_number":233,"context_line":"                if re_relative_import.search(logical_line):"},{"line_number":234,"context_line":"                    yield logical_line.find(\u0027.\u0027), (\"N304: No \""},{"line_number":235,"context_line":"                        \"relative imports. \u0027%s\u0027 is a relative import\""},{"line_number":236,"context_line":"                        % logical_line)"},{"line_number":237,"context_line":"                    return"},{"line_number":238,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2FFG0%3D","line":235,"in_reply_to":"AAAAM3%2F%2FGN4%3D","updated":"2013-02-07 20:00:29.000000000","message":"sounds good.\n\nthe main thing this test should be looking for is:\n\ndoing \n import db\ninstead of\n from nova import db","commit_id":"b14fa26e45a01f3a66a1d7ebb15ac05f0bec1556"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"1b0401cd9cb07c2b9d243d35d2353f2d506ae44f","unresolved":false,"context_lines":[{"line_number":232,"context_line":"                        return"},{"line_number":233,"context_line":"                if re_relative_import.search(logical_line):"},{"line_number":234,"context_line":"                    yield logical_line.find(\u0027.\u0027), (\"N304: No \""},{"line_number":235,"context_line":"                        \"relative imports. \u0027%s\u0027 is a relative import\""},{"line_number":236,"context_line":"                        % logical_line)"},{"line_number":237,"context_line":"                    return"},{"line_number":238,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2FGN4%3D","line":235,"in_reply_to":"AAAAM3%2F%2FGlg%3D","updated":"2013-02-07 07:39:16.000000000","message":"Looks like it is still working without the\nfrom __future__ import absolute_import\n\nI\u0027ll add this check. (I had it before...). Let see is it detects additional issues or not.\n\nI considerer the old style relative import as an out of main source tree situation..","commit_id":"b14fa26e45a01f3a66a1d7ebb15ac05f0bec1556"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"810113b0798ae0aade5cdafc88da72cf375fb59a","unresolved":false,"context_lines":[{"line_number":232,"context_line":"                        return"},{"line_number":233,"context_line":"                if re_relative_import.search(logical_line):"},{"line_number":234,"context_line":"                    yield logical_line.find(\u0027.\u0027), (\"N304: No \""},{"line_number":235,"context_line":"                        \"relative imports. \u0027%s\u0027 is a relative import\""},{"line_number":236,"context_line":"                        % logical_line)"},{"line_number":237,"context_line":"                    return"},{"line_number":238,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2FGlg%3D","line":235,"in_reply_to":"AAAAM3%2F%2FGoE%3D","updated":"2013-02-07 02:16:08.000000000","message":"When I run the code above I get:\n\n $ cat cake/icing.py\n print \"icing\"\n\n $ python2.6 cake/sponge.py \n icing\n\n $ python2.7 cake/sponge.py \n icing","commit_id":"b14fa26e45a01f3a66a1d7ebb15ac05f0bec1556"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"b49571faf9d9f7dbd57d54102baa2baa54be4b02","unresolved":false,"context_lines":[{"line_number":232,"context_line":"                        return"},{"line_number":233,"context_line":"                if re_relative_import.search(logical_line):"},{"line_number":234,"context_line":"                    yield logical_line.find(\u0027.\u0027), (\"N304: No \""},{"line_number":235,"context_line":"                        \"relative imports. \u0027%s\u0027 is a relative import\""},{"line_number":236,"context_line":"                        % logical_line)"},{"line_number":237,"context_line":"                    return"},{"line_number":238,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2FGoE%3D","line":235,"in_reply_to":"AAAAM3%2F%2FHac%3D","updated":"2013-02-07 01:46:03.000000000","message":"In python 2.7 it is not possible.\nIn python 2.6 you will get warning. Older versions AFAIK not supported.\n\nDo not forget the cwd  (\u0027\u0027) is part of the python path (sys.path).\n\nPlease read pep328.\n\nAny not covered thing expected to fail  on unit or integration test if you are using python 2.7 or above.","commit_id":"b14fa26e45a01f3a66a1d7ebb15ac05f0bec1556"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"3dd09f91ecd6ee4f57996cdc2269b9a17b8c665e","unresolved":false,"context_lines":[{"line_number":170,"context_line":"    Okay: from nova.compute import rpcapi"},{"line_number":171,"context_line":"    N302: from os.path import dirname as dirname2"},{"line_number":172,"context_line":"    N303: from os.path import *"},{"line_number":173,"context_line":"    N304: from .compute import rpcapi"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    Imports should usually be on separate lines."},{"line_number":176,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FDgg%3D","line":173,"updated":"2013-02-08 19:39:57.000000000","message":"Will this code now detect the following relative import?\n \n import db\ninstead of\n from nova import db\n\nIf so is it possible to add a doctest for it?","commit_id":"b45d7e2ef74602f960eefb915830bde392ddab85"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"8ef9b20c7f40b90f640fea607361bdabfd37b07b","unresolved":false,"context_lines":[{"line_number":170,"context_line":"    Okay: from nova.compute import rpcapi"},{"line_number":171,"context_line":"    N302: from os.path import dirname as dirname2"},{"line_number":172,"context_line":"    N303: from os.path import *"},{"line_number":173,"context_line":"    N304: from .compute import rpcapi"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    Imports should usually be on separate lines."},{"line_number":176,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FDZU%3D","line":173,"in_reply_to":"AAAAM3%2F%2FDd4%3D","updated":"2013-02-08 20:54:27.000000000","message":"I was afraid of that.  Can you add a note here explaining that.","commit_id":"b45d7e2ef74602f960eefb915830bde392ddab85"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"ef56875487af846ac8fce5ba6199345c91d495f9","unresolved":false,"context_lines":[{"line_number":170,"context_line":"    Okay: from nova.compute import rpcapi"},{"line_number":171,"context_line":"    N302: from os.path import dirname as dirname2"},{"line_number":172,"context_line":"    N303: from os.path import *"},{"line_number":173,"context_line":"    N304: from .compute import rpcapi"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    Imports should usually be on separate lines."},{"line_number":176,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FDd4%3D","line":173,"in_reply_to":"AAAAM3%2F%2FDgg%3D","updated":"2013-02-08 20:02:39.000000000","message":"echo \u0027import db\u0027 \u003e\u003e nova/exception.py \n./tools/hacking.py nova/exception.py\nnova/exception.py:186:9: E128 continuation line under-indented for visual indent\nnova/exception.py:1113:1: N304  No relative imports. \u0027import db\u0027 is a relative import\n\nProbably the doctest will not work, since the relativity depends on the locality of the inspected file.","commit_id":"b45d7e2ef74602f960eefb915830bde392ddab85"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"c4019e2c919d0016645f1a08888450514b1f0f26","unresolved":false,"context_lines":[{"line_number":156,"context_line":"modules_cache \u003d dict((mod, True) for mod in tuple(sys.modules.keys())"},{"line_number":157,"context_line":"                     + sys.builtin_module_names)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"re_relative_import \u003d re.compile(\u0027^from\\s*[.]\u0027)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"def nova_import_rules(logical_line):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B%2BhM%3D","line":159,"updated":"2013-02-12 18:13:19.000000000","message":"can you make this a constant.  all other examples of compiled regex are constants.","commit_id":"2932517b151c5dd9431b412d4ce4afd2959cd1e2"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"04861167cb6e988e907300d8a8952f25d7f4d1fd","unresolved":false,"context_lines":[{"line_number":156,"context_line":"modules_cache \u003d dict((mod, True) for mod in tuple(sys.modules.keys())"},{"line_number":157,"context_line":"                     + sys.builtin_module_names)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"re_relative_import \u003d re.compile(\u0027^from\\s*[.]\u0027)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"def nova_import_rules(logical_line):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B%2Beg%3D","line":159,"in_reply_to":"AAAAM3%2F%2B%2BfQ%3D","updated":"2013-02-12 18:27:09.000000000","message":"Yes upper-case, see line 407 for precedence","commit_id":"2932517b151c5dd9431b412d4ce4afd2959cd1e2"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"308bc425de92da3d75362bc815e45a6bda9db393","unresolved":false,"context_lines":[{"line_number":156,"context_line":"modules_cache \u003d dict((mod, True) for mod in tuple(sys.modules.keys())"},{"line_number":157,"context_line":"                     + sys.builtin_module_names)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"re_relative_import \u003d re.compile(\u0027^from\\s*[.]\u0027)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"def nova_import_rules(logical_line):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B%2BfQ%3D","line":159,"in_reply_to":"AAAAM3%2F%2B%2BhM%3D","updated":"2013-02-12 18:22:50.000000000","message":"um, isn\u0027t it already?  Or do you mean for him to upper-case the name?","commit_id":"2932517b151c5dd9431b412d4ce4afd2959cd1e2"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"c4019e2c919d0016645f1a08888450514b1f0f26","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    N303: from os.path import *"},{"line_number":173,"context_line":"    N304: from .compute import rpcapi"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    Imports should usually be on separate lines."},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    nova HACKING guide recommends one import per line:"},{"line_number":178,"context_line":"    Do not import more than one module per line"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B%2BhA%3D","line":175,"updated":"2013-02-12 18:13:19.000000000","message":"Can you put this part of the docstring first, so that the docstring tests are in numeric order.","commit_id":"2932517b151c5dd9431b412d4ce4afd2959cd1e2"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"04861167cb6e988e907300d8a8952f25d7f4d1fd","unresolved":false,"context_lines":[{"line_number":403,"context_line":"    if pos !\u003d -1 and pos \u003d\u003d (len(physical_line) - 2):"},{"line_number":404,"context_line":"        return (pos, \"N901: Windows style line endings not allowed in code\")"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":""},{"line_number":407,"context_line":"FORMAT_RE \u003d re.compile(\"%(?:\""},{"line_number":408,"context_line":"                            \"%|\"           # Ignore plain percents"},{"line_number":409,"context_line":"                            \"(\\(\\w+\\))?\"   # mapping key"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B%2Bes%3D","line":406,"updated":"2013-02-12 18:27:09.000000000","message":"re.compile example","commit_id":"2932517b151c5dd9431b412d4ce4afd2959cd1e2"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"04861167cb6e988e907300d8a8952f25d7f4d1fd","unresolved":false,"context_lines":[{"line_number":562,"context_line":"    #Changeid|bug|blueprint"},{"line_number":563,"context_line":"    git_keywords \u003d (r\u0027(I[0-9a-f]{8,40})|\u0027"},{"line_number":564,"context_line":"                    \u0027([Bb]ug|[Ll][Pp])[\\s\\#:]*(\\d+)|\u0027"},{"line_number":565,"context_line":"                    \u0027([Bb]lue[Pp]rint|[Bb][Pp])[\\s\\#:]*([A-Za-z0-9\\\\-]+)\u0027)"},{"line_number":566,"context_line":"    GIT_REGEX \u003d re.compile(git_keywords)"},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"    error \u003d False"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B%2Bek%3D","line":565,"updated":"2013-02-12 18:27:09.000000000","message":"another example","commit_id":"2932517b151c5dd9431b412d4ce4afd2959cd1e2"}],"tox.ini":[{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"3dd09f91ecd6ee4f57996cdc2269b9a17b8c665e","unresolved":false,"context_lines":[{"line_number":26,"context_line":"  python tools/hacking.py --ignore\u003dE12,E711,E721,E712,N403,N404,N303,N304 \\"},{"line_number":27,"context_line":"    --show-source \\"},{"line_number":28,"context_line":"    ./plugins/xenserver/networking/etc/xensource/scripts \\"},{"line_number":29,"context_line":"    ./plugins/xenserver/xenapi/etc/xapi.d/plugins"},{"line_number":30,"context_line":"  python tools/hacking.py --ignore\u003dE12,E711,E721,E712,N403,N404,N303 \\"},{"line_number":31,"context_line":"    --show-source --filename\u003dnova* bin"},{"line_number":32,"context_line":"  bash tools/unused_imports.sh"}],"source_content_type":"text/x-properties","patch_set":4,"id":"AAAAM3%2F%2FDfs%3D","line":29,"updated":"2013-02-08 19:39:57.000000000","message":"why keep xenserver separate?","commit_id":"b45d7e2ef74602f960eefb915830bde392ddab85"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"ef56875487af846ac8fce5ba6199345c91d495f9","unresolved":false,"context_lines":[{"line_number":26,"context_line":"  python tools/hacking.py --ignore\u003dE12,E711,E721,E712,N403,N404,N303,N304 \\"},{"line_number":27,"context_line":"    --show-source \\"},{"line_number":28,"context_line":"    ./plugins/xenserver/networking/etc/xensource/scripts \\"},{"line_number":29,"context_line":"    ./plugins/xenserver/xenapi/etc/xapi.d/plugins"},{"line_number":30,"context_line":"  python tools/hacking.py --ignore\u003dE12,E711,E721,E712,N403,N404,N303 \\"},{"line_number":31,"context_line":"    --show-source --filename\u003dnova* bin"},{"line_number":32,"context_line":"  bash tools/unused_imports.sh"}],"source_content_type":"text/x-properties","patch_set":4,"id":"AAAAM3%2F%2FDds%3D","line":29,"in_reply_to":"AAAAM3%2F%2FDfs%3D","updated":"2013-02-08 20:02:39.000000000","message":"Because they expects different PYTHONPATH (sys.path).","commit_id":"b45d7e2ef74602f960eefb915830bde392ddab85"}]}
