)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":11805,"name":"Corey Bryant","email":"corey.bryant@canonical.com","username":"coreycb"},"change_message_id":"ebcda3d342f5d34c5a5697bdb82cdd40c84b8ca0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"d78d38cc_f35b1527","updated":"2021-12-10 19:22:51.000000000","message":"One more change in test_glance_service.py fixes it:\n\ndiff --git a/ironic/tests/unit/common/test_glance_service.py b/ironic/tests/unit/common/test_glance_service.py\nindex f0e9f1002..3337e4fa5 100644\n--- a/ironic/tests/unit/common/test_glance_service.py\n+++ b/ironic/tests/unit/common/test_glance_service.py\n@@ -148,7 +148,7 @@ class TestGlanceImageService(base.TestCase):\n             \u0027os_hash_value\u0027: None,\n         }\n         with mock.patch.object(self.service, \u0027call\u0027, return_value\u003dimage,\n-                               autospec\u003dTrue):\n+                               spec\u003dobject):\n             image_meta \u003d self.service.show(image_id)\n             self.service.call.assert_called_once_with(\u0027get\u0027, image_id)\n         self.assertEqual(expected, image_meta)\n@@ -157,7 +157,7 @@ class TestGlanceImageService(base.TestCase):\n         image_id \u003d uuidutils.generate_uuid()\n         image \u003d self._make_datetime_fixture()\n         with mock.patch.object(self.service, \u0027call\u0027, return_value\u003dimage,\n-                               autospec\u003dTrue):\n+                               spec\u003dobject):\n             image_meta \u003d self.service.show(image_id)\n             self.service.call.assert_called_once_with(\u0027get\u0027, image_id)\n         self.assertEqual(self.NOW_DATETIME, image_meta[\u0027created_at\u0027])\n@@ -176,7 +176,7 @@ class TestGlanceImageService(base.TestCase):\n         image_id \u003d uuidutils.generate_uuid()\n         image \u003d self._make_fixture(name\u003d\u0027image1\u0027, id\u003dimage_id, status\u003d\"queued\")\n         with mock.patch.object(self.service, \u0027call\u0027, return_value\u003dimage,\n-                               autospec\u003dTrue):\n+                               spec\u003dobject):\n             self.assertRaises(exception.ImageUnacceptable,\n                               self.service.show, image_id)","commit_id":"133efaed1abc58f5b2475aec69a2028f5d1013be"},{"author":{"_account_id":11805,"name":"Corey Bryant","email":"corey.bryant@canonical.com","username":"coreycb"},"change_message_id":"f7d2bc15970e9ffd234c7df61e576cbd3149afbd","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"3ac93f37_47150b86","updated":"2021-12-10 18:49:47.000000000","message":"Thanks Riccardo! That seems to fix all but one issue for py310:\n\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d                                                                       \nFAIL: ironic.tests.unit.common.test_glance_service.TestGlanceImageService.test_show_makes_datetimes                                          \nironic.tests.unit.common.test_glance_service.TestGlanceImageService.test_show_makes_datetimes                                                \n----------------------------------------------------------------------                                                                       \ntesttools.testresult.real._StringException: Traceback (most recent call last):                                                               \n  File \"/\u003c\u003cPKGBUILDDIR\u003e\u003e/ironic/tests/unit/common/test_glance_service.py\", line 159, in test_show_makes_datetimes                            \n    with mock.patch.object(self.service, \u0027call\u0027, return_value\u003dimage,  \n  File \"/usr/lib/python3.10/unittest/mock.py\", line 1528, in __enter__                                                                       \n    raise InvalidSpecError(                                           \nunittest.mock.InvalidSpecError: Cannot autospec attr \u0027call\u0027 from target \u003cironic.common.glance_service.image_service.GlanceImageService object at 0x7f3899ba0b50\u003e as it has already been mocked out. [target\u003d\u003cironic.common.glance_service.image_service.GlanceImageService object at 0x7f3\n899ba0b50\u003e, attr\u003d\u003cMagicMock name\u003d\u0027retry()()\u0027 id\u003d\u0027139881116133808\u0027\u003e]","commit_id":"133efaed1abc58f5b2475aec69a2028f5d1013be"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"9cebe508142169961ddd127e7c9b7098d3b43512","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"017a5f19_c670c2c1","in_reply_to":"d78d38cc_f35b1527","updated":"2021-12-13 08:56:46.000000000","message":"weird, it didn\u0027t catch it when I ran the tests last time, but now it has\nanyway, fixed","commit_id":"133efaed1abc58f5b2475aec69a2028f5d1013be"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"5da7760705747a502a31cd38d8955f997712efba","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"ebdca5ff_074c4c5e","updated":"2021-12-13 09:51:38.000000000","message":"This seems to be taking a wrong direction. An attempt to use Mock as a spec likely means that we\u0027re trying to double-mock something. It is known to cause problems even before 3.10, let\u0027s try fixing that?","commit_id":"ae81470eb992a301d7709d3692f8c5b15ecf7e22"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"d1e3131306b2e53b2f3994fa7d8c22498c69f86b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":15,"id":"4e44b675_d919a181","updated":"2022-01-20 18:54:54.000000000","message":"I guess as a heads up CC\u0027ing maintainers for the two more active drivers. Ultimately it appears mocking patterns for drivers are mostly impacted by this so, we need to make sure they are aware moving forwards.","commit_id":"f4c37bf11914f01e0deb67844000f806418ac59b"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"5d0d473f1841f0b47fa72611e2e3daa1abe5c64c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":15,"id":"dcfdf8da_11dbba83","updated":"2022-01-21 13:44:24.000000000","message":"recheck","commit_id":"f4c37bf11914f01e0deb67844000f806418ac59b"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"5d0d473f1841f0b47fa72611e2e3daa1abe5c64c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":15,"id":"0bb47786_27cda6ac","in_reply_to":"4e44b675_d919a181","updated":"2022-01-21 13:44:24.000000000","message":"well as soon as python3.10 is released for ubuntu focal and we have this https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/821863 merged, everyone will be very aware :D","commit_id":"f4c37bf11914f01e0deb67844000f806418ac59b"}],"ironic/tests/unit/common/test_nova.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"f2dbf5d4ac73b315e2124dcfac78a18fe3b2f0e7","unresolved":true,"context_lines":[{"line_number":72,"context_line":"    def test_power_update(self, nova_result, resp_status, exp_ret,"},{"line_number":73,"context_line":"                          mock_adapter, mock_log):"},{"line_number":74,"context_line":"        server_ids \u003d [\u0027server-id-1\u0027, \u0027server-id-2\u0027]"},{"line_number":75,"context_line":"        nova_adapter \u003d mock.Mock()"},{"line_number":76,"context_line":"        with mock.patch.object(nova_adapter, \u0027post\u0027,"},{"line_number":77,"context_line":"                               spec\u003dobject) as mock_post_event:"},{"line_number":78,"context_line":"            post_resp_mock \u003d requests.Response()"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"            def json_func():"}],"source_content_type":"text/x-python","patch_set":5,"id":"b8f0fdd1_ea18e197","line":77,"range":{"start_line":75,"start_character":0,"end_line":77,"end_character":63},"updated":"2021-12-13 10:21:35.000000000","message":"nova_adapter is already a mock","commit_id":"ae81470eb992a301d7709d3692f8c5b15ecf7e22"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"8c550768963d84f976e2d19f9c05b3b6b104e7ae","unresolved":false,"context_lines":[{"line_number":72,"context_line":"    def test_power_update(self, nova_result, resp_status, exp_ret,"},{"line_number":73,"context_line":"                          mock_adapter, mock_log):"},{"line_number":74,"context_line":"        server_ids \u003d [\u0027server-id-1\u0027, \u0027server-id-2\u0027]"},{"line_number":75,"context_line":"        nova_adapter \u003d mock.Mock()"},{"line_number":76,"context_line":"        with mock.patch.object(nova_adapter, \u0027post\u0027,"},{"line_number":77,"context_line":"                               spec\u003dobject) as mock_post_event:"},{"line_number":78,"context_line":"            post_resp_mock \u003d requests.Response()"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"            def json_func():"}],"source_content_type":"text/x-python","patch_set":5,"id":"e88b7d5b_4dedf221","line":77,"range":{"start_line":75,"start_character":0,"end_line":77,"end_character":63},"in_reply_to":"b8f0fdd1_ea18e197","updated":"2022-01-17 08:48:12.000000000","message":"Done","commit_id":"ae81470eb992a301d7709d3692f8c5b15ecf7e22"}],"ironic/tests/unit/drivers/modules/test_agent_client.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"f2dbf5d4ac73b315e2124dcfac78a18fe3b2f0e7","unresolved":true,"context_lines":[{"line_number":556,"context_line":""},{"line_number":557,"context_line":"    def test_get_commands_status(self):"},{"line_number":558,"context_line":"        with mock.patch.object(self.client.session, \u0027get\u0027,"},{"line_number":559,"context_line":"                               spec\u003dobject) as mock_get:"},{"line_number":560,"context_line":"            res \u003d mock.MagicMock(spec_set\u003d[\u0027json\u0027])"},{"line_number":561,"context_line":"            res.json.return_value \u003d {\u0027commands\u0027: []}"},{"line_number":562,"context_line":"            mock_get.return_value \u003d res"}],"source_content_type":"text/x-python","patch_set":5,"id":"cd10ad46_2d3bc460","line":559,"updated":"2021-12-13 10:21:35.000000000","message":"Same as on Nova: client.session is already a mock","commit_id":"ae81470eb992a301d7709d3692f8c5b15ecf7e22"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"8c550768963d84f976e2d19f9c05b3b6b104e7ae","unresolved":false,"context_lines":[{"line_number":556,"context_line":""},{"line_number":557,"context_line":"    def test_get_commands_status(self):"},{"line_number":558,"context_line":"        with mock.patch.object(self.client.session, \u0027get\u0027,"},{"line_number":559,"context_line":"                               spec\u003dobject) as mock_get:"},{"line_number":560,"context_line":"            res \u003d mock.MagicMock(spec_set\u003d[\u0027json\u0027])"},{"line_number":561,"context_line":"            res.json.return_value \u003d {\u0027commands\u0027: []}"},{"line_number":562,"context_line":"            mock_get.return_value \u003d res"}],"source_content_type":"text/x-python","patch_set":5,"id":"1f4fc969_b76cbe9f","line":559,"in_reply_to":"cd10ad46_2d3bc460","updated":"2022-01-17 08:48:12.000000000","message":"Done","commit_id":"ae81470eb992a301d7709d3692f8c5b15ecf7e22"}]}
