)]}'
{"swiftclient/service.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0382b70b54f82c1584ab75e1a703b944b17a3722","unresolved":false,"context_lines":[{"line_number":25,"context_line":"from os.path import ("},{"line_number":26,"context_line":"    basename, dirname, getmtime, getsize, isdir, join, sep as os_path_sep"},{"line_number":27,"context_line":")"},{"line_number":28,"context_line":"from posixpath import join as urljoin"},{"line_number":29,"context_line":"from random import shuffle"},{"line_number":30,"context_line":"from time import time"},{"line_number":31,"context_line":"from threading import Thread"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a68dd71_aed456eb","line":28,"updated":"2016-01-25 20:09:49.000000000","message":"nice!  I\u0027ve seen folks use os.join to stitch together urls before and always fussed about - using posixpath directly will always work and I approve! [1]\n\n1. urljoin(part, of, the, path) is more readable IMHO than \u0027/\u0027.join((part, of, the path))","commit_id":"efd64a804384230c01b47d4689610838b16c7eea"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0382b70b54f82c1584ab75e1a703b944b17a3722","unresolved":false,"context_lines":[{"line_number":1355,"context_line":"                    _objects.append(SwiftUploadObject(o, object_name))"},{"line_number":1356,"context_line":"                elif isinstance(o, SwiftUploadObject):"},{"line_number":1357,"context_line":"                    _objects.object_name \u003d object_name"},{"line_number":1358,"context_line":"                    _objects.append(o)"},{"line_number":1359,"context_line":"            objects \u003d _objects"},{"line_number":1360,"context_line":""},{"line_number":1361,"context_line":"        # Try to create the container, just in case it doesn\u0027t exist. If this"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a68dd71_ee81eec3","line":1358,"updated":"2016-01-25 20:09:49.000000000","message":"it seems like there\u0027s an implicit else condition where o is not re-appended to the _object temporary container - why would we ever want to ignore an object that\u0027s passed in?","commit_id":"efd64a804384230c01b47d4689610838b16c7eea"},{"author":{"_account_id":10786,"name":"James Nzomo","email":"james@tdt.rocks","username":"moje"},"change_message_id":"48a3ce00a3ceffd50b4af6336c1bb8256dbe6dca","unresolved":false,"context_lines":[{"line_number":1355,"context_line":"                    _objects.append(SwiftUploadObject(o, object_name))"},{"line_number":1356,"context_line":"                elif isinstance(o, SwiftUploadObject):"},{"line_number":1357,"context_line":"                    _objects.object_name \u003d object_name"},{"line_number":1358,"context_line":"                    _objects.append(o)"},{"line_number":1359,"context_line":"            objects \u003d _objects"},{"line_number":1360,"context_line":""},{"line_number":1361,"context_line":"        # Try to create the container, just in case it doesn\u0027t exist. If this"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a68dd71_76994bc3","line":1358,"in_reply_to":"9a68dd71_ee81eec3","updated":"2016-01-27 19:25:05.000000000","message":"First...apologies for L1357, a brain malfunction on my part. I vill fix zis.\nTwo:- From the docstrings (at L1290), `objects` param should be a mixed list of strings and or SwiftUpload objects. Anything else should result in exception or be ignored maybe?","commit_id":"efd64a804384230c01b47d4689610838b16c7eea"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0382b70b54f82c1584ab75e1a703b944b17a3722","unresolved":false,"context_lines":[{"line_number":1356,"context_line":"                elif isinstance(o, SwiftUploadObject):"},{"line_number":1357,"context_line":"                    _objects.object_name \u003d object_name"},{"line_number":1358,"context_line":"                    _objects.append(o)"},{"line_number":1359,"context_line":"            objects \u003d _objects"},{"line_number":1360,"context_line":""},{"line_number":1361,"context_line":"        # Try to create the container, just in case it doesn\u0027t exist. If this"},{"line_number":1362,"context_line":"        # fails, it might just be because the user doesn\u0027t have container PUT"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a68dd71_6e765e07","line":1359,"updated":"2016-01-25 20:09:49.000000000","message":"I\u0027m not really keen on this copy, I *think* the _objects container won\u0027t get gc\u0027d until this function returns.\n\nIt looks like we normally do the normalization of the objects list to SwiftUploadObjects in _make_upload_objects - can \"path\" just become an optional \"prefix\" that we pass in there and use to somehow sanely update the created SwiftUploadObject when constructing the final object name (might be better if that attribute became a property)?\n\nIt seems like a useful ability to say\n\n    service.upload(\u0027container\u0027, [\n        SwiftUploadObject(\u0027/path/on/disk\u0027, object_name\u003d\u0027foo\u0027,\n                          pseudo_folder\u003d\u0027nested/like/a/boss/\u0027)\n    ])\n\nin order to create the object `/a/container/nested/like/a/boss/foo` from the content at `/path/on/disk`\n\nMight violate \"one obvious way to do it\" - since you could also presumably mean the same thing if you say it like:\n\n    service.upload(\u0027container/nested/like/a/boss\u0027, [\n        SwiftUploadObject(\u0027/path/on/disk\u0027, object_name\u003d\u0027foo\u0027)\n    ])\n\nAnd it\u0027s probably not *entirely* clear what\u0027s meant if you combine?\n\n    service.upload(\u0027container/nested/like/a/boss\u0027, [\n        SwiftUploadObject(\u0027/path/on/disk\u0027, object_name\u003d\u0027stuff/like/mad/foo\u0027,\n                          psuedo_folder\u003d\"gone/crazy/nesting\u0027)\n    ])\n\npresumably that would mean you wanted to create `/a/container/nested/like/a/boss/gone/crazy/nesting/stuff/like/mad/foo`\n\nI\u0027m probably sick in the head, but I kinda like it! [1]\n\n1. if you can make it all work!","commit_id":"efd64a804384230c01b47d4689610838b16c7eea"},{"author":{"_account_id":10786,"name":"James Nzomo","email":"james@tdt.rocks","username":"moje"},"change_message_id":"48a3ce00a3ceffd50b4af6336c1bb8256dbe6dca","unresolved":false,"context_lines":[{"line_number":1356,"context_line":"                elif isinstance(o, SwiftUploadObject):"},{"line_number":1357,"context_line":"                    _objects.object_name \u003d object_name"},{"line_number":1358,"context_line":"                    _objects.append(o)"},{"line_number":1359,"context_line":"            objects \u003d _objects"},{"line_number":1360,"context_line":""},{"line_number":1361,"context_line":"        # Try to create the container, just in case it doesn\u0027t exist. If this"},{"line_number":1362,"context_line":"        # fails, it might just be because the user doesn\u0027t have container PUT"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a68dd71_a5a307ff","line":1359,"in_reply_to":"9a68dd71_6e765e07","updated":"2016-01-27 19:25:05.000000000","message":"Your right. this should be done in _make_upload_objects().","commit_id":"efd64a804384230c01b47d4689610838b16c7eea"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"930f85cab08eb4806ea3392fb46ad1de6b3f16dd","unresolved":false,"context_lines":[{"line_number":1,"context_line":""},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"# you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":2,"id":"7a5de9d1_b0c71197","line":1,"updated":"2016-02-01 17:35:31.000000000","message":"Was that ... intentional? I don\u0027t think it should be necessary.","commit_id":"d417e7630b384ef01e0e82c0153ccf6138bc5a8b"},{"author":{"_account_id":10786,"name":"James Nzomo","email":"james@tdt.rocks","username":"moje"},"change_message_id":"8b4d034795b88a7e23d1eb9364af105aef3c977e","unresolved":false,"context_lines":[{"line_number":1,"context_line":""},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"# you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":2,"id":"7a5de9d1_c542d8ad","line":1,"in_reply_to":"7a5de9d1_b0c71197","updated":"2016-02-02 02:25:13.000000000","message":"This was definitely not intentional. My bad","commit_id":"d417e7630b384ef01e0e82c0153ccf6138bc5a8b"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"930f85cab08eb4806ea3392fb46ad1de6b3f16dd","unresolved":false,"context_lines":[{"line_number":25,"context_line":"from os.path import ("},{"line_number":26,"context_line":"    basename, dirname, getmtime, getsize, isdir, join, sep as os_path_sep"},{"line_number":27,"context_line":")"},{"line_number":28,"context_line":"from posixpath import join as urljoin"},{"line_number":29,"context_line":"from random import shuffle"},{"line_number":30,"context_line":"from time import time"},{"line_number":31,"context_line":"from threading import Thread"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a5de9d1_70a519a0","line":28,"range":{"start_line":28,"start_character":5,"end_line":28,"end_character":14},"updated":"2016-02-01 17:35:31.000000000","message":"TIL you can get UNIX-style path operations on Windows. Neat!","commit_id":"d417e7630b384ef01e0e82c0153ccf6138bc5a8b"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"930f85cab08eb4806ea3392fb46ad1de6b3f16dd","unresolved":false,"context_lines":[{"line_number":1346,"context_line":"        # Incase we have a psudeo-folder path for \u003ccontainer\u003e arg, derive"},{"line_number":1347,"context_line":"        # the container name from the top path and prepend the rest to"},{"line_number":1348,"context_line":"        # the object name. (same as passing --object-name)."},{"line_number":1349,"context_line":"        container, pseudo_folder \u003d (container.split(\u0027/\u0027, 1) + [\u0027\u0027])[:2]"},{"line_number":1350,"context_line":""},{"line_number":1351,"context_line":"        # Try to create the container, just in case it doesn\u0027t exist. If this"},{"line_number":1352,"context_line":"        # fails, it might just be because the user doesn\u0027t have container PUT"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a5de9d1_704d193d","line":1349,"updated":"2016-02-01 17:35:31.000000000","message":"Maybe simpler?\n\n  container, _sep, pseudo_folder \u003d container.partition(\u0027/\u0027)","commit_id":"d417e7630b384ef01e0e82c0153ccf6138bc5a8b"},{"author":{"_account_id":10786,"name":"James Nzomo","email":"james@tdt.rocks","username":"moje"},"change_message_id":"8b4d034795b88a7e23d1eb9364af105aef3c977e","unresolved":false,"context_lines":[{"line_number":1346,"context_line":"        # Incase we have a psudeo-folder path for \u003ccontainer\u003e arg, derive"},{"line_number":1347,"context_line":"        # the container name from the top path and prepend the rest to"},{"line_number":1348,"context_line":"        # the object name. (same as passing --object-name)."},{"line_number":1349,"context_line":"        container, pseudo_folder \u003d (container.split(\u0027/\u0027, 1) + [\u0027\u0027])[:2]"},{"line_number":1350,"context_line":""},{"line_number":1351,"context_line":"        # Try to create the container, just in case it doesn\u0027t exist. If this"},{"line_number":1352,"context_line":"        # fails, it might just be because the user doesn\u0027t have container PUT"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a5de9d1_93eadcd9","line":1349,"in_reply_to":"7a5de9d1_704d193d","updated":"2016-02-02 02:25:13.000000000","message":"If F841 with unused `_sep` is no problem, I agree it looks simpler and more elegant.","commit_id":"d417e7630b384ef01e0e82c0153ccf6138bc5a8b"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"930f85cab08eb4806ea3392fb46ad1de6b3f16dd","unresolved":false,"context_lines":[{"line_number":1499,"context_line":""},{"line_number":1500,"context_line":"        for o in objects:"},{"line_number":1501,"context_line":"            if isinstance(o, string_types):"},{"line_number":1502,"context_line":"                obj \u003d SwiftUploadObject(o, urljoin(pseudo_folder, o))"},{"line_number":1503,"context_line":"                upload_objects.append(obj)"},{"line_number":1504,"context_line":"            elif isinstance(o, SwiftUploadObject):"},{"line_number":1505,"context_line":"                o.object_name \u003d urljoin(pseudo_folder, o.object_name)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a5de9d1_887f49aa","line":1502,"updated":"2016-02-01 17:35:31.000000000","message":"So if I do\n\n  swift upload container/pseudo_folder /usr/share/dict/words\n\n...as a user I would expect it to upload to pseudo_folder/usr/share/dict/words. But it looks like this will ignore the pseudo_folder and just upload to usr/share/dict/words. (The leading / gets trimmed later in _upload_object_job.)","commit_id":"d417e7630b384ef01e0e82c0153ccf6138bc5a8b"},{"author":{"_account_id":10786,"name":"James Nzomo","email":"james@tdt.rocks","username":"moje"},"change_message_id":"8b4d034795b88a7e23d1eb9364af105aef3c977e","unresolved":false,"context_lines":[{"line_number":1499,"context_line":""},{"line_number":1500,"context_line":"        for o in objects:"},{"line_number":1501,"context_line":"            if isinstance(o, string_types):"},{"line_number":1502,"context_line":"                obj \u003d SwiftUploadObject(o, urljoin(pseudo_folder, o))"},{"line_number":1503,"context_line":"                upload_objects.append(obj)"},{"line_number":1504,"context_line":"            elif isinstance(o, SwiftUploadObject):"},{"line_number":1505,"context_line":"                o.object_name \u003d urljoin(pseudo_folder, o.object_name)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a5de9d1_539224f7","line":1502,"in_reply_to":"7a5de9d1_56a460b8","updated":"2016-02-02 02:25:13.000000000","message":"Thanks for spotting that pitfall.","commit_id":"d417e7630b384ef01e0e82c0153ccf6138bc5a8b"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"07fa92064b996bd25a108c32765e4a2e6dba3313","unresolved":false,"context_lines":[{"line_number":1499,"context_line":""},{"line_number":1500,"context_line":"        for o in objects:"},{"line_number":1501,"context_line":"            if isinstance(o, string_types):"},{"line_number":1502,"context_line":"                obj \u003d SwiftUploadObject(o, urljoin(pseudo_folder, o))"},{"line_number":1503,"context_line":"                upload_objects.append(obj)"},{"line_number":1504,"context_line":"            elif isinstance(o, SwiftUploadObject):"},{"line_number":1505,"context_line":"                o.object_name \u003d urljoin(pseudo_folder, o.object_name)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a5de9d1_56a460b8","line":1502,"in_reply_to":"7a5de9d1_887f49aa","updated":"2016-02-01 18:56:55.000000000","message":"@tim - good catch - i was so excited about urljoin I didn\u0027t really think other weird behaviors of path join.\n\nI don\u0027t think ignoring the container/pseudo_folder is defensible at all - we should probably lstrip(\u0027/\u0027) *earlier* when building object name that\u0027s built from a file-system path","commit_id":"d417e7630b384ef01e0e82c0153ccf6138bc5a8b"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c4cdcc1d80ecf6dc19953b931071d37f5564a1a9","unresolved":false,"context_lines":[{"line_number":1503,"context_line":"                                                   o.lstrip(\u0027/\u0027)))"},{"line_number":1504,"context_line":"                upload_objects.append(obj)"},{"line_number":1505,"context_line":"            elif isinstance(o, SwiftUploadObject):"},{"line_number":1506,"context_line":"                o.object_name \u003d urljoin(pseudo_folder, o.object_name)"},{"line_number":1507,"context_line":"                upload_objects.append(o)"},{"line_number":1508,"context_line":"            else:"},{"line_number":1509,"context_line":"                raise SwiftError("}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_06042615","line":1506,"range":{"start_line":1506,"start_character":55,"end_line":1506,"end_character":68},"updated":"2016-02-03 20:29:17.000000000","message":"Should we .lstrip(\u0027/\u0027) here as well? Or maybe in SwiftUploadObject.__init__?","commit_id":"0eba2990d1b9d8f648aa961e2c3247920245343d"},{"author":{"_account_id":10786,"name":"James Nzomo","email":"james@tdt.rocks","username":"moje"},"change_message_id":"7a91c1c7bfe49de4aee236f2725db41eaa0a5b12","unresolved":false,"context_lines":[{"line_number":1503,"context_line":"                                                   o.lstrip(\u0027/\u0027)))"},{"line_number":1504,"context_line":"                upload_objects.append(obj)"},{"line_number":1505,"context_line":"            elif isinstance(o, SwiftUploadObject):"},{"line_number":1506,"context_line":"                o.object_name \u003d urljoin(pseudo_folder, o.object_name)"},{"line_number":1507,"context_line":"                upload_objects.append(o)"},{"line_number":1508,"context_line":"            else:"},{"line_number":1509,"context_line":"                raise SwiftError("}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_b678d62c","line":1506,"range":{"start_line":1506,"start_character":55,"end_line":1506,"end_character":68},"in_reply_to":"5a5ae5dd_06042615","updated":"2016-02-04 02:03:46.000000000","message":"better in SwiftUploadObject.__init__","commit_id":"0eba2990d1b9d8f648aa961e2c3247920245343d"},{"author":{"_account_id":10786,"name":"James Nzomo","email":"james@tdt.rocks","username":"moje"},"change_message_id":"7a91c1c7bfe49de4aee236f2725db41eaa0a5b12","unresolved":false,"context_lines":[{"line_number":1503,"context_line":"                                                   o.lstrip(\u0027/\u0027)))"},{"line_number":1504,"context_line":"                upload_objects.append(obj)"},{"line_number":1505,"context_line":"            elif isinstance(o, SwiftUploadObject):"},{"line_number":1506,"context_line":"                o.object_name \u003d urljoin(pseudo_folder, o.object_name)"},{"line_number":1507,"context_line":"                upload_objects.append(o)"},{"line_number":1508,"context_line":"            else:"},{"line_number":1509,"context_line":"                raise SwiftError("}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_76725e4b","line":1506,"range":{"start_line":1506,"start_character":55,"end_line":1506,"end_character":68},"in_reply_to":"5a5ae5dd_06042615","updated":"2016-02-04 02:03:46.000000000","message":"hmm, off the top of my head, better \nMore so i\u0027m tempted","commit_id":"0eba2990d1b9d8f648aa961e2c3247920245343d"}],"tests/unit/test_shell.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0382b70b54f82c1584ab75e1a703b944b17a3722","unresolved":false,"context_lines":[{"line_number":556,"context_line":"                \u0027x-static-large-object\u0027: \u0027true\u0027"},{"line_number":557,"context_line":"            },"},{"line_number":558,"context_line":"            query_string\u003d\u0027multipart-manifest\u003dput\u0027,"},{"line_number":559,"context_line":"            response_dict\u003d{})"},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"    @mock.patch(\u0027swiftclient.service.SwiftService.upload\u0027)"},{"line_number":562,"context_line":"    def test_upload_object_with_account_readonly(self, upload):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a68dd71_c9cc248b","line":559,"updated":"2016-01-25 20:09:49.000000000","message":"+2!","commit_id":"efd64a804384230c01b47d4689610838b16c7eea"}]}
