)]}'
{"ceilometer/publisher/utils.py":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"c4d64ef0f2a4c16d9069cbd5e4164d6af6d5a6d6","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    if not secret:"},{"line_number":46,"context_line":"        return \u0027\u0027"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    if isinstance(secret, six.text_type):"},{"line_number":49,"context_line":"        secret \u003d secret.encode(\u0027utf-8\u0027)"},{"line_number":50,"context_line":"    digest_maker \u003d hmac.new(secret, b\u0027\u0027, hashlib.sha256)"},{"line_number":51,"context_line":"    for name, value in utils.recursive_keypairs(message):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_802c1503","line":48,"updated":"2015-05-18 18:44:52.000000000","message":"Could you rather fix the callers to always send bytes?","commit_id":"cfb0aa8e0a7417ff489a1be8d33edd7fb4b44a42"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"7199fece978a3e5a3ff02f5a879ba83d4611b2a2","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    if not secret:"},{"line_number":46,"context_line":"        return \u0027\u0027"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    if isinstance(secret, six.text_type):"},{"line_number":49,"context_line":"        secret \u003d secret.encode(\u0027utf-8\u0027)"},{"line_number":50,"context_line":"    digest_maker \u003d hmac.new(secret, b\u0027\u0027, hashlib.sha256)"},{"line_number":51,"context_line":"    for name, value in utils.recursive_keypairs(message):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_7e6be3f1","line":48,"in_reply_to":"7a016987_4de07f29","updated":"2015-05-19 21:57:30.000000000","message":"I began to write a patch to encode manually the secret in all caller sites, but there are +20 caller sites (a lot), and it\u0027s boring to have to replace:\n\n  func(..., cfg.CONF.publisher.telemetry_secret)\n\nwith\n\n  secret \u003d cfg.CONF.publisher.telemetry_secret\n  if six.PY3:\n     secret \u003d secret.encode(\u0027utf-8\u0027)\n  func(..., secret)\n\nThere are many functions in utils.py calling compute_signature() and so requiring a secret, it\u0027s not just compute_signature().","commit_id":"cfb0aa8e0a7417ff489a1be8d33edd7fb4b44a42"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"27d7feb7f64aff4c4c8d41b1c45518609bfda285","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    if not secret:"},{"line_number":46,"context_line":"        return \u0027\u0027"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    if isinstance(secret, six.text_type):"},{"line_number":49,"context_line":"        secret \u003d secret.encode(\u0027utf-8\u0027)"},{"line_number":50,"context_line":"    digest_maker \u003d hmac.new(secret, b\u0027\u0027, hashlib.sha256)"},{"line_number":51,"context_line":"    for name, value in utils.recursive_keypairs(message):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_9147c94a","line":48,"in_reply_to":"7a016987_802c1503","updated":"2015-05-18 22:11:18.000000000","message":"secret comes from cfg.CONF.publisher.telemetry_secret which is a oslo_config.cfg.StrOp(). I don\u0027t see any type in oslo_config to get a bytes string (accept unicode but encode it to an encoding).\n\ncfg.CONF.publisher.telemetry_secret may be stored in a new variable somewhere in the \"right\" format (bytes), but it can introduce inconsitencies if a variable is modified (ex: monkey patched) and not the other one.\n\nI prefer to be more kind and accept bytes and unicode here.\n\nWhat do you think?","commit_id":"cfb0aa8e0a7417ff489a1be8d33edd7fb4b44a42"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"4049a6f1e6e8471d72ddf5aba8a604945059a6ec","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    if not secret:"},{"line_number":46,"context_line":"        return \u0027\u0027"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    if isinstance(secret, six.text_type):"},{"line_number":49,"context_line":"        secret \u003d secret.encode(\u0027utf-8\u0027)"},{"line_number":50,"context_line":"    digest_maker \u003d hmac.new(secret, b\u0027\u0027, hashlib.sha256)"},{"line_number":51,"context_line":"    for name, value in utils.recursive_keypairs(message):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_4de07f29","line":48,"in_reply_to":"7a016987_9147c94a","updated":"2015-05-19 18:19:19.000000000","message":"That\u0027s a good argument. Let\u0027s keep what you did so far.","commit_id":"cfb0aa8e0a7417ff489a1be8d33edd7fb4b44a42"}]}
