)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"8158af63bf8417f837a65e59fa44d3beb26dcbd2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"492f3f90_deefb3eb","updated":"2023-08-18 20:57:01.000000000","message":"This patch is so weird that I cannot even -1 it. I\u0027m officially amazed that Zuul passes it (because one of added asserts assures that a traceback is in the stderr, which cannot be there).\n\nI have run tox on my laptop just to test and the unmodified code does not emit a traceback to stderr. But I guess Zuul does.","commit_id":"287fbadc1f70f02cc60bbb71f4225fbc4a7c1914"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e7baab6740f82b698a7af337a0afcab61647f44b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"8cf5fb63_067c912d","updated":"2023-08-21 14:28:03.000000000","message":"looks like Zuul is happy and Pete is satisfied","commit_id":"287fbadc1f70f02cc60bbb71f4225fbc4a7c1914"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"455c6dd59ecb692fb38cc503ef834dbe87642db1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"b2f9f452_c42ac454","in_reply_to":"492f3f90_deefb3eb","updated":"2023-08-18 21:45:49.000000000","message":"It probably only affects certain test runners -- I was doing some repeated testing and was using nosetests (er, https://pypi.org/project/nose3/) since I don\u0027t know how to get pytest to do the thing I wanted. It\u0027s a small thing; probably not strictly needed.","commit_id":"287fbadc1f70f02cc60bbb71f4225fbc4a7c1914"}],"test/unit/common/test_utils.py":[{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"8158af63bf8417f837a65e59fa44d3beb26dcbd2","unresolved":true,"context_lines":[{"line_number":6312,"context_line":"        self.assertIn(\u0027Exception: kaboom\u0027, mock_stderr.getvalue())"},{"line_number":6313,"context_line":"        self.assertIn(\u0027Traceback (most recent call last):\u0027,"},{"line_number":6314,"context_line":"                      mock_stderr.getvalue())"},{"line_number":6315,"context_line":""},{"line_number":6316,"context_line":"    def test_no_blocking_last_next_explodes(self):"},{"line_number":6317,"context_line":"        pile \u003d utils.GreenAsyncPile(10)"},{"line_number":6318,"context_line":"        pile.spawn(self._exploder, 1)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f5aa9d2_23717ac0","line":6315,"updated":"2023-08-18 20:57:01.000000000","message":"This just doesn\u0027t look right. When a expected exception is caught by assertRaises(), there\u0027s not going to be a traceback printed to sys.stderr. Mocking it should do nothing, and trying to find a traceback in the capture should be pointless.\n\nBTW, all of the stderr is normally caught, even if it occurrs in tests. So, you\u0027re actually re-capturing and examining what unittest package saved and emitted, I suspect. This is exceedingly strange.","commit_id":"287fbadc1f70f02cc60bbb71f4225fbc4a7c1914"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"455c6dd59ecb692fb38cc503ef834dbe87642db1","unresolved":true,"context_lines":[{"line_number":6312,"context_line":"        self.assertIn(\u0027Exception: kaboom\u0027, mock_stderr.getvalue())"},{"line_number":6313,"context_line":"        self.assertIn(\u0027Traceback (most recent call last):\u0027,"},{"line_number":6314,"context_line":"                      mock_stderr.getvalue())"},{"line_number":6315,"context_line":""},{"line_number":6316,"context_line":"    def test_no_blocking_last_next_explodes(self):"},{"line_number":6317,"context_line":"        pile \u003d utils.GreenAsyncPile(10)"},{"line_number":6318,"context_line":"        pile.spawn(self._exploder, 1)"}],"source_content_type":"text/x-python","patch_set":1,"id":"6337f648_1283ff2d","line":6315,"in_reply_to":"3f5aa9d2_23717ac0","updated":"2023-08-18 21:45:49.000000000","message":"The `Exception(\u0027kaboom\u0027)` isn\u0027t what gets caught by the `assertRaises`, though -- it [gets caught and logged](https://github.com/openstack/swift/blob/2.31.1/swift/common/utils.py#L3702-L3705) (assuming `debug_exceptions` is true) in our `GreenAsyncPile`, then [the dead result gets ignored in `next`](https://github.com/openstack/swift/blob/2.31.1/swift/common/utils.py#L3764-L3765) and we ultimately get the `StopIteration`, as expected.","commit_id":"287fbadc1f70f02cc60bbb71f4225fbc4a7c1914"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"2342a9230aaa5f277e00ad4fb18889982cf2ce5e","unresolved":true,"context_lines":[{"line_number":6312,"context_line":"        self.assertIn(\u0027Exception: kaboom\u0027, mock_stderr.getvalue())"},{"line_number":6313,"context_line":"        self.assertIn(\u0027Traceback (most recent call last):\u0027,"},{"line_number":6314,"context_line":"                      mock_stderr.getvalue())"},{"line_number":6315,"context_line":""},{"line_number":6316,"context_line":"    def test_no_blocking_last_next_explodes(self):"},{"line_number":6317,"context_line":"        pile \u003d utils.GreenAsyncPile(10)"},{"line_number":6318,"context_line":"        pile.spawn(self._exploder, 1)"}],"source_content_type":"text/x-python","patch_set":1,"id":"f800b037_b80461b1","line":6315,"in_reply_to":"6337f648_1283ff2d","updated":"2023-08-18 23:08:22.000000000","message":"Well, okay. I have run the tests on my system and there was nothing in stderr. So, one would think there was nothing to assert in mock_stderr. But! I have run this patch, and it passes too!\n\nI think I know what\u0027s happening. The test runners mock sys.stderr. They do it in order to capture errors. But now you mock it on top of their mock.","commit_id":"287fbadc1f70f02cc60bbb71f4225fbc4a7c1914"}]}
