)]}'
{"swift/common/storage_policy.py":[{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"81deeab011f96cfcd4ed3437228bc69bf9ec0b02","unresolved":false,"context_lines":[{"line_number":933,"context_line":"    \"\"\""},{"line_number":934,"context_line":"    global _POLICIES"},{"line_number":935,"context_line":"    try:"},{"line_number":936,"context_line":"        policy_conf \u003d ConfigParser(strict\u003dFalse)"},{"line_number":937,"context_line":"    except TypeError as e:"},{"line_number":938,"context_line":"        if \u0027unexpected keyword argument\u0027 not in e.args[0]:"},{"line_number":939,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa0c359_522fabf5","line":936,"updated":"2018-02-16 16:01:43.000000000","message":"just out of curiosity...why do you expect this TypeError exception when instantiating ConfigParser? I tried running py35 unit tests without this change and no tests failed.","commit_id":"ec93abeb25de33dbc6a85f03f5789ecb8b909767"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"69d254bfccd77e24a0908b1bff1eb3d5d733dd2e","unresolved":false,"context_lines":[{"line_number":933,"context_line":"    \"\"\""},{"line_number":934,"context_line":"    global _POLICIES"},{"line_number":935,"context_line":"    try:"},{"line_number":936,"context_line":"        policy_conf \u003d ConfigParser(strict\u003dFalse)"},{"line_number":937,"context_line":"    except TypeError as e:"},{"line_number":938,"context_line":"        if \u0027unexpected keyword argument\u0027 not in e.args[0]:"},{"line_number":939,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa0c359_a3d903f5","line":936,"in_reply_to":"3fa0c359_522fabf5","updated":"2018-02-16 18:06:45.000000000","message":"The TypeError handling is for py2:\n\n Python 2.7.10 (default, Jul 15 2017, 17:16:57)\n [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] on darwin\n Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n \u003e\u003e\u003e import ConfigParser\n \u003e\u003e\u003e ConfigParser.ConfigParser(strict\u003dFalse)\n Traceback (most recent call last):\n   File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n TypeError: __init__() got an unexpected keyword argument \u0027strict\u0027\n\nFrom https://docs.python.org/3/library/configparser.html#customizing-parser-behaviour the arg was added in py32, with a backwards-incompatible default value :-/\n\nWith strict\u003dTrue, previously-valid configs with duplicate sections and/or options will cause py3 to barf -- if you back out the similar change in the unit tests, you can see what that looks like.\n\nMakes me wonder if we should be doing this in more places... or maybe have our own ConfigParser in utils to centralize it.","commit_id":"ec93abeb25de33dbc6a85f03f5789ecb8b909767"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"96fdc42e6b68ea96b0b5f95f4ff427aa29661ab3","unresolved":false,"context_lines":[{"line_number":932,"context_line":"    Reload POLICIES from ``swift.conf``."},{"line_number":933,"context_line":"    \"\"\""},{"line_number":934,"context_line":"    global _POLICIES"},{"line_number":935,"context_line":"    try:"},{"line_number":936,"context_line":"        policy_conf \u003d ConfigParser(strict\u003dFalse)"},{"line_number":937,"context_line":"    except TypeError as e:"},{"line_number":938,"context_line":"        if \u0027unexpected keyword argument\u0027 not in e.args[0]:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa0c359_3ab5637e","line":935,"updated":"2018-02-26 10:40:34.000000000","message":"Is this really better than if sys.PY2? We already have such if statements. At least then question like Thiago\u0027s does not arise (sys.PY2 serves as a sign of intent).\n\nI would even add \"# With strict\u003dTrue, previously-valid configs with duplicate sections and/or options will cause py3 to barf\"","commit_id":"fa6888f2c28d7e7539fe8199ea1e21b43ff674ea"}]}
