)]}'
{"neutron/tests/tools.py":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"7512fb60b7468d1b5bce553be9aa414bda09fe04","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"class WarningsFixture(fixtures.Fixture):"},{"line_number":55,"context_line":"    \"\"\"Filters out warnings during test runs.\"\"\""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    warning_types \u003d ("},{"line_number":58,"context_line":"        DeprecationWarning, PendingDeprecationWarning, ImportWarning"}],"source_content_type":"text/x-python","patch_set":2,"id":"3afb71cf_455dfd77","line":55,"updated":"2015-06-09 12:35:52.000000000","message":"Should we try to move an abstract version of WarningsFixture to oslo (oslo_test?) on the long term?","commit_id":"6b13cc5275df53c765c450d570521c425c3345d9"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"588d5695506e377611eae17b3556a3635cbfb0f7","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"class WarningsFixture(fixtures.Fixture):"},{"line_number":55,"context_line":"    \"\"\"Filters out warnings during test runs.\"\"\""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    warning_types \u003d ("},{"line_number":58,"context_line":"        DeprecationWarning, PendingDeprecationWarning, ImportWarning"}],"source_content_type":"text/x-python","patch_set":2,"id":"3afb71cf_863f7c86","line":55,"in_reply_to":"3afb71cf_455dfd77","updated":"2015-06-09 13:00:24.000000000","message":"For the record: this fixture is a hugely modified version from nova source tree. I thought about making it part of oslo, though I\u0027m not sure whether it\u0027s easy to find common ground for this.\n\nF.e. nova catches DeprecationWarnings only; but does not limit to nova.* namespace; also, it sets filter to \u0027once\u0027 only.\n\nKeystone, though, sets the filter to keystone.* only; while it also sets it to \u0027error\u0027, meaning a deprecation warning is fatal for test runs (\u003d\u003d\u003e they are potentially broken on every library release that they use).\n\nIt\u0027s not clear whether there is a lot of common ground for this. The oslo fixture would probably be too featureful, allowing to pass all kinds of settings inside it, to control its behaviour and allowing for existing choices made by all projects.\n\nOr should we try to convince other projects to switch to some common ground so that the fixture is simple and consistent throughout them? I would be glad to hear from you and others on the matter.","commit_id":"6b13cc5275df53c765c450d570521c425c3345d9"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"8ce8ae5ac47293f2f3921033cf55b71fda2114b3","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"class WarningsFixture(fixtures.Fixture):"},{"line_number":55,"context_line":"    \"\"\"Filters out warnings during test runs.\"\"\""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    warning_types \u003d ("},{"line_number":58,"context_line":"        DeprecationWarning, PendingDeprecationWarning, ImportWarning"}],"source_content_type":"text/x-python","patch_set":2,"id":"3afb71cf_5010e456","line":55,"in_reply_to":"3afb71cf_863f7c86","updated":"2015-06-10 11:23:40.000000000","message":"Thanks for the explanation. With that, I agree the projects should iterate separately for now. Maybe common ground can be found later.","commit_id":"6b13cc5275df53c765c450d570521c425c3345d9"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"76e0581b9a83f014418371e6fb9d82e921622ceb","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        super(WarningsFixture, self).setUp()"},{"line_number":63,"context_line":"        for wtype in self.warning_types:"},{"line_number":64,"context_line":"            warnings.filterwarnings("},{"line_number":65,"context_line":"                \"always\", category\u003dwtype, module\u003d\u0027^neutron\\\\.\u0027)"},{"line_number":66,"context_line":"        self.addCleanup(warnings.resetwarnings)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3afb71cf_45017d69","line":65,"updated":"2015-06-09 12:34:29.000000000","message":"What means exactly module\u003d\"neutron\\\\.\"? Do we always print all warnings raised by neutron or for all callables called by neutron? ie:\n\nmodule example.foo:\n\n  def foo_fn():\n     warnings.warn(\"\u0027foo_fn is deprecated\", DeprecationWarning)\n\nmodule neutron.bar:\n\n  from example import foo\n\n  def bar_fn():\n     warnings.warn(\"\u0027bar_fn is deprecated\", DeprecationWarning)\n\n  foo.foo_fn()\n  # print a warning or not?\n\n  bar()\n  # print a warning!","commit_id":"6b13cc5275df53c765c450d570521c425c3345d9"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"588d5695506e377611eae17b3556a3635cbfb0f7","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        super(WarningsFixture, self).setUp()"},{"line_number":63,"context_line":"        for wtype in self.warning_types:"},{"line_number":64,"context_line":"            warnings.filterwarnings("},{"line_number":65,"context_line":"                \"always\", category\u003dwtype, module\u003d\u0027^neutron\\\\.\u0027)"},{"line_number":66,"context_line":"        self.addCleanup(warnings.resetwarnings)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3afb71cf_e6ecf0f4","line":65,"in_reply_to":"3afb71cf_45017d69","updated":"2015-06-09 13:00:24.000000000","message":"It should catch only those stacks that directly originate from neutron.* code (\u003d\u003dstacklevel [1] points to neutron.*).\n\n[1]: https://docs.python.org/2/library/warnings.html#warnings.warn","commit_id":"6b13cc5275df53c765c450d570521c425c3345d9"}]}
