)]}'
{"oslo_serialization/msgpackutils.py":[{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"46cb428fdc9b82cb8ad666f1f33f1cab96e1030b","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        if dt.tzinfo:"},{"line_number":140,"context_line":"            tz \u003d dt.tzinfo.tzname(None)"},{"line_number":141,"context_line":"            if six.PY2:"},{"line_number":142,"context_line":"                tz \u003d tz.decode(\"ascii\")"},{"line_number":143,"context_line":"            dct[u\u0027tz\u0027] \u003d tz"},{"line_number":144,"context_line":"        return dumps(dct, registry\u003dself._registry)"},{"line_number":145,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3afc51ec_c31a5617","line":142,"range":{"start_line":142,"start_character":32,"end_line":142,"end_character":37},"updated":"2016-03-11 17:41:19.000000000","message":"I don\u0027t know what is the best encoding for the timezone :-/\n\nI recall annoying bugs with the encoding of timezones in the time module. The right encoding is the *current* locale LC_CTYPE encoding.\n\nBut I don\u0027t expect the datetime to use the timezone names from the time module, but more \"UTC\", \"UTC+0200\" or something like \"CEST\". So ASCII names.\n\nTo avoid issues, you may try to do less work: don\u0027t encode the timezone name on serialization, but only guess the encoding on deserialization on python3 if the timezone name is a bytes string.\n\nIt avoids decoding errors on Python 2.","commit_id":"687067fd9d8b39433829232aefdf4febcc27b50c"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"6e028f25ae0182336b3831f11c559e36d51fa9fb","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        if dt.tzinfo:"},{"line_number":140,"context_line":"            tz \u003d dt.tzinfo.tzname(None)"},{"line_number":141,"context_line":"            if six.PY2:"},{"line_number":142,"context_line":"                tz \u003d tz.decode(\"ascii\")"},{"line_number":143,"context_line":"            dct[u\u0027tz\u0027] \u003d tz"},{"line_number":144,"context_line":"        return dumps(dct, registry\u003dself._registry)"},{"line_number":145,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3afc51ec_8ed207ff","line":142,"range":{"start_line":142,"start_character":32,"end_line":142,"end_character":37},"in_reply_to":"3afc51ec_c31a5617","updated":"2016-03-14 07:20:28.000000000","message":"I don\u0027t really like guessing ? I prefer the library to fail during serialization than deserialization, in case of something got wrong, I don\u0027t like to have to deal with broken blob.\n\nSo I would say, keep this as-is, if someone complains, uses  LC_CTYPE and serialize the used locale too. WDYT ?","commit_id":"687067fd9d8b39433829232aefdf4febcc27b50c"},{"author":{"_account_id":7109,"name":"Dmitry Mescheryakov (dmitryme)","email":"dmescheryakov@mirantis.com","username":"dmitryme"},"change_message_id":"ef31b15d9b2c6dac32d349b6560f4ea8d581a3a3","unresolved":false,"context_lines":[{"line_number":157,"context_line":"            # by python2 and now read by python3"},{"line_number":158,"context_line":"            dct \u003d dict((k.decode(\"ascii\"), v) for k, v in dct.items())"},{"line_number":159,"context_line":"            if \u0027tz\u0027 in dct:"},{"line_number":160,"context_line":"                dct[\u0027tz\u0027] \u003d dct[\u0027tz\u0027].decode(\"ascii\")"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        dt \u003d datetime.datetime(day\u003ddct[\u0027day\u0027],"},{"line_number":163,"context_line":"                               month\u003ddct[\u0027month\u0027],"}],"source_content_type":"text/x-python","patch_set":6,"id":"3afc51ec_49b75986","line":160,"updated":"2016-03-14 08:12:29.000000000","message":"There seem to be no need to explicitly decode tz. If it is present in the dct, it will be decoded in the loop on line #158","commit_id":"687067fd9d8b39433829232aefdf4febcc27b50c"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"de3144ff1c36cee6fb258a3fad299d7594333c3a","unresolved":false,"context_lines":[{"line_number":157,"context_line":"            # by python2 and now read by python3"},{"line_number":158,"context_line":"            dct \u003d dict((k.decode(\"ascii\"), v) for k, v in dct.items())"},{"line_number":159,"context_line":"            if \u0027tz\u0027 in dct:"},{"line_number":160,"context_line":"                dct[\u0027tz\u0027] \u003d dct[\u0027tz\u0027].decode(\"ascii\")"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        dt \u003d datetime.datetime(day\u003ddct[\u0027day\u0027],"},{"line_number":163,"context_line":"                               month\u003ddct[\u0027month\u0027],"}],"source_content_type":"text/x-python","patch_set":6,"id":"3afc51ec_818c7c36","line":160,"in_reply_to":"3afc51ec_49b75986","updated":"2016-03-14 15:56:37.000000000","message":"The loop decode keys not values.","commit_id":"687067fd9d8b39433829232aefdf4febcc27b50c"},{"author":{"_account_id":7109,"name":"Dmitry Mescheryakov (dmitryme)","email":"dmescheryakov@mirantis.com","username":"dmitryme"},"change_message_id":"6015eaf99fec6794f80c7ba6a8efb1b2e99eb118","unresolved":false,"context_lines":[{"line_number":157,"context_line":"            # by python2 and now read by python3"},{"line_number":158,"context_line":"            dct \u003d dict((k.decode(\"ascii\"), v) for k, v in dct.items())"},{"line_number":159,"context_line":"            if \u0027tz\u0027 in dct:"},{"line_number":160,"context_line":"                dct[\u0027tz\u0027] \u003d dct[\u0027tz\u0027].decode(\"ascii\")"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        dt \u003d datetime.datetime(day\u003ddct[\u0027day\u0027],"},{"line_number":163,"context_line":"                               month\u003ddct[\u0027month\u0027],"}],"source_content_type":"text/x-python","patch_set":6,"id":"3afc51ec_7575a396","line":160,"in_reply_to":"3afc51ec_818c7c36","updated":"2016-03-14 17:31:04.000000000","message":"Ah, right, I have missed that :-)","commit_id":"687067fd9d8b39433829232aefdf4febcc27b50c"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"46cb428fdc9b82cb8ad666f1f33f1cab96e1030b","unresolved":false,"context_lines":[{"line_number":167,"context_line":"                               second\u003ddct[\u0027second\u0027],"},{"line_number":168,"context_line":"                               microsecond\u003ddct[\u0027microsecond\u0027])"},{"line_number":169,"context_line":"        if \u0027tz\u0027 in dct:"},{"line_number":170,"context_line":"            tzinfo \u003d timezone(dct[\u0027tz\u0027])"},{"line_number":171,"context_line":"            dt \u003d tzinfo.localize(dt)"},{"line_number":172,"context_line":"        return dt"},{"line_number":173,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3afc51ec_23e21a04","line":170,"range":{"start_line":170,"start_character":30,"end_line":170,"end_character":33},"updated":"2016-03-11 17:41:19.000000000","message":"I mean that the decoding would only occur here.","commit_id":"687067fd9d8b39433829232aefdf4febcc27b50c"},{"author":{"_account_id":7109,"name":"Dmitry Mescheryakov (dmitryme)","email":"dmescheryakov@mirantis.com","username":"dmitryme"},"change_message_id":"ef31b15d9b2c6dac32d349b6560f4ea8d581a3a3","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        dct \u003d loads(blob, registry\u003dself._registry)"},{"line_number":270,"context_line":"        return datetime.date(year\u003ddct[b\u0027year\u0027],"},{"line_number":271,"context_line":"                             month\u003ddct[b\u0027month\u0027],"},{"line_number":272,"context_line":"                             day\u003ddct[b\u0027day\u0027])"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"def _serializer(registry, obj):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3afc51ec_9bdec46b","line":272,"updated":"2016-03-14 08:12:29.000000000","message":"Could you please explain, why do you use dict keys of different types?\n  \n    DateTimeHandler\n        serialize - unicode strings\n        deserialize - default strings\n\n    DateHandler\n        serialize - bytes\n        deserialize - bytes","commit_id":"687067fd9d8b39433829232aefdf4febcc27b50c"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"de3144ff1c36cee6fb258a3fad299d7594333c3a","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        dct \u003d loads(blob, registry\u003dself._registry)"},{"line_number":270,"context_line":"        return datetime.date(year\u003ddct[b\u0027year\u0027],"},{"line_number":271,"context_line":"                             month\u003ddct[b\u0027month\u0027],"},{"line_number":272,"context_line":"                             day\u003ddct[b\u0027day\u0027])"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"def _serializer(registry, obj):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3afc51ec_41c1d42d","line":272,"in_reply_to":"3afc51ec_9bdec46b","updated":"2016-03-14 15:56:37.000000000","message":"Oh I have missed to update that one when I have moved to eveerything in bytes to unicode/default strings, done.","commit_id":"687067fd9d8b39433829232aefdf4febcc27b50c"}]}
