)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"1228d09eddc8c4bfe2d8ace55deebb2e05f026fe","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"6724e274_22561fe4","updated":"2025-03-14 17:09:32.000000000","message":"Not sure how to test this properly, mock the sys.argv out?...\n\nthe simplest way to test the current state and the patch is a short script\n`testsdk.py`\n```python\n# this is how the docs advertise this\n# https://docs.openstack.org/openstacksdk/latest/user/config/using.html#argparse\nimport argparse\nimport openstack\nparser \u003d argparse.ArgumentParser()\ncloud \u003d openstack.connect(options\u003dparser)\nprint(cloud.list_keypairs())\n```\nand then do \n```shell\n$ unset OS_CLOUD\n$ python testdsk.py --os-cloud devstack  # or whatever else working creds you have\n```","commit_id":"8291ff267c4f997419a401a792bbe6030c162dd0"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"0b6cd133549dc4c3db30b89d2abf8f89b0c20ac8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"89cded58_303f8db5","in_reply_to":"6724e274_22561fe4","updated":"2026-03-02 11:34:29.000000000","message":"Done","commit_id":"8291ff267c4f997419a401a792bbe6030c162dd0"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f3b582833540520edc3355db78130b4c0be89bb6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"43cb00f7_51f2dd86","updated":"2025-03-18 17:06:53.000000000","message":"fwiw, we do have tests for this in `openstack/tests/unit/config/test_init.py`, but they were passing because we were passing an unsupported and incorrect kwarg (`options`) rather than the correct one (`argparse`) to the `OpenStackConfig.get_one` method.","commit_id":"f25c47e0ba30ced0cb9b8e6f841b394796b799f7"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"7e504c1c0e06554c06b8d9361db117a2098916a0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"f23ddb1b_a57145aa","in_reply_to":"43cb00f7_51f2dd86","updated":"2025-03-19 12:37:02.000000000","message":"I\u0027ll see if I can fix that then","commit_id":"f25c47e0ba30ced0cb9b8e6f841b394796b799f7"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"f13072a8cb4a097d88bb51177a29cf7712955339","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"044f10a5_f4742aa5","in_reply_to":"f23ddb1b_a57145aa","updated":"2025-03-19 12:44:00.000000000","message":"the argument usage in the test is actually fine, and it correctly passes it the ArgumentParser instance, not a Namespace.\nit just does not test in any way that whatever arguments were set and parsed by the ArgParser were in fact applied to the cloud region.","commit_id":"f25c47e0ba30ced0cb9b8e6f841b394796b799f7"}],"openstack/__init__.py":[{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"1228d09eddc8c4bfe2d8ace55deebb2e05f026fe","unresolved":true,"context_lines":[{"line_number":67,"context_line":"    cloud: ty.Optional[str] \u003d None,"},{"line_number":68,"context_line":"    app_name: ty.Optional[str] \u003d None,"},{"line_number":69,"context_line":"    app_version: ty.Optional[str] \u003d None,"},{"line_number":70,"context_line":"    options: ty.Optional[argparse.Namespace] \u003d None,"},{"line_number":71,"context_line":"    load_yaml_config: bool \u003d True,"},{"line_number":72,"context_line":"    load_envvars: bool \u003d True,"},{"line_number":73,"context_line":"    **kwargs: ty.Any,"}],"source_content_type":"text/x-python","patch_set":1,"id":"426ccb9d_cb2297af","side":"PARENT","line":70,"range":{"start_line":70,"start_character":25,"end_line":70,"end_character":43},"updated":"2025-03-14 17:09:32.000000000","message":"this is clearly not a Namespace, as in config.get_cloud_region it will try to register options in it - which is impossible for Namespace","commit_id":"c87a4b93f43c60729abc599511dd1bc7d21cb592"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"254132ab83e546de5ac936802980c9d13562d980","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    cloud: ty.Optional[str] \u003d None,"},{"line_number":68,"context_line":"    app_name: ty.Optional[str] \u003d None,"},{"line_number":69,"context_line":"    app_version: ty.Optional[str] \u003d None,"},{"line_number":70,"context_line":"    options: ty.Optional[argparse.Namespace] \u003d None,"},{"line_number":71,"context_line":"    load_yaml_config: bool \u003d True,"},{"line_number":72,"context_line":"    load_envvars: bool \u003d True,"},{"line_number":73,"context_line":"    **kwargs: ty.Any,"}],"source_content_type":"text/x-python","patch_set":1,"id":"01e4f6ce_de569f66","side":"PARENT","line":70,"range":{"start_line":70,"start_character":25,"end_line":70,"end_character":43},"in_reply_to":"426ccb9d_cb2297af","updated":"2025-03-18 16:59:14.000000000","message":"Acknowledged","commit_id":"c87a4b93f43c60729abc599511dd1bc7d21cb592"}],"openstack/config/__init__.py":[{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"1228d09eddc8c4bfe2d8ace55deebb2e05f026fe","unresolved":true,"context_lines":[{"line_number":34,"context_line":"    )"},{"line_number":35,"context_line":"    if options:"},{"line_number":36,"context_line":"        config.register_argparse_arguments(options, sys.argv, service_key)"},{"line_number":37,"context_line":"        parsed_options \u003d options.parse_known_args(sys.argv)"},{"line_number":38,"context_line":"    else:"},{"line_number":39,"context_line":"        parsed_options \u003d None"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"c6d72b57_afa2ef30","side":"PARENT","line":37,"range":{"start_line":37,"start_character":25,"end_line":37,"end_character":59},"updated":"2025-03-14 17:09:32.000000000","message":"this returns a tuple of Namespace and the list of rest of non parsed out sys.argv","commit_id":"c87a4b93f43c60729abc599511dd1bc7d21cb592"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"e2112cb415e8e67a12ba9eaa896bde62b2f71c57","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    )"},{"line_number":35,"context_line":"    if options:"},{"line_number":36,"context_line":"        config.register_argparse_arguments(options, sys.argv, service_key)"},{"line_number":37,"context_line":"        parsed_options \u003d options.parse_known_args(sys.argv)"},{"line_number":38,"context_line":"    else:"},{"line_number":39,"context_line":"        parsed_options \u003d None"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"6eced234_44ef0366","side":"PARENT","line":37,"range":{"start_line":37,"start_character":25,"end_line":37,"end_character":59},"in_reply_to":"c6d72b57_afa2ef30","updated":"2025-04-22 12:37:47.000000000","message":"Acknowledged","commit_id":"c87a4b93f43c60729abc599511dd1bc7d21cb592"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"1228d09eddc8c4bfe2d8ace55deebb2e05f026fe","unresolved":true,"context_lines":[{"line_number":38,"context_line":"    else:"},{"line_number":39,"context_line":"        parsed_options \u003d None"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    return config.get_one(options\u003dparsed_options, **kwargs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"b85b3629_2e350fcf","side":"PARENT","line":41,"range":{"start_line":41,"start_character":26,"end_line":41,"end_character":33},"updated":"2025-03-14 17:09:32.000000000","message":"the correct parameter is \u0027argparse\u0027 not \u0027options\u0027","commit_id":"c87a4b93f43c60729abc599511dd1bc7d21cb592"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"e2112cb415e8e67a12ba9eaa896bde62b2f71c57","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    else:"},{"line_number":39,"context_line":"        parsed_options \u003d None"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    return config.get_one(options\u003dparsed_options, **kwargs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"cb059b52_9ec7c05c","side":"PARENT","line":41,"range":{"start_line":41,"start_character":26,"end_line":41,"end_character":33},"in_reply_to":"b85b3629_2e350fcf","updated":"2025-04-22 12:37:47.000000000","message":"Acknowledged","commit_id":"c87a4b93f43c60729abc599511dd1bc7d21cb592"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9129e5e261a46f6a5faaeee2b6e8e0a766f9849e","unresolved":true,"context_lines":[{"line_number":34,"context_line":"    )"},{"line_number":35,"context_line":"    if options:"},{"line_number":36,"context_line":"        config.register_argparse_arguments(options, sys.argv, service_key)"},{"line_number":37,"context_line":"        parsed_options, _rest_of_argv \u003d options.parse_known_args(sys.argv)"},{"line_number":38,"context_line":"    else:"},{"line_number":39,"context_line":"        parsed_options \u003d None"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"c279d726_b41571df","line":37,"range":{"start_line":37,"start_character":24,"end_line":37,"end_character":37},"updated":"2025-03-18 17:00:06.000000000","message":"```suggestion\n        parsed_options, _ \u003d options.parse_known_args(sys.argv)\n```","commit_id":"f25c47e0ba30ced0cb9b8e6f841b394796b799f7"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"6e7c2615ccdc246e9f5a92056ed16c9643f59e82","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    )"},{"line_number":35,"context_line":"    if options:"},{"line_number":36,"context_line":"        config.register_argparse_arguments(options, sys.argv, service_key)"},{"line_number":37,"context_line":"        parsed_options, _rest_of_argv \u003d options.parse_known_args(sys.argv)"},{"line_number":38,"context_line":"    else:"},{"line_number":39,"context_line":"        parsed_options \u003d None"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"d87bed83_e8f25b6b","line":37,"range":{"start_line":37,"start_character":24,"end_line":37,"end_character":37},"in_reply_to":"5089bcde_46946437","updated":"2025-03-19 12:33:23.000000000","message":"Done","commit_id":"f25c47e0ba30ced0cb9b8e6f841b394796b799f7"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"593425bef83f707675d09d37c5f0fa2aa316209f","unresolved":true,"context_lines":[{"line_number":34,"context_line":"    )"},{"line_number":35,"context_line":"    if options:"},{"line_number":36,"context_line":"        config.register_argparse_arguments(options, sys.argv, service_key)"},{"line_number":37,"context_line":"        parsed_options, _rest_of_argv \u003d options.parse_known_args(sys.argv)"},{"line_number":38,"context_line":"    else:"},{"line_number":39,"context_line":"        parsed_options \u003d None"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5089bcde_46946437","line":37,"range":{"start_line":37,"start_character":24,"end_line":37,"end_character":37},"in_reply_to":"c279d726_b41571df","updated":"2025-03-19 12:32:35.000000000","message":"I don\u0027t like shadowing `_` at least across OpenStack, as it is frequently used shorthand for oslo.i18n/gettext, just a habit now I guess. Here in the library that has no explicit i18n support I guess it is fine.","commit_id":"f25c47e0ba30ced0cb9b8e6f841b394796b799f7"}]}
