)]}'
{"nova/tests/functional/test_middleware.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"3682a251959f27d2abd72156fc2d0641185fec20","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# -*- encoding: utf-8 -*-"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_d945af70","side":"PARENT","line":1,"updated":"2016-12-14 11:16:51.000000000","message":"Well, when looking at all the Nova python files, I find also 4 having also a related utf-8 header.\nhttps://www.python.org/dev/peps/pep-0263/\n\n\n  [sbauza@sbauza nova]$ find nova/ -name \"*.py\" -exec awk \u0027NR\u003c\u003d2 \u0026\u0026 /coding/ {print $0\"\\t\\t\"FILENAME}\u0027 {} \\;\n  # encoding\u003dUTF8\t\tnova/tests/unit/db/test_db_api.py\n  # -*- encoding: utf-8 -*-\t\tnova/tests/functional/test_middleware.py\n  # coding\u003dutf-8\t\tnova/virt/ironic/client_wrapper.py\n  # coding\u003dutf-8\t\tnova/virt/ironic/patcher.py\n  # coding\u003dutf-8\t\tnova/virt/ironic/driver.py\n\ncould you please also remove them ?","commit_id":"8f354f777f27850caf857a5ce117f061cb3b1b3f"},{"author":{"_account_id":15905,"name":"Cao Xuan Hoang","email":"xuanhoangqb@gmail.com","username":"hoangcx"},"change_message_id":"f02b020054e9b201f28640e5b874b5201ca14847","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# -*- encoding: utf-8 -*-"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_55018469","side":"PARENT","line":1,"in_reply_to":"1a6eadb0_80393b44","updated":"2016-12-20 03:29:57.000000000","message":"DONE. Thank you for your time.\nCould you please check revision patch and help to land?","commit_id":"8f354f777f27850caf857a5ce117f061cb3b1b3f"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"89c4dea28d684dabd068a82da8165cfbcf3e44a7","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# -*- encoding: utf-8 -*-"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_80393b44","side":"PARENT","line":1,"in_reply_to":"1a6eadb0_86f16f98","updated":"2016-12-19 14:22:01.000000000","message":"Well, only test_db_api contains non-ASCII chars that require a declared UTF-8 encoding header AFAICS :\n\n [sbauza@sbauza nova]$ find nova/ -name \"*.py\" -exec awk \u0027(NR\u003c\u003d2 \u0026\u0026 /coding/) {print FILENAME}\u0027 {} \\; | xargs grep --color\u003d\u0027auto\u0027 -n -P \"[^\\x00-\\x7F]\"\n nova/tests/unit/db/test_db_api.py:2568:        i1 \u003d self.create_instance_with_args(display_name\u003du\u0027test♥\u0027)\n nova/tests/unit/db/test_db_api.py:2570:        i3 \u003d self.create_instance_with_args(display_name\u003du\u0027test♥test\u0027)\n nova/tests/unit/db/test_db_api.py:2577:                                                {\u0027display_name\u0027: u\u0027test♥\u0027})\n\nYou should be able to safely remove those unnecessary headers from the other files (and to be honest, that testcase in test_db_api seems a bit nitty).","commit_id":"8f354f777f27850caf857a5ce117f061cb3b1b3f"},{"author":{"_account_id":15905,"name":"Cao Xuan Hoang","email":"xuanhoangqb@gmail.com","username":"hoangcx"},"change_message_id":"f5d7b9ff6526c0947e7dd531b7f970d3ffb1b277","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# -*- encoding: utf-8 -*-"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_86f16f98","side":"PARENT","line":1,"in_reply_to":"1a6eadb0_d945af70","updated":"2016-12-19 02:46:09.000000000","message":"Well, The files you mentioned still need utf-8 header. If not, It will raise an error as below:\n\n--- import errors ---\nFailed to import test module: nova.tests.unit.db.test_db_api\nTraceback (most recent call last):\n  File \"/opt/stack/nova/.tox/py27/local/lib/python2.7/site-packages/unittest2/loader.py\", line 456, in _find_test_path\n    module \u003d self._get_module_from_name(name)\n  File \"/opt/stack/nova/.tox/py27/local/lib/python2.7/site-packages/unittest2/loader.py\", line 395, in _get_module_from_name\n    __import__(name)\n  File \"nova/tests/unit/db/test_db_api.py\", line 2601\nSyntaxError: Non-ASCII character \u0027\\xe2\u0027 in file nova/tests/unit/db/test_db_api.py on line 2601, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details\nThe test run didn\u0027t actually run any tests\n\nCould you please confirm it and give me your thought? Thanks!","commit_id":"8f354f777f27850caf857a5ce117f061cb3b1b3f"}]}
