)]}'
{"swiftclient/service.py":[{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"78844cb84cc1922dd45effd3e4ec2aeb7b59be38","unresolved":false,"context_lines":[{"line_number":1552,"context_line":""},{"line_number":1553,"context_line":"    def _upload_object_job(self, conn, container, source, obj, options,"},{"line_number":1554,"context_line":"                           results_queue\u003dNone):"},{"line_number":1555,"context_line":"        if obj.startswith(\u0027./\u0027) or obj.startswith(\u0027.\\\\\u0027):"},{"line_number":1556,"context_line":"            obj \u003d obj[2:]"},{"line_number":1557,"context_line":"        if obj.startswith(\u0027/\u0027):"},{"line_number":1558,"context_line":"            obj \u003d obj[1:]"}],"source_content_type":"text/x-python","patch_set":4,"id":"5afe65bd_10d889ee","line":1555,"updated":"2015-06-03 17:43:19.000000000","message":"dot backslash? where would that come from?","commit_id":"b5fc02bee29f16abeb613fbd0ed93750ab7ee0c8"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"cf1d4798b897c73b39f0df9b31824552465ee2b6","unresolved":false,"context_lines":[{"line_number":1552,"context_line":""},{"line_number":1553,"context_line":"    def _upload_object_job(self, conn, container, source, obj, options,"},{"line_number":1554,"context_line":"                           results_queue\u003dNone):"},{"line_number":1555,"context_line":"        if obj.startswith(\u0027./\u0027) or obj.startswith(\u0027.\\\\\u0027):"},{"line_number":1556,"context_line":"            obj \u003d obj[2:]"},{"line_number":1557,"context_line":"        if obj.startswith(\u0027/\u0027):"},{"line_number":1558,"context_line":"            obj \u003d obj[1:]"}],"source_content_type":"text/x-python","patch_set":4,"id":"5afe65bd_dbae7be5","line":1555,"in_reply_to":"5afe65bd_10d889ee","updated":"2015-06-04 08:24:14.000000000","message":"I think that happens on Windows, or not? \n\nJust checked, it\u0027s in swiftclient since the first commit.","commit_id":"b5fc02bee29f16abeb613fbd0ed93750ab7ee0c8"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"fbf5a2fe317574f3f62a0bceb7841c5f9b72be81","unresolved":false,"context_lines":[{"line_number":1552,"context_line":""},{"line_number":1553,"context_line":"    def _upload_object_job(self, conn, container, source, obj, options,"},{"line_number":1554,"context_line":"                           results_queue\u003dNone):"},{"line_number":1555,"context_line":"        if obj.startswith(\u0027./\u0027) or obj.startswith(\u0027.\\\\\u0027):"},{"line_number":1556,"context_line":"            obj \u003d obj[2:]"},{"line_number":1557,"context_line":"        if obj.startswith(\u0027/\u0027):"},{"line_number":1558,"context_line":"            obj \u003d obj[1:]"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa32b979_b7476c76","line":1555,"updated":"2015-06-16 06:18:31.000000000","message":"nit: startswith method accepts tuple argument as well, so it could be simplified by using\n\nif obj.startswith((\u0027./\u0027, \u0027.\\\\\u0027)):","commit_id":"a9e2555ad66fa4db18e064842d5879f1816278cc"}],"tests/unit/test_service.py":[{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"be73aa725d1c8e3f5c3170e1c572dd1573a0924a","unresolved":false,"context_lines":[{"line_number":553,"context_line":"                                 exc.value)"},{"line_number":554,"context_line":""},{"line_number":555,"context_line":"    def test_uplaod_with_realative_path(self):"},{"line_number":556,"context_line":""},{"line_number":557,"context_line":"        @contextlib.contextmanager"},{"line_number":558,"context_line":"        def in_temp_dir():"},{"line_number":559,"context_line":"            cwd \u003d os.getcwd()"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a016987_b2def2d7","line":556,"updated":"2015-06-01 09:05:15.000000000","message":"there are two typos in the method name:\n\n uplaod -\u003e upload\n realative -\u003e relative","commit_id":"aae9e53c65475fbcc23b14589233f8726a93ff90"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"91a01e5d46428204726594e1254fd28d540c6d6d","unresolved":false,"context_lines":[{"line_number":585,"context_line":"                            \u0027strt_indx\u0027: 2}]"},{"line_number":586,"context_line":"                for obj in objects:"},{"line_number":587,"context_line":"                    resp_iter \u003d service.upload("},{"line_number":588,"context_line":"                        \u0027c\u0027, [SwiftUploadObject(obj[\u0027path\u0027], obj[\u0027name\u0027])])"},{"line_number":589,"context_line":"                    responses \u003d [x for x in resp_iter]"},{"line_number":590,"context_line":"                    for resp in responses:"},{"line_number":591,"context_line":"                        self.assertTrue(resp[\u0027success\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_312d7995","line":588,"updated":"2015-06-10 05:45:11.000000000","message":"So I\u0027m now wondering why we need to set object_name argument , here. What we want to assert seems if *service.upload* translates the path to the correct object name and show it.","commit_id":"2cce2e1eb9d7a545cd085fbf04fa5df23ef220a7"},{"author":{"_account_id":16277,"name":"Pradeep Kumar Singh","email":"ps4openstack@gmail.com","username":"pradeep_singh"},"change_message_id":"e9116a3ff616b3db21b1403d6fc35b07bfebddbe","unresolved":false,"context_lines":[{"line_number":585,"context_line":"                            \u0027strt_indx\u0027: 2}]"},{"line_number":586,"context_line":"                for obj in objects:"},{"line_number":587,"context_line":"                    resp_iter \u003d service.upload("},{"line_number":588,"context_line":"                        \u0027c\u0027, [SwiftUploadObject(obj[\u0027path\u0027], obj[\u0027name\u0027])])"},{"line_number":589,"context_line":"                    responses \u003d [x for x in resp_iter]"},{"line_number":590,"context_line":"                    for resp in responses:"},{"line_number":591,"context_line":"                        self.assertTrue(resp[\u0027success\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_9118ad1f","line":588,"in_reply_to":"3afb71cf_312d7995","updated":"2015-06-10 05:54:25.000000000","message":"If i don\u0027t go this way i was unable to test for \".\\\" path.\nThat\u0027s why i changed the path and object name.\nIf i don\u0027t pass name then path and name will be same as path.","commit_id":"2cce2e1eb9d7a545cd085fbf04fa5df23ef220a7"},{"author":{"_account_id":16277,"name":"Pradeep Kumar Singh","email":"ps4openstack@gmail.com","username":"pradeep_singh"},"change_message_id":"3be2bade05c7a797fe3984e964956ed2971a670f","unresolved":false,"context_lines":[{"line_number":585,"context_line":"                            \u0027strt_indx\u0027: 2}]"},{"line_number":586,"context_line":"                for obj in objects:"},{"line_number":587,"context_line":"                    resp_iter \u003d service.upload("},{"line_number":588,"context_line":"                        \u0027c\u0027, [SwiftUploadObject(obj[\u0027path\u0027], obj[\u0027name\u0027])])"},{"line_number":589,"context_line":"                    responses \u003d [x for x in resp_iter]"},{"line_number":590,"context_line":"                    for resp in responses:"},{"line_number":591,"context_line":"                        self.assertTrue(resp[\u0027success\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_b898f378","line":588,"in_reply_to":"3afb71cf_558d48d1","updated":"2015-06-11 08:05:45.000000000","message":"Thanks for the review :)\nIf i do it like you as in paste[1], then i think i  would not be able to test the path \n\".\\test\".  Am i right?\nBecause i think path for first and third object in dictionary is \"./test\".\nAnd will they not be same test, if i don\u0027t pass name as second parameter?\nPlease suggest.\n\n1: http://paste.openstack.org/show/283372/","commit_id":"2cce2e1eb9d7a545cd085fbf04fa5df23ef220a7"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"6747e2f649b9393cd1628cf6a2440859081e3725","unresolved":false,"context_lines":[{"line_number":585,"context_line":"                            \u0027strt_indx\u0027: 2}]"},{"line_number":586,"context_line":"                for obj in objects:"},{"line_number":587,"context_line":"                    resp_iter \u003d service.upload("},{"line_number":588,"context_line":"                        \u0027c\u0027, [SwiftUploadObject(obj[\u0027path\u0027], obj[\u0027name\u0027])])"},{"line_number":589,"context_line":"                    responses \u003d [x for x in resp_iter]"},{"line_number":590,"context_line":"                    for resp in responses:"},{"line_number":591,"context_line":"                        self.assertTrue(resp[\u0027success\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_558d48d1","line":588,"in_reply_to":"3afb71cf_9118ad1f","updated":"2015-06-11 07:46:08.000000000","message":"Once I changed this like as the paste[1], that worked well (fail at previous and success at this) so that I wonder if you could add more assertion as a sanity you wanna catch in this test. Sorry, I might miss something.\n\n1: http://paste.openstack.org/show/283372/","commit_id":"2cce2e1eb9d7a545cd085fbf04fa5df23ef220a7"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"37b0afa1b9eff1fd7d87b5a333c26a2dc5c64d4e","unresolved":false,"context_lines":[{"line_number":585,"context_line":"                            \u0027strt_indx\u0027: 2}]"},{"line_number":586,"context_line":"                for obj in objects:"},{"line_number":587,"context_line":"                    resp_iter \u003d service.upload("},{"line_number":588,"context_line":"                        \u0027c\u0027, [SwiftUploadObject(obj[\u0027path\u0027], obj[\u0027name\u0027])])"},{"line_number":589,"context_line":"                    responses \u003d [x for x in resp_iter]"},{"line_number":590,"context_line":"                    for resp in responses:"},{"line_number":591,"context_line":"                        self.assertTrue(resp[\u0027success\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_3999a279","line":588,"in_reply_to":"3afb71cf_b898f378","updated":"2015-06-11 10:41:53.000000000","message":"Yeah, I finally got why you want to use object_name argument. The reason is that this test will fail when we set the path to be \".\\\\test\" on *Linux*, right? However, imho, it seems still hard to understand because the use case of this fix would be like as \"swift upload container .\\\\object\" (i.e. absolutely the path is set as \".\\\\object\".\n\nSo I wrote up another example for this[1]. Though that requires more hooks for file related functions instead of using actual file object, I guess it would be easy to understand.\n\n1: http://paste.openstack.org/show/283641/","commit_id":"2cce2e1eb9d7a545cd085fbf04fa5df23ef220a7"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"571dcfec8fb3b06ac433998ec2ae0b3a379c591b","unresolved":false,"context_lines":[{"line_number":581,"context_line":"                self.assertEqual(2, len(responses))"},{"line_number":582,"context_line":"                create_container_resp, upload_obj_resp \u003d responses"},{"line_number":583,"context_line":"                self.assertEqual(create_container_resp[\u0027action\u0027],"},{"line_number":584,"context_line":"                                 \u0027create_container\u0027)"},{"line_number":585,"context_line":"                self.assertEqual(upload_obj_resp[\u0027action\u0027],"},{"line_number":586,"context_line":"                                 \u0027upload_object\u0027)"},{"line_number":587,"context_line":"                self.assertEqual(upload_obj_resp[\u0027object\u0027],"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_0e6ade80","line":584,"updated":"2015-06-30 06:49:32.000000000","message":"(Nits) self.assertEqual(coreate_container_resp[\u0027container\u0027], \u0027c\u0027)","commit_id":"794b125e76e8ab4798d777ec85c559fb0aa1e5d1"}]}
