)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"f885c5908fde31235a89037d3920e5693fae282f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"8cffa929_75a956c1","updated":"2024-07-22 13:23:18.000000000","message":"Thanks for the patch!\n\nI\u0027m afraid these tests depend a lot on \"internal behaviour\" from Python. Maybe we could rewrite them so that they do not depend so heavily on implementation details. For instance: https://review.opendev.org/c/openstack/python-glanceclient/+/924620 .\n\nThis has not been tested on Py3.13. Btw, do you have an easy way of setting up a 3.13 env? I tried using docker.io/library/python:3.13-rc but had some issues with dependencies not installing propery.","commit_id":"910ce8069a26dcc00b47b9d92464f59d876d844f"},{"author":{"_account_id":36117,"name":"arkamar","email":"arkamar@atlas.cz","username":"arkamar"},"change_message_id":"2e6ccf5935fc42b5a59bc036e34b94767834dea2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"6002ef8b_a52ecc3f","in_reply_to":"8cffa929_75a956c1","updated":"2024-07-22 15:35:20.000000000","message":"I agree, it is much better to have implementation less dependent on python internals.\n\nI use py3.13 enabled gentoo environment, I can easily test it there.","commit_id":"910ce8069a26dcc00b47b9d92464f59d876d844f"}],"glanceclient/tests/unit/test_shell.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"c7ee0833f31b80c2e3ffde9a9c0a1a8929ef0bcd","unresolved":true,"context_lines":[{"line_number":787,"context_line":"        self.shell._cache_schemas(args, client, home_dir\u003dself.cache_dir)"},{"line_number":788,"context_line":""},{"line_number":789,"context_line":"        # see https://github.com/python/cpython/pull/26902"},{"line_number":790,"context_line":"        expected_count \u003d 12 if sys.version_info \u003c (3, 13) else 15"},{"line_number":791,"context_line":"        open_idx \u003d 4 if sys.version_info \u003c (3, 13) else 5"},{"line_number":792,"context_line":"        write_idx \u003d 6 if sys.version_info \u003c (3, 13) else 7"},{"line_number":793,"context_line":""},{"line_number":794,"context_line":"        self.assertEqual(expected_count, open.mock_calls.__len__())"},{"line_number":795,"context_line":"        self.assertEqual(mock.call(self.cache_files[0], \u0027w\u0027),"},{"line_number":796,"context_line":"                         open.mock_calls[0])"},{"line_number":797,"context_line":"        self.assertEqual(mock.call(self.cache_files[1], \u0027w\u0027),"},{"line_number":798,"context_line":"                         open.mock_calls[open_idx])"},{"line_number":799,"context_line":"        actual \u003d json.loads(open.mock_calls[2][1][0])"},{"line_number":800,"context_line":"        self.assertEqual(schema_odict, actual)"},{"line_number":801,"context_line":"        actual \u003d json.loads(open.mock_calls[write_idx][1][0])"},{"line_number":802,"context_line":"        self.assertEqual(schema_odict, actual)"},{"line_number":803,"context_line":""},{"line_number":804,"context_line":"    @mock.patch(\u0027builtins.open\u0027, new\u003dmock.mock_open(), create\u003dTrue)"},{"line_number":805,"context_line":"    @mock.patch(\u0027os.path.exists\u0027, side_effect\u003d[True, False, False, False])"}],"source_content_type":"text/x-python","patch_set":3,"id":"f5a55823_e93a6873","line":802,"range":{"start_line":790,"start_character":8,"end_line":802,"end_character":46},"updated":"2025-08-06 14:16:40.000000000","message":"I think you can do this in one if else condition rather that checking again and again\n\n```\nif sys.version_info \u003c (3, 13):\n    expected_count \u003d 12\n    open_idx \u003d 4\n    write_idx \u003d 6\nelse:\n    expected_count \u003d 15\n    open_idx \u003d 5\n    write_idx \u003d 7\n\n# Perform assertions\nself.assertEqual(expected_count, len(open.mock_calls))\nself.assertEqual(mock.call(self.cache_files[0], \u0027w\u0027), open.mock_calls[0])\nself.assertEqual(mock.call(self.cache_files[1], \u0027w\u0027), open.mock_calls[open_idx])\n\nactual \u003d json.loads(open.mock_calls[2][1][0])\nself.assertEqual(schema_odict, actual)\n\nactual \u003d json.loads(open.mock_calls[write_idx][1][0])\nself.assertEqual(schema_odict, actual)\n```","commit_id":"910ce8069a26dcc00b47b9d92464f59d876d844f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"c7ee0833f31b80c2e3ffde9a9c0a1a8929ef0bcd","unresolved":true,"context_lines":[{"line_number":814,"context_line":"        client \u003d self.shell._get_versioned_client(\u00272\u0027, args)"},{"line_number":815,"context_line":"        self.shell._cache_schemas(args, client, home_dir\u003dself.cache_dir)"},{"line_number":816,"context_line":""},{"line_number":817,"context_line":"        # see https://github.com/python/cpython/pull/26902"},{"line_number":818,"context_line":"        expected_count \u003d 12 if sys.version_info \u003c (3, 13) else 15"},{"line_number":819,"context_line":"        open_idx \u003d 4 if sys.version_info \u003c (3, 13) else 5"},{"line_number":820,"context_line":"        write_idx \u003d 6 if sys.version_info \u003c (3, 13) else 7"}],"source_content_type":"text/x-python","patch_set":3,"id":"7c498e8c_04a55870","line":817,"updated":"2025-08-06 14:16:40.000000000","message":"ditto","commit_id":"910ce8069a26dcc00b47b9d92464f59d876d844f"}]}
