)]}'
{"swiftclient/shell.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"dacb69c6895ab18915bab5340e4441fa2c0dc4b8","unresolved":false,"context_lines":[{"line_number":806,"context_line":"                                     \u0027when upload object from stdin\u0027)"},{"line_number":807,"context_line":"                return"},{"line_number":808,"context_line":"            container \u003d args[0]"},{"line_number":809,"context_line":"            stdin_file \u003d \"temp\" + str(time.time())"},{"line_number":810,"context_line":"            files \u003d [stdin_file]"},{"line_number":811,"context_line":"        else:"},{"line_number":812,"context_line":"            output_manager.error("}],"source_content_type":"text/x-python","patch_set":2,"id":"1a7b0d38_45a87220","line":809,"updated":"2015-12-28 19:30:36.000000000","message":"Isn\u0027t this the sort of thing that tempfile was made for?\n\nhttps://docs.python.org/2/library/tempfile.html","commit_id":"34ea0c31ed843d4e170eebceab31ee088e303b05"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"dacb69c6895ab18915bab5340e4441fa2c0dc4b8","unresolved":false,"context_lines":[{"line_number":845,"context_line":"    _opts[\u0027object_uu_threads\u0027] \u003d options.object_threads"},{"line_number":846,"context_line":"    if stdin_file:"},{"line_number":847,"context_line":"        with open(stdin_file, \"w\") as fd:"},{"line_number":848,"context_line":"            fd.write(sys.stdin.read())"},{"line_number":849,"context_line":"    with SwiftService(options\u003d_opts) as swift:"},{"line_number":850,"context_line":"        try:"},{"line_number":851,"context_line":"            objs \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a7b0d38_c5e542a4","line":848,"range":{"start_line":848,"start_character":21,"end_line":848,"end_character":37},"updated":"2015-12-28 19:30:36.000000000","message":"This will slurp all of stdin into memory. At the very least, we ought to do something like\n\n  with open(stdin_file, \"w\") as fd:\n      for chunk in iter(lambda: sys.stdin.read(2 ** 20), \u0027\u0027):\n          fd.write(chunk)","commit_id":"34ea0c31ed843d4e170eebceab31ee088e303b05"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"360ec5f04365c4f6d4ab91f65e9108e41839a59a","unresolved":false,"context_lines":[{"line_number":801,"context_line":"        if len(args) \u003d\u003d 1 and not stdin.isatty():"},{"line_number":802,"context_line":"            if options.object_name is None:"},{"line_number":803,"context_line":"                output_manager.error(\u0027object-name must be used \u0027"},{"line_number":804,"context_line":"                                     \u0027when upload object from stdin\u0027)"},{"line_number":805,"context_line":"                return"},{"line_number":806,"context_line":"            container \u003d args[0]"},{"line_number":807,"context_line":"            temp_fd \u003d NamedTemporaryFile(delete\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa69d971_adaae26e","line":804,"range":{"start_line":804,"start_character":38,"end_line":804,"end_character":42},"updated":"2015-12-30 19:34:07.000000000","message":"nit on language: change \"upload\" to \"uploading\".","commit_id":"c3b2c59be981f6c6b103ce7f6f638996b035af99"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"5801ed65e4409e5db3f28b6170f0fab400bf5c59","unresolved":false,"context_lines":[{"line_number":804,"context_line":"                                     \u0027when upload object from stdin\u0027)"},{"line_number":805,"context_line":"                return"},{"line_number":806,"context_line":"            container \u003d args[0]"},{"line_number":807,"context_line":"            temp_fd \u003d NamedTemporaryFile(delete\u003dTrue)"},{"line_number":808,"context_line":"            files \u003d [temp_fd.name]"},{"line_number":809,"context_line":"        else:"},{"line_number":810,"context_line":"            output_manager.error("}],"source_content_type":"text/x-python","patch_set":3,"id":"fa69d971_c36da533","line":807,"range":{"start_line":807,"start_character":22,"end_line":807,"end_character":40},"updated":"2015-12-30 21:41:23.000000000","message":"I think we want tempfile.mkstemp -- apparently on Windows, we won\u0027t be able to re-open the file:\n\n\"Whether the name can be used to open the file a second time, while the named temporary file is still open, varies across platforms (it can be so used on Unix; it cannot on Windows NT or later).\"","commit_id":"c3b2c59be981f6c6b103ce7f6f638996b035af99"}],"tests/unit/test_shell.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"5801ed65e4409e5db3f28b6170f0fab400bf5c59","unresolved":false,"context_lines":[{"line_number":480,"context_line":"                \"-H\", \"X-Storage-Policy:one\"]"},{"line_number":481,"context_line":"        with mock.patch(\u0027swiftclient.shell.stdin\u0027) as mock_stdin:"},{"line_number":482,"context_line":"            mock_stdin.isatty.return_value \u003d False"},{"line_number":483,"context_line":"            mock_stdin.read.return_value \u003d \"\""},{"line_number":484,"context_line":"            swiftclient.shell.main(argv)"},{"line_number":485,"context_line":"        connection.return_value.put_object.assert_called_with("},{"line_number":486,"context_line":"            \u0027container\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa69d971_03e89d7b","line":483,"range":{"start_line":483,"start_character":43,"end_line":483,"end_character":45},"updated":"2015-12-30 21:41:23.000000000","message":"Let\u0027s include some junk data, and have an assertion that the third arg to put_object lets us retrieve that data.","commit_id":"c3b2c59be981f6c6b103ce7f6f638996b035af99"},{"author":{"_account_id":11373,"name":"Bing Hu","email":"hubingsh@cn.ibm.com","username":"hubingsh"},"change_message_id":"189b6f59c861e537a562664d497fec5d4dadfaaa","unresolved":false,"context_lines":[{"line_number":480,"context_line":"                \"-H\", \"X-Storage-Policy:one\"]"},{"line_number":481,"context_line":"        with mock.patch(\u0027swiftclient.shell.stdin\u0027) as mock_stdin:"},{"line_number":482,"context_line":"            mock_stdin.isatty.return_value \u003d False"},{"line_number":483,"context_line":"            mock_stdin.read.return_value \u003d \"\""},{"line_number":484,"context_line":"            swiftclient.shell.main(argv)"},{"line_number":485,"context_line":"        connection.return_value.put_object.assert_called_with("},{"line_number":486,"context_line":"            \u0027container\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa69d971_d468faf7","line":483,"range":{"start_line":483,"start_character":43,"end_line":483,"end_character":45},"in_reply_to":"fa69d971_03e89d7b","updated":"2015-12-31 06:19:35.000000000","message":"In this cause, the third arg\u0027s type is not str, it\u0027s an object(\u003cswiftclient.utils.LengthWrapper object at 0x7f04f3d4db10\u003e). Maybe that why this arg is left mock.ANY in many other test cases. Instead, I asserted the content_length","commit_id":"c3b2c59be981f6c6b103ce7f6f638996b035af99"}]}
