)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"76f6f6d01ec7833c260d7508c6d0c0d59db2c46c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"0d868956_3bca35e4","updated":"2022-01-18 03:07:18.000000000","message":"recheck","commit_id":"a341851f15060efc2e6e30717339c47c015ed0b7"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"49bb02990fe57c69f31565b78c4aa74ebd382d97","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"129a6cc9_f54ea037","updated":"2022-01-17 12:53:23.000000000","message":"yep this looks good to me.","commit_id":"a341851f15060efc2e6e30717339c47c015ed0b7"}],"nova/tests/fixtures/nova.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"49bb02990fe57c69f31565b78c4aa74ebd382d97","unresolved":true,"context_lines":[{"line_number":1725,"context_line":"            fixtures.MonkeyPatch(\u0027nova.utils.spawn_n\u0027, wrapped_spawn_n))"},{"line_number":1726,"context_line":""},{"line_number":1727,"context_line":""},{"line_number":1728,"context_line":"class ReaderWriterLock(lockutils.ReaderWriterLock):"},{"line_number":1729,"context_line":"    \"\"\"Wrap oslo.concurrency lockutils.ReaderWriterLock to support eventlet."},{"line_number":1730,"context_line":""},{"line_number":1731,"context_line":"    As of fasteners \u003e\u003d 0.15, the workaround code to use eventlet.getcurrent()"}],"source_content_type":"text/x-python","patch_set":1,"id":"46427cb5_53d44521","line":1728,"range":{"start_line":1728,"start_character":6,"end_line":1728,"end_character":22},"updated":"2022-01-17 12:53:23.000000000","message":"the part of me that understands c still wants this to be defiend before its used in the file but in python this work perfectly so +1","commit_id":"a341851f15060efc2e6e30717339c47c015ed0b7"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"49bb02990fe57c69f31565b78c4aa74ebd382d97","unresolved":true,"context_lines":[{"line_number":1753,"context_line":""},{"line_number":1754,"context_line":"    def __init__(self, *a, **kw):"},{"line_number":1755,"context_line":"        eventlet_patched \u003d eventlet.patcher.is_monkey_patched(\u0027thread\u0027)"},{"line_number":1756,"context_line":"        mpatch \u003d fixtures.MonkeyPatch("},{"line_number":1757,"context_line":"            \u0027threading.current_thread\u0027, eventlet.getcurrent)"},{"line_number":1758,"context_line":"        with mpatch if eventlet_patched else contextlib.ExitStack():"},{"line_number":1759,"context_line":"            super().__init__(*a, **kw)"}],"source_content_type":"text/x-python","patch_set":1,"id":"214ae6bb_85660435","line":1756,"range":{"start_line":1756,"start_character":7,"end_line":1756,"end_character":38},"updated":"2022-01-17 12:53:23.000000000","message":"you can still do this without fixtures but since fixtures is already used in the unit test this is fine with me too.","commit_id":"a341851f15060efc2e6e30717339c47c015ed0b7"}],"nova/utils.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"6b14812cb9bb64915020d7b12087aca104151e37","unresolved":true,"context_lines":[{"line_number":1174,"context_line":""},{"line_number":1175,"context_line":"    def __init__(self, *a, **kw):"},{"line_number":1176,"context_line":"        eventlet_patched \u003d eventlet.patcher.is_monkey_patched(\u0027thread\u0027)"},{"line_number":1177,"context_line":"        mpatch \u003d fixtures.MonkeyPatch("},{"line_number":1178,"context_line":"            \u0027threading.current_thread\u0027, eventlet.getcurrent)"},{"line_number":1179,"context_line":"        with mpatch if eventlet_patched else contextlib.ExitStack():"},{"line_number":1180,"context_line":"            return super().__init__(*a, **kw)"}],"source_content_type":"text/x-python","patch_set":1,"id":"67e33308_39745ff2","side":"PARENT","line":1177,"range":{"start_line":1177,"start_character":17,"end_line":1177,"end_character":25},"updated":"2022-01-18 20:26:00.000000000","message":"Ugh, sorry everyone, I somehow didn\u0027t think about how this is a test-only library.\n\nIt will still be a problem if and when nova production code makes use of a lockutils.ReaderWriterLock in the future, but I guess we can wait until that happens before doing anything.","commit_id":"1ddb8f83adef964a8ca050994a43adc6175994f1"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"859d5c27bae745e04452e44ec867d90cc2845dbc","unresolved":true,"context_lines":[{"line_number":1174,"context_line":""},{"line_number":1175,"context_line":"    def __init__(self, *a, **kw):"},{"line_number":1176,"context_line":"        eventlet_patched \u003d eventlet.patcher.is_monkey_patched(\u0027thread\u0027)"},{"line_number":1177,"context_line":"        mpatch \u003d fixtures.MonkeyPatch("},{"line_number":1178,"context_line":"            \u0027threading.current_thread\u0027, eventlet.getcurrent)"},{"line_number":1179,"context_line":"        with mpatch if eventlet_patched else contextlib.ExitStack():"},{"line_number":1180,"context_line":"            return super().__init__(*a, **kw)"}],"source_content_type":"text/x-python","patch_set":1,"id":"31c7164e_fa889cce","side":"PARENT","line":1177,"range":{"start_line":1177,"start_character":17,"end_line":1177,"end_character":25},"in_reply_to":"67e33308_39745ff2","updated":"2022-01-18 21:17:51.000000000","message":"instead of using fixtures we could just do\n\nfrom unittests import mock\n...\nmpatch \u003d mock.patch(\u0027threading.current_thread\u0027, eventlet.getcurrent)\nwith mpatch if eventlet_patched else contextlib.ExitStack():\n     return super().__init__(*a, **kw)\n\nthe normal patcher object returned from unittest.mock support being used as a context manager so\nfixtures provide no benifit here.\n\nhttps://docs.python.org/dev/library/unittest.mock.html#patch\n\nso if we need this in production we can just use patch directly or write a simple context manager class to do this witout relying on mock if peopel dont like using mock for this.","commit_id":"1ddb8f83adef964a8ca050994a43adc6175994f1"}]}
