)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"f3bae706ba9c44ede61cca8e6c89e07386e1355c","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Prompt for missing username and/or password"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If auth url is *also* missing, however, the familiar usage text is still"},{"line_number":10,"context_line":"displayed."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Related change: I9bf1f70dd4cdd25467587a416df9631ed4ce980a"},{"line_number":13,"context_line":"Closes-Bug: 1357562"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"3a50d1a3_63e7fbac","line":10,"updated":"2015-07-24 22:16:27.000000000","message":"i don\u0027t understand this delineation - either you need to setup your environment before you can use the tool or you don\u0027t\n\nI would actually rather it error and tell me to fix my environment before we can proceed than to prompt me everytime.\n\nIf somehow doing the the prompting would *fix* the issue for me that\u0027d a huge usability win.\n\nIf I still have to source something before I can get the prompts - it may as well encourage the practice of putting everything I need to use the tool into my environment at once.","commit_id":"8d09d18b4fd6ab5d0f214f2950375700ead84eaa"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"805cc7ed552a80fc19eacc00f6b79cfb09b3c401","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Prompt for missing username and/or password"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If auth url is *also* missing, however, the familiar usage text is still"},{"line_number":10,"context_line":"displayed."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Related change: I9bf1f70dd4cdd25467587a416df9631ed4ce980a"},{"line_number":13,"context_line":"Closes-Bug: 1357562"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"3a50d1a3_54be3400","line":10,"in_reply_to":"3a50d1a3_63e7fbac","updated":"2015-08-10 22:08:59.000000000","message":"But you *don\u0027t* need to set up your environment; there\u0027s also the command line args. Hell, if you look at the output of `swift --help`, the majority of examples have you specify all of the auth params on the command line.\n\nThe nice thing about gating this off of the auth url is that a system administrator could ensure it\u0027s present by default in users\u0027 .profile (and could even add a `export ST_USER\u003d$USER` if that\u0027s appropriate, so users only have to enter a password). And if my workflow usually involves downloading a single file, working with it for a while (tens of minutes to a few hours), then maybe uploading a single-file result, a couple password prompts isn\u0027t a huge burden.","commit_id":"8d09d18b4fd6ab5d0f214f2950375700ead84eaa"}],"swiftclient/shell.py":[{"author":{"_account_id":9878,"name":"Zack M. Davis","email":"zdavis@swiftstack.com","username":"zackmdavis"},"change_message_id":"0aa897cffbc7080f774a12971877bc72f06a2044","unresolved":false,"context_lines":[{"line_number":1017,"context_line":""},{"line_number":1018,"context_line":"            if (options.user or options.os_user_id) and not options.key:"},{"line_number":1019,"context_line":"                try:"},{"line_number":1020,"context_line":"                    options.key \u003d interrupt_safe_getpass()"},{"line_number":1021,"context_line":"                except EOFError:  # Check for Ctrl-D"},{"line_number":1022,"context_line":"                    pass"},{"line_number":1023,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_857ab975","line":1020,"updated":"2015-06-24 19:21:39.000000000","message":"I think it\u0027s worth adding a comment here explaining the rationale for interrupt_safe_getpass (I\u0027m given to understand from offline discussion and the commentary on the precursor of this patch (https://review.openstack.org/#/c/114678/) that it\u0027s a workaround to prevent breaking the terminal settings on ^C in light of our existing custom SIGINT handler in shell.py?---but this isn\u0027t clear from reading the code.)","commit_id":"6fd81a7e229c77e9e3062326390602f82ee02205"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"f3bae706ba9c44ede61cca8e6c89e07386e1355c","unresolved":false,"context_lines":[{"line_number":1079,"context_line":"        return options, args"},{"line_number":1080,"context_line":""},{"line_number":1081,"context_line":"    if enforce_requires:"},{"line_number":1082,"context_line":"        if options.auth and hasattr(stdin, \u0027isatty\u0027) and stdin.isatty():"},{"line_number":1083,"context_line":"            if not (options.user or options.os_user_id):"},{"line_number":1084,"context_line":"                try:"},{"line_number":1085,"context_line":"                    options.user \u003d input(\"Username: \")"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a50d1a3_e3fb0b46","line":1082,"updated":"2015-07-24 22:16:27.000000000","message":"nice!","commit_id":"8d09d18b4fd6ab5d0f214f2950375700ead84eaa"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"f3bae706ba9c44ede61cca8e6c89e07386e1355c","unresolved":false,"context_lines":[{"line_number":1082,"context_line":"        if options.auth and hasattr(stdin, \u0027isatty\u0027) and stdin.isatty():"},{"line_number":1083,"context_line":"            if not (options.user or options.os_user_id):"},{"line_number":1084,"context_line":"                try:"},{"line_number":1085,"context_line":"                    options.user \u003d input(\"Username: \")"},{"line_number":1086,"context_line":"                except EOFError:  # Check for Ctrl-D"},{"line_number":1087,"context_line":"                    pass"},{"line_number":1088,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a50d1a3_63b5bb7c","line":1085,"updated":"2015-07-24 22:16:27.000000000","message":"raw_input?  oh six you tricky snake.","commit_id":"8d09d18b4fd6ab5d0f214f2950375700ead84eaa"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"f3bae706ba9c44ede61cca8e6c89e07386e1355c","unresolved":false,"context_lines":[{"line_number":1083,"context_line":"            if not (options.user or options.os_user_id):"},{"line_number":1084,"context_line":"                try:"},{"line_number":1085,"context_line":"                    options.user \u003d input(\"Username: \")"},{"line_number":1086,"context_line":"                except EOFError:  # Check for Ctrl-D"},{"line_number":1087,"context_line":"                    pass"},{"line_number":1088,"context_line":""},{"line_number":1089,"context_line":"            if (options.user or options.os_user_id) and not options.key:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a50d1a3_639e1b09","line":1086,"updated":"2015-07-24 22:16:27.000000000","message":"ctrl-C too?","commit_id":"8d09d18b4fd6ab5d0f214f2950375700ead84eaa"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"805cc7ed552a80fc19eacc00f6b79cfb09b3c401","unresolved":false,"context_lines":[{"line_number":1083,"context_line":"            if not (options.user or options.os_user_id):"},{"line_number":1084,"context_line":"                try:"},{"line_number":1085,"context_line":"                    options.user \u003d input(\"Username: \")"},{"line_number":1086,"context_line":"                except EOFError:  # Check for Ctrl-D"},{"line_number":1087,"context_line":"                    pass"},{"line_number":1088,"context_line":""},{"line_number":1089,"context_line":"            if (options.user or options.os_user_id) and not options.key:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a50d1a3_340848d9","line":1086,"in_reply_to":"3a50d1a3_639e1b09","updated":"2015-08-10 22:08:59.000000000","message":"Nope, Ctrl-C jumps straight to immediate_exit, defined at the top, same as Ctrl-C-ing at any point during an operation. But since this doesn\u0027t futz with terminal settings, we don\u0027t care.","commit_id":"8d09d18b4fd6ab5d0f214f2950375700ead84eaa"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"f3bae706ba9c44ede61cca8e6c89e07386e1355c","unresolved":false,"context_lines":[{"line_number":1092,"context_line":"                    # as we\u0027ve already registered a SIGINT handler"},{"line_number":1093,"context_line":"                    options.key \u003d interrupt_safe_getpass()"},{"line_number":1094,"context_line":"                except EOFError:  # Check for Ctrl-D"},{"line_number":1095,"context_line":"                    pass"},{"line_number":1096,"context_line":""},{"line_number":1097,"context_line":"        if options.auth_version \u003d\u003d \u00273\u0027:"},{"line_number":1098,"context_line":"            if not options.auth:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a50d1a3_636cdb08","line":1095,"updated":"2015-07-24 22:16:27.000000000","message":"I\u0027ve never seen anyone do this before.  Maybe it will work forever and be totally maintainable and never cause us problems.  But out of curiosity, where we would have to move this check so we can do it *before* we\u0027ve gone crazy in the terminal?","commit_id":"8d09d18b4fd6ab5d0f214f2950375700ead84eaa"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"805cc7ed552a80fc19eacc00f6b79cfb09b3c401","unresolved":false,"context_lines":[{"line_number":1092,"context_line":"                    # as we\u0027ve already registered a SIGINT handler"},{"line_number":1093,"context_line":"                    options.key \u003d interrupt_safe_getpass()"},{"line_number":1094,"context_line":"                except EOFError:  # Check for Ctrl-D"},{"line_number":1095,"context_line":"                    pass"},{"line_number":1096,"context_line":""},{"line_number":1097,"context_line":"        if options.auth_version \u003d\u003d \u00273\u0027:"},{"line_number":1098,"context_line":"            if not options.auth:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a4dcd0f_61ca851c","line":1095,"in_reply_to":"3a50d1a3_636cdb08","updated":"2015-08-10 22:08:59.000000000","message":"To just use getpass instead of interrupt_safe_getpass, we\u0027d need to check for the existence of a password up in main. There are at least two headaches, though:\n\n1. We add sub-command-specific options and re-parse in many commands.\n\n2. We only want to prompt once, and I\u0027m not seeing a clean way to keep the result around for a subsequent parsing.\n\nDo we know *why* the SIGINT hook is still there? It looks like it used to attempt some graceful thread cleanup or wait for in-progress downloads to finish or something, but not anymore?","commit_id":"8d09d18b4fd6ab5d0f214f2950375700ead84eaa"},{"author":{"_account_id":12974,"name":"Ben Martin","email":"blmartin@us.ibm.com","username":"blmartin"},"change_message_id":"3a4cfb64c573436df8f178c63781d2d7f19c7365","unresolved":false,"context_lines":[{"line_number":1124,"context_line":"                prompt_hint \u003d \"\"\""},{"line_number":1125,"context_line":"(To avoid this prompt in the future, set OS_PASSWORD in your environment,"},{"line_number":1126,"context_line":" or use the `swift auth` command to cache your auth token and storage url)"},{"line_number":1127,"context_line":"\"\"\".lstrip(\u0027\\n\u0027)"},{"line_number":1128,"context_line":"                try:"},{"line_number":1129,"context_line":"                    # use interrupt_safe_getpass instead of getpass,"},{"line_number":1130,"context_line":"                    # as we\u0027ve already registered a SIGINT handler"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa69d971_30459e6f","line":1127,"updated":"2016-01-04 18:28:05.000000000","message":"Everywhere else in this file, _help/_hint messages are defined before the function to make the code (and message) easier to read.","commit_id":"ccde5bdfd6362ff4a6680dc09b3be0b6544e4724"}],"swiftclient/utils.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"f3bae706ba9c44ede61cca8e6c89e07386e1355c","unresolved":false,"context_lines":[{"line_number":228,"context_line":"    even if you\u0027ve registered a SIGINT handler. On Ctrl+C, the handler will"},{"line_number":229,"context_line":"    still be called, but after giving getpass a chance to restore terminal"},{"line_number":230,"context_line":"    settings."},{"line_number":231,"context_line":"    \"\"\""},{"line_number":232,"context_line":"    def handler(sig, frame):"},{"line_number":233,"context_line":"        raise KeyboardInterrupt()"},{"line_number":234,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a50d1a3_e3a9cb25","line":231,"updated":"2015-07-24 22:16:27.000000000","message":"whoa.","commit_id":"8d09d18b4fd6ab5d0f214f2950375700ead84eaa"}],"tests/unit/test_shell.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"f3bae706ba9c44ede61cca8e6c89e07386e1355c","unresolved":false,"context_lines":[{"line_number":997,"context_line":"        # hang but are actually waiting on input"},{"line_number":998,"context_line":"        self.mock_stdin.isatty.return_value \u003d False"},{"line_number":999,"context_line":"        self.mock_input \u003d self._patchers[1].start()"},{"line_number":1000,"context_line":"        self.mock_getpass \u003d self._patchers[2].start()"},{"line_number":1001,"context_line":""},{"line_number":1002,"context_line":"    def tearDown(self):"},{"line_number":1003,"context_line":"        for patcher in self._patchers:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a50d1a3_833fa7d5","line":1000,"updated":"2015-07-24 22:16:27.000000000","message":"this is not too bad - I might have played with the idea of adding a CaptureInput context manager - and you just in.write to it or whatever to simulate?  Ideally instead of vailidating that six.input was called with a prompt - you\u0027d validate (with CaptureOutput) that the prompt made it to the terminal (?)  maybe?","commit_id":"8d09d18b4fd6ab5d0f214f2950375700ead84eaa"},{"author":{"_account_id":12974,"name":"Ben Martin","email":"blmartin@us.ibm.com","username":"blmartin"},"change_message_id":"3a4cfb64c573436df8f178c63781d2d7f19c7365","unresolved":false,"context_lines":[{"line_number":1399,"context_line":"            [mock.call("},{"line_number":1400,"context_line":"                \u0027(To avoid this prompt in the future, set OS_PASSWORD in your \u0027"},{"line_number":1401,"context_line":"                \u0027environment,\\n or use the `swift auth` command to cache your \u0027"},{"line_number":1402,"context_line":"                \u0027auth token and storage url)\\nPassword: \u0027)],"},{"line_number":1403,"context_line":"            self.mock_getpass.mock_calls)"},{"line_number":1404,"context_line":"        self.mock_getpass.reset_mock()"},{"line_number":1405,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"fa69d971_ab635fdb","line":1402,"updated":"2016-01-04 18:28:05.000000000","message":"You used this exact string earlier in test_insufficient_args_v3_tty. Would making it a field of the test class reduce headaches later if the message changes?","commit_id":"ccde5bdfd6362ff4a6680dc09b3be0b6544e4724"}]}
