)]}'
{"bin/swift-dispersion-report":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"b1a6e12d5c563beef7b9074909ecda53a9594e11","unresolved":true,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"if __name__ \u003d\u003d \"__main__\":"},{"line_number":24,"context_line":"    sys.exit(main())"}],"source_content_type":"application/octet-stream","patch_set":4,"id":"9e171393_afc8105c","side":"PARENT","line":24,"updated":"2024-07-12 01:11:14.000000000","message":"This probably doesn\u0027t need to change. If it returns via sys.exit or not probably doesn\u0027t matter seeing as we\u0027re not going to really be using this anymore. The PBR generated new one is basically the same:\n\n    $ cat /usr/local/bin/swift-dispersion-report\n    #!/usr/bin/python\n    # PBR Generated from \u0027console_scripts\u0027\n    \n    import sys\n    \n    from swift.cli.dispersion_report import main\n    \n    \n    if __name__ \u003d\u003d \"__main__\":\n        sys.exit(main())\n\nAlso it already matches the new pattern, import main and call it.","commit_id":"415420cc8ff6ecd2a1c39e0ff66066ba691f5874"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"61f4ab5c388f899c1b4dd3a856ba3e88a4292bfb","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"if __name__ \u003d\u003d \"__main__\":"},{"line_number":24,"context_line":"    sys.exit(main())"}],"source_content_type":"application/octet-stream","patch_set":4,"id":"2a1ab943_fed888de","side":"PARENT","line":24,"in_reply_to":"9e171393_afc8105c","updated":"2024-07-15 21:58:50.000000000","message":"Done","commit_id":"415420cc8ff6ecd2a1c39e0ff66066ba691f5874"}],"bin/swift-object-relinker":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"b1a6e12d5c563beef7b9074909ecda53a9594e11","unresolved":true,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"},{"line_number":23,"context_line":"    sys.exit(main(sys.argv[1:]))"}],"source_content_type":"application/octet-stream","patch_set":4,"id":"9e103102_efc7477c","side":"PARENT","line":23,"updated":"2024-07-12 01:11:14.000000000","message":"This probably doesn\u0027t strictly need to change either. It basically already followed the pattern. I guess it\u0027s nice that it\u0027ll now follow the PBR generated version, so cool, might as well change it.","commit_id":"415420cc8ff6ecd2a1c39e0ff66066ba691f5874"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"61f4ab5c388f899c1b4dd3a856ba3e88a4292bfb","unresolved":true,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"},{"line_number":23,"context_line":"    sys.exit(main(sys.argv[1:]))"}],"source_content_type":"application/octet-stream","patch_set":4,"id":"6b78a4bf_8d692b00","side":"PARENT","line":23,"in_reply_to":"9e103102_efc7477c","updated":"2024-07-15 21:58:50.000000000","message":"Yeah, mostly I wanted to remove as many potential pitfalls as possible -- is it supposed to be `sys.argv[1:]`, or just `sys.argv`? What if we somehow accidentally change it to `sys.argv[2:]`? Seemed best to just remove all reference to `sys.argv` entirely.","commit_id":"415420cc8ff6ecd2a1c39e0ff66066ba691f5874"}],"bin/swift-ring-builder":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"b1a6e12d5c563beef7b9074909ecda53a9594e11","unresolved":true,"context_lines":[{"line_number":14,"context_line":"# See the License for the specific language governing permissions and"},{"line_number":15,"context_line":"# limitations under the License."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from swift.cli.ringbuilder import error_handling_main"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"if __name__ \u003d\u003d \"__main__\":"},{"line_number":20,"context_line":"    error_handling_main()"}],"source_content_type":"application/octet-stream","patch_set":4,"id":"ed1d472b_be04037f","line":17,"updated":"2024-07-12 01:11:14.000000000","message":"Oh this is different, but I see why it\u0027s done. Means we can rework the excepthook.\n\nBut why can\u0027t his just be put into main? I mean the entry point will now always be `error_handling_main` anyway, so merging it into main would be the same thing ie, in setup.cfg:\n\n    swift-ring-builder \u003d swift.cli.ringbuilder:error_handling_main\n\n\nSo can we just merge it, something like:\n\n\n\n    def main():\n        def exit_with_status_two(tp, val, tb):\n            traceback.print_exception(tp, val, tb)\n            exit(2)\n            \n        sys.excepthook \u003d exit_with_status_two\n        \u003crest of main\u003e\n\nAnd then we can just use main again everywhere?","commit_id":"e36acc994304100ffbfe4bd8d4023aefb8c9e242"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"61f4ab5c388f899c1b4dd3a856ba3e88a4292bfb","unresolved":true,"context_lines":[{"line_number":14,"context_line":"# See the License for the specific language governing permissions and"},{"line_number":15,"context_line":"# limitations under the License."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from swift.cli.ringbuilder import error_handling_main"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"if __name__ \u003d\u003d \"__main__\":"},{"line_number":20,"context_line":"    error_handling_main()"}],"source_content_type":"application/octet-stream","patch_set":4,"id":"7f97c64e_77e5e9ce","line":17,"in_reply_to":"ed1d472b_be04037f","updated":"2024-07-15 21:58:50.000000000","message":"Main reason is for testability -- we don\u0027t want tests of `main` to leave `sys.excepthook` overridden. And **I** don\u0027t want to have to go add a bunch of patching to tests as I\u0027m doing this migration.","commit_id":"e36acc994304100ffbfe4bd8d4023aefb8c9e242"}],"swift/cli/relinker.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"b1a6e12d5c563beef7b9074909ecda53a9594e11","unresolved":true,"context_lines":[{"line_number":743,"context_line":"    return config_auto_int_value(value, default\u003d\u0027auto\u0027)"},{"line_number":744,"context_line":""},{"line_number":745,"context_line":""},{"line_number":746,"context_line":"def main(args\u003dNone):"},{"line_number":747,"context_line":"    parser \u003d argparse.ArgumentParser("},{"line_number":748,"context_line":"        description\u003d\u0027Relink and cleanup objects to increase partition power\u0027)"},{"line_number":749,"context_line":"    parser.add_argument(\u0027action\u0027, choices\u003d[\u0027relink\u0027, \u0027cleanup\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"111a3fc6_19323f53","line":746,"updated":"2024-07-12 01:11:14.000000000","message":"This is only here for backwards compat I expect. Nice.","commit_id":"e36acc994304100ffbfe4bd8d4023aefb8c9e242"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"61f4ab5c388f899c1b4dd3a856ba3e88a4292bfb","unresolved":true,"context_lines":[{"line_number":743,"context_line":"    return config_auto_int_value(value, default\u003d\u0027auto\u0027)"},{"line_number":744,"context_line":""},{"line_number":745,"context_line":""},{"line_number":746,"context_line":"def main(args\u003dNone):"},{"line_number":747,"context_line":"    parser \u003d argparse.ArgumentParser("},{"line_number":748,"context_line":"        description\u003d\u0027Relink and cleanup objects to increase partition power\u0027)"},{"line_number":749,"context_line":"    parser.add_argument(\u0027action\u0027, choices\u003d[\u0027relink\u0027, \u0027cleanup\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"ef1a32de_3ce252be","line":746,"in_reply_to":"111a3fc6_19323f53","updated":"2024-07-15 21:58:50.000000000","message":"No, it\u0027s necessary! As you noticed, the PBR-generated ones call like\n```\nif __name__ \u003d\u003d \"__main__\":\n    sys.exit(main())\n```\n(so, no explicit args passed)","commit_id":"e36acc994304100ffbfe4bd8d4023aefb8c9e242"}]}
