)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"23f99dff31201c5bbd8dac01028fd36fe5e6668a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"574556f3_df2c5c3b","updated":"2021-11-11 11:06:34.000000000","message":"Would it be a stretch to add a small unit test for this? It\u0027s going to be somewhat synthetic but  to it would at least prevent anyone regressing.","commit_id":"c55a12d00993d9e0e1bbc5d1122bac06f7651cad"},{"author":{"_account_id":33910,"name":"Tyler Stachecki","display_name":"Tyler Stachecki","email":"tstachecki@bloomberg.net","username":"tjstachecki"},"change_message_id":"b14b79516b490cfd8be6e58f50f68bdbccc4fa52","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"ebbebdd7_9ef33633","in_reply_to":"574556f3_df2c5c3b","updated":"2021-11-11 17:06:17.000000000","message":"Uploaded a test case.  Let me know if it would be preferable to instead mock watch._watch as it would make the unit test case simpler.","commit_id":"c55a12d00993d9e0e1bbc5d1122bac06f7651cad"},{"author":{"_account_id":33910,"name":"Tyler Stachecki","display_name":"Tyler Stachecki","email":"tstachecki@bloomberg.net","username":"tjstachecki"},"change_message_id":"b14b79516b490cfd8be6e58f50f68bdbccc4fa52","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"07120a00_77b77423","updated":"2021-11-11 17:06:17.000000000","message":"Pushed a test case.","commit_id":"1583b10020e8da829f61cc914f667c58a1fa26b6"},{"author":{"_account_id":30491,"name":"Radosław Piliszek","display_name":"Radek","email":"radek@piliszek.it","username":"yoctozepto","status":"self-employed techologist, collaborating mostly with 7bulls.com"},"change_message_id":"0b0b1eed6ccc9d7079626afcc3d11309a1135659","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":5,"id":"ec18f4bd_f75ff70b","updated":"2021-11-18 17:40:49.000000000","message":"@ Oslo team - do we expect release notes?","commit_id":"ed899b34e464862525f76fff2377a2cceeb65af7"},{"author":{"_account_id":33910,"name":"Tyler Stachecki","display_name":"Tyler Stachecki","email":"tstachecki@bloomberg.net","username":"tjstachecki"},"change_message_id":"d2b5ae26a2fdcbaeb122b3503c70a5c4af74b503","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"91f2722f_09ab79e8","updated":"2021-11-11 17:26:54.000000000","message":"recheck","commit_id":"ed899b34e464862525f76fff2377a2cceeb65af7"}],"etcd3gw/watch.py":[{"author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"change_message_id":"7e159558615c8c61462242cfd126bb487c3378e3","unresolved":true,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"def _watch(resp, callback):"},{"line_number":22,"context_line":"    for line in resp.iter_content(chunk_size\u003dNone, decode_unicode\u003dFalse):"},{"line_number":23,"context_line":"        decoded_line \u003d line.decode(\u0027utf-8\u0027)"},{"line_number":24,"context_line":"        payload \u003d json.loads(decoded_line)"},{"line_number":25,"context_line":"        if \u0027created\u0027 in payload[\u0027result\u0027]:"}],"source_content_type":"text/x-python","patch_set":5,"id":"caf7174b_c5f058bc","line":22,"range":{"start_line":22,"start_character":51,"end_line":22,"end_character":71},"updated":"2021-11-12 19:26:34.000000000","message":"Python 2 is no longer supported, what do you think about switching everything to python 3?\nI mean I\u0027m not sure to see if this parameter is still required if python 2 isn\u0027t supported.\n\nIf this parameter is no longer needed too, then I think the test above can be removed too.","commit_id":"ed899b34e464862525f76fff2377a2cceeb65af7"},{"author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"change_message_id":"b885485cdf6b64594e5327f5242f1a94f768ed05","unresolved":true,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"def _watch(resp, callback):"},{"line_number":22,"context_line":"    for line in resp.iter_content(chunk_size\u003dNone, decode_unicode\u003dFalse):"},{"line_number":23,"context_line":"        decoded_line \u003d line.decode(\u0027utf-8\u0027)"},{"line_number":24,"context_line":"        payload \u003d json.loads(decoded_line)"},{"line_number":25,"context_line":"        if \u0027created\u0027 in payload[\u0027result\u0027]:"}],"source_content_type":"text/x-python","patch_set":5,"id":"7ca5d1bc_a6ce5180","line":22,"range":{"start_line":22,"start_character":51,"end_line":22,"end_character":71},"in_reply_to":"25896880_59179b6b","updated":"2021-11-15 11:21:03.000000000","message":"Hello,\n\nI missed the HTTP Content-Type header of this topic, so indeed I think you are right the decode_unicode kwargs is not related to the python version and your current approche is better.","commit_id":"ed899b34e464862525f76fff2377a2cceeb65af7"},{"author":{"_account_id":33910,"name":"Tyler Stachecki","display_name":"Tyler Stachecki","email":"tstachecki@bloomberg.net","username":"tjstachecki"},"change_message_id":"47550300f50366114d3daabae59e7575dbb15183","unresolved":true,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"def _watch(resp, callback):"},{"line_number":22,"context_line":"    for line in resp.iter_content(chunk_size\u003dNone, decode_unicode\u003dFalse):"},{"line_number":23,"context_line":"        decoded_line \u003d line.decode(\u0027utf-8\u0027)"},{"line_number":24,"context_line":"        payload \u003d json.loads(decoded_line)"},{"line_number":25,"context_line":"        if \u0027created\u0027 in payload[\u0027result\u0027]:"}],"source_content_type":"text/x-python","patch_set":5,"id":"25896880_59179b6b","line":22,"range":{"start_line":22,"start_character":51,"end_line":22,"end_character":71},"in_reply_to":"caf7174b_c5f058bc","updated":"2021-11-12 20:40:40.000000000","message":"I don\u0027t think the kwarg is so much related to python2/3 -- the decode_unicode kwarg determines whether or not if requests should decode the content as per the HTTP Content-Type header. [1][2]\n\n[1] https://github.com/psf/requests/blob/b0e025ade7ed30ed53ab61f542779af7e024932e/requests/utils.py#L511\n[2] https://github.com/psf/requests/blob/b0e025ade7ed30ed53ab61f542779af7e024932e/requests/models.py#L789\n\nSetting the kwarg is superfluous so long as requests leaves decode_unicode\u003dFalse as the default.  Or, we could set decode_unicode\u003dTrue as requests assumes that a content-type of application/json (which should always be the case for etcd) will be encoded in UTF-8 unless explicitly specified otherwise.  We would then need to drop the explicit decoding in the top of the loop, though, to again avoid the AttributeError.\n\nI am impartial to any solution, but what do you think?","commit_id":"ed899b34e464862525f76fff2377a2cceeb65af7"}]}
