{"action":"created","issue":{"url":"https://api.github.com/repos/braintree/braintree_python/issues/58","labels_url":"https://api.github.com/repos/braintree/braintree_python/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/braintree/braintree_python/issues/58/comments","events_url":"https://api.github.com/repos/braintree/braintree_python/issues/58/events","html_url":"https://github.com/braintree/braintree_python/pull/58","id":95341539,"number":58,"title":"fix python 3 compatibility for oauth_gateway.py","user":{"login":"felixonmars","id":1006477,"avatar_url":"https://avatars.githubusercontent.com/u/1006477?v=3","gravatar_id":"","url":"https://api.github.com/users/felixonmars","html_url":"https://github.com/felixonmars","followers_url":"https://api.github.com/users/felixonmars/followers","following_url":"https://api.github.com/users/felixonmars/following{/other_user}","gists_url":"https://api.github.com/users/felixonmars/gists{/gist_id}","starred_url":"https://api.github.com/users/felixonmars/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixonmars/subscriptions","organizations_url":"https://api.github.com/users/felixonmars/orgs","repos_url":"https://api.github.com/users/felixonmars/repos","events_url":"https://api.github.com/users/felixonmars/events{/privacy}","received_events_url":"https://api.github.com/users/felixonmars/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-16T03:33:48Z","updated_at":"2015-07-16T14:53:01Z","closed_at":"2015-07-16T14:52:37Z","pull_request":{"url":"https://api.github.com/repos/braintree/braintree_python/pulls/58","html_url":"https://github.com/braintree/braintree_python/pull/58","diff_url":"https://github.com/braintree/braintree_python/pull/58.diff","patch_url":"https://github.com/braintree/braintree_python/pull/58.patch"},"body":"All unit tests failed with Python 3 with release 3.17.0:\r\n\r\n```\r\n======================================================================\r\nERROR: Failure: SyntaxError (invalid syntax (oauth_gateway.py, line 37))\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python3.4/site-packages/nose/failure.py\", line 39, in runTest\r\n    raise self.exc_val.with_traceback(self.tb)\r\n  File \"/usr/lib/python3.4/site-packages/nose/loader.py\", line 418, in loadTestsFromName\r\n    addr.filename, addr.module)\r\n  File \"/usr/lib/python3.4/site-packages/nose/importer.py\", line 47, in importFromPath\r\n    return self.importFromDir(dir_path, fqname)\r\n  File \"/usr/lib/python3.4/site-packages/nose/importer.py\", line 94, in importFromDir\r\n    mod = load_module(part_fqname, fh, filename, desc)\r\n  File \"/usr/lib/python3.4/imp.py\", line 235, in load_module\r\n    return load_source(name, filename, file)\r\n  File \"/usr/lib/python3.4/imp.py\", line 171, in load_source\r\n    module = methods.load()\r\n  File \"<frozen importlib._bootstrap>\", line 1220, in load\r\n  File \"<frozen importlib._bootstrap>\", line 1200, in _load_unlocked\r\n  File \"<frozen importlib._bootstrap>\", line 1129, in _exec\r\n  File \"<frozen importlib._bootstrap>\", line 1471, in exec_module\r\n  File \"<frozen importlib._bootstrap>\", line 321, in _call_with_frames_removed\r\n  File \"/build/python-braintree/src/braintree_python-3.17.0/tests/unit/test_xml_util.py\", line 1, in <module>\r\n    from tests.test_helper import *\r\n  File \"/build/python-braintree/src/braintree_python-3.17.0/tests/test_helper.py\", line 14, in <module>\r\n    from braintree import *\r\n  File \"/build/python-braintree/src/braintree_python-3.17.0/braintree/__init__.py\", line 7, in <module>\r\n    from braintree.braintree_gateway import BraintreeGateway\r\n  File \"/build/python-braintree/src/braintree_python-3.17.0/braintree/braintree_gateway.py\", line 10, in <module>\r\n    from braintree.oauth_gateway import OAuthGateway\r\n  File \"/build/python-braintree/src/braintree_python-3.17.0/braintree/oauth_gateway.py\", line 37\r\n    def clean_values(accumulator, (key, value)):\r\n                                  ^\r\nSyntaxError: invalid syntax\r\n```\r\n\r\nTuple parameter unpacking was removed since Python 3.0 (PEP 3113), and there is also reference to `urllib.quote_plus` and `reduce()` which are not directly usable in Python 3. This PR addresses all what I have found so far and make the tests passing again."},"comment":{"url":"https://api.github.com/repos/braintree/braintree_python/issues/comments/121979821","html_url":"https://github.com/braintree/braintree_python/pull/58#issuecomment-121979821","issue_url":"https://api.github.com/repos/braintree/braintree_python/issues/58","id":121979821,"user":{"login":"SeanHurley","id":1881554,"avatar_url":"https://avatars.githubusercontent.com/u/1881554?v=3","gravatar_id":"","url":"https://api.github.com/users/SeanHurley","html_url":"https://github.com/SeanHurley","followers_url":"https://api.github.com/users/SeanHurley/followers","following_url":"https://api.github.com/users/SeanHurley/following{/other_user}","gists_url":"https://api.github.com/users/SeanHurley/gists{/gist_id}","starred_url":"https://api.github.com/users/SeanHurley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SeanHurley/subscriptions","organizations_url":"https://api.github.com/users/SeanHurley/orgs","repos_url":"https://api.github.com/users/SeanHurley/repos","events_url":"https://api.github.com/users/SeanHurley/events{/privacy}","received_events_url":"https://api.github.com/users/SeanHurley/received_events","type":"User","site_admin":false},"created_at":"2015-07-16T14:53:01Z","updated_at":"2015-07-16T14:53:01Z","body":"@felixonmars Thanks for the catch here! We'll merge this and get out a new release of the library ASAP"}}