)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"863bd39625416b8e9f0dd01864796afdda682ecd","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Ensure token is a string"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Token is passed as a header from wsgi to HTTPD"},{"line_number":10,"context_line":"If that token is a unicode object, it triggers and exception in mod_wsgi"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Closes-Bug: 1312971"},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAAXX%2F%2FuUs%3D","line":10,"updated":"2014-04-28 13:03:03.000000000","message":"(nit) *an* exception","commit_id":"f6cb493f3fd579fe65c0cfca42c79369bfe60a1c"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"b318da2b33acb1b2a4c005b0800e30df3ce25190","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Token is passed as a header from wsgi to HTTPD"},{"line_number":10,"context_line":"If that token is a unicode object, it triggers and exception in mod_wsgi"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Closes-Bug: 1312971"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I4bb6ef6c98fbcd35435956d701f1ee3281e9935a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAAXX%2F%2Fwzc%3D","line":12,"updated":"2014-04-28 06:35:15.000000000","message":"this patch doesn\u0027t close the bug, the bug is still there whether we enforce token to be string or not. \n\nChange to: Partial-Bug: #1312971\n\nso the bug is not closed","commit_id":"f6cb493f3fd579fe65c0cfca42c79369bfe60a1c"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"5c2e177bceb583b9451822e5ee5d2ec58bdf05a9","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Token is passed as a header from wsgi to HTTPD"},{"line_number":10,"context_line":"If that token is a unicode object, it triggers and exception in mod_wsgi"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Closes-Bug: 1312971"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I4bb6ef6c98fbcd35435956d701f1ee3281e9935a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAAXX%2F%2FtUc%3D","line":12,"in_reply_to":"AAAAXX%2F%2Fwzc%3D","updated":"2014-04-28 14:55:34.000000000","message":"No, it closes the bug.  The bug is that Keystone HTTPD breaks with the token in this format.","commit_id":"f6cb493f3fd579fe65c0cfca42c79369bfe60a1c"}],"keystone/token/providers/pki.py":[{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"863bd39625416b8e9f0dd01864796afdda682ecd","unresolved":false,"context_lines":[{"line_number":34,"context_line":"class Provider(common.BaseProvider):"},{"line_number":35,"context_line":"    def _get_token_id(self, token_data):"},{"line_number":36,"context_line":"        try:"},{"line_number":37,"context_line":"            token_id \u003d str(cms.cms_sign_token(json.dumps(token_data),"},{"line_number":38,"context_line":"                                              CONF.signing.certfile,"},{"line_number":39,"context_line":"                                              CONF.signing.keyfile))"},{"line_number":40,"context_line":"            return token_id"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXX%2F%2FuSY%3D","line":37,"updated":"2014-04-28 13:03:03.000000000","message":"Does this work in Python3? str is not bytes in Py3. Should this be six.text_type()?","commit_id":"f6cb493f3fd579fe65c0cfca42c79369bfe60a1c"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"0ea421fe42b948feb0824ae0bbe2324937460f07","unresolved":false,"context_lines":[{"line_number":34,"context_line":"class Provider(common.BaseProvider):"},{"line_number":35,"context_line":"    def _get_token_id(self, token_data):"},{"line_number":36,"context_line":"        try:"},{"line_number":37,"context_line":"            token_id \u003d str(cms.cms_sign_token(json.dumps(token_data),"},{"line_number":38,"context_line":"                                              CONF.signing.certfile,"},{"line_number":39,"context_line":"                                              CONF.signing.keyfile))"},{"line_number":40,"context_line":"            return token_id"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXX%2F%2Fti0%3D","line":37,"updated":"2014-04-28 14:33:45.000000000","message":"it seems this addition should also have a comment so it can be removed later, once keystoneclient has actually solved the issue","commit_id":"f6cb493f3fd579fe65c0cfca42c79369bfe60a1c"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"5c2e177bceb583b9451822e5ee5d2ec58bdf05a9","unresolved":false,"context_lines":[{"line_number":34,"context_line":"class Provider(common.BaseProvider):"},{"line_number":35,"context_line":"    def _get_token_id(self, token_data):"},{"line_number":36,"context_line":"        try:"},{"line_number":37,"context_line":"            token_id \u003d str(cms.cms_sign_token(json.dumps(token_data),"},{"line_number":38,"context_line":"                                              CONF.signing.certfile,"},{"line_number":39,"context_line":"                                              CONF.signing.keyfile))"},{"line_number":40,"context_line":"            return token_id"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXX%2F%2FteQ%3D","line":37,"in_reply_to":"AAAAXX%2F%2Fti0%3D","updated":"2014-04-28 14:55:34.000000000","message":"Done","commit_id":"f6cb493f3fd579fe65c0cfca42c79369bfe60a1c"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"5c2e177bceb583b9451822e5ee5d2ec58bdf05a9","unresolved":false,"context_lines":[{"line_number":34,"context_line":"class Provider(common.BaseProvider):"},{"line_number":35,"context_line":"    def _get_token_id(self, token_data):"},{"line_number":36,"context_line":"        try:"},{"line_number":37,"context_line":"            token_id \u003d str(cms.cms_sign_token(json.dumps(token_data),"},{"line_number":38,"context_line":"                                              CONF.signing.certfile,"},{"line_number":39,"context_line":"                                              CONF.signing.keyfile))"},{"line_number":40,"context_line":"            return token_id"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXX%2F%2FteY%3D","line":37,"in_reply_to":"AAAAXX%2F%2FuSY%3D","updated":"2014-04-28 14:55:34.000000000","message":"No idea, and I don\u0027t really have a way to test it as Python33 is not really an option for Keystone server yet.","commit_id":"f6cb493f3fd579fe65c0cfca42c79369bfe60a1c"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"d362f1f4b4b0a9c331ccf714d0b8848c1e9e6dc6","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            #produces unicode.  This can be removed if the client returns str()"},{"line_number":40,"context_line":"            token_id \u003d six.text_type(cms.cms_sign_token(json.dumps(token_data),"},{"line_number":41,"context_line":"                                              CONF.signing.certfile,"},{"line_number":42,"context_line":"                                              CONF.signing.keyfile))"},{"line_number":43,"context_line":"            return token_id"},{"line_number":44,"context_line":"        except environment.subprocess.CalledProcessError:"},{"line_number":45,"context_line":"            LOG.exception(_(\u0027Unable to sign token\u0027))"}],"source_content_type":"text/x-python","patch_set":4,"id":"9ad9bd40_ae4f9091","line":42,"updated":"2014-04-30 18:35:14.000000000","message":"This can\u0027t be six.text_type, text_type will maintain unicode if unicode it passed to it:\n\n    \u003e\u003e\u003e import six\n    \u003e\u003e\u003e six.text_type(u\u0027testing\u0027)\n    u\u0027testing\u0027\n    \u003e\u003e\u003e \n\nThis is a case where we legitimately want byte_str in all cases. I am guessing that for py33 compat, we will need to use bytes() with an encoding. A \"TODO\" should be sufficient for handling the py33 case (py33 isn\u0027t viable server side now).\n\nsuggest reverting to using str()","commit_id":"be6fc247251883317e02d188e662b1f142fcc043"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"3c478009ca1179f800395cf8cedb7c68ff6fa9ac","unresolved":false,"context_lines":[{"line_number":37,"context_line":"            # force conversion to a string as the keystone client cms code"},{"line_number":38,"context_line":"            # produces unicode.  This can be removed if the client returns"},{"line_number":39,"context_line":"            # str()"},{"line_number":40,"context_line":"            token_id \u003d str(cms.cms_sign_token(json.dumps(token_data),"},{"line_number":41,"context_line":"                                              CONF.signing.certfile,"},{"line_number":42,"context_line":"                                              CONF.signing.keyfile))"},{"line_number":43,"context_line":"            return token_id"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad9bd40_ee6d0606","line":40,"updated":"2014-05-01 13:55:23.000000000","message":"I\u0027m pretty sure that this won\u0027t work in Python3. I know you can\u0027t test it, but I\u0027ve done a little manual testing to prove to myself that it won\u0027t work. It should it be six.binary_type() instead of str().","commit_id":"ebe1162c2c381f69454e200ce875ac8d6e8a86e2"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"991022da1c632711e50bef443d5bd68a28a97041","unresolved":false,"context_lines":[{"line_number":37,"context_line":"            # force conversion to a string as the keystone client cms code"},{"line_number":38,"context_line":"            # produces unicode.  This can be removed if the client returns"},{"line_number":39,"context_line":"            # str()"},{"line_number":40,"context_line":"            token_id \u003d str(cms.cms_sign_token(json.dumps(token_data),"},{"line_number":41,"context_line":"                                              CONF.signing.certfile,"},{"line_number":42,"context_line":"                                              CONF.signing.keyfile))"},{"line_number":43,"context_line":"            return token_id"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad9bd40_7c95273f","line":40,"in_reply_to":"9ad9bd40_ee6d0606","updated":"2014-05-01 18:51:53.000000000","message":"There is more at play here, you need to explicitly provide an encoding for py33:\n\n    \u003e\u003e\u003e import six\n    \u003e\u003e\u003e six.binary_type\n    \u003cclass \u0027bytes\u0027\u003e\n    \u003e\u003e\u003e a \u003d u\u0027testing\u0027\n    \u003e\u003e\u003e six.binary_type(a)\n    Traceback (most recent call last):\n      File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n    TypeError: string argument without an encoding\n\nSince we aren\u0027t able to run keystone behind mod_wsgi with py33 at the moment, I think this is fine. Maybe a TODO or FIXME?","commit_id":"ebe1162c2c381f69454e200ce875ac8d6e8a86e2"}]}
