{"action":"created","issue":{"url":"https://api.github.com/repos/GrahamDumpleton/wrapt/issues/61","labels_url":"https://api.github.com/repos/GrahamDumpleton/wrapt/issues/61/labels{/name}","comments_url":"https://api.github.com/repos/GrahamDumpleton/wrapt/issues/61/comments","events_url":"https://api.github.com/repos/GrahamDumpleton/wrapt/issues/61/events","html_url":"https://github.com/GrahamDumpleton/wrapt/issues/61","id":123410385,"number":61,"title":"kwargs is empty with decorator","user":{"login":"lichen2013","id":3983266,"avatar_url":"https://avatars.githubusercontent.com/u/3983266?v=3","gravatar_id":"","url":"https://api.github.com/users/lichen2013","html_url":"https://github.com/lichen2013","followers_url":"https://api.github.com/users/lichen2013/followers","following_url":"https://api.github.com/users/lichen2013/following{/other_user}","gists_url":"https://api.github.com/users/lichen2013/gists{/gist_id}","starred_url":"https://api.github.com/users/lichen2013/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lichen2013/subscriptions","organizations_url":"https://api.github.com/users/lichen2013/orgs","repos_url":"https://api.github.com/users/lichen2013/repos","events_url":"https://api.github.com/users/lichen2013/events{/privacy}","received_events_url":"https://api.github.com/users/lichen2013/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-22T04:30:31Z","updated_at":"2015-12-23T07:41:17Z","closed_at":"2015-12-23T07:41:17Z","body":"Python : 2.7, wrapt (1.10.5)\r\n\r\nTest with the following code:\r\n\r\n    import wrapt\r\n\r\n    @wrapt.decorator\r\n    def test_wrapt(wrapped, instance, *args, **kwargs):\r\n        print('check args:')\r\n        print(args)\r\n        print('check kwargs')\r\n        print(kwargs)\r\n        return wrapped(*args, **kwargs)\r\n\r\n    class TestObject(object):\r\n\r\n        @test_wrapt\r\n        def test(self, x, y, z):\r\n            return x + y + z\r\n\r\n\r\n    test = TestObject()\r\n    test.test(x=2,y=2,z=4)\r\n\r\nThe output is:\r\n\r\n    check args:\r\n    ((), {'y': 2, 'x': 2, 'z': 4})\r\n    check kwargs\r\n    {}\r\n    Traceback (most recent call last):\r\n      File \"test_wrapt.py\", line 20, in <module>\r\n        test.test(x=2,y=2,z=4)\r\n      File \"test_wrapt.py\", line 10, in test_wrapt\r\n        return wrapped(*args, **kwargs)\r\n    TypeError: test() takes exactly 4 arguments (3 given)\r\n \r\n"},"comment":{"url":"https://api.github.com/repos/GrahamDumpleton/wrapt/issues/comments/166827827","html_url":"https://github.com/GrahamDumpleton/wrapt/issues/61#issuecomment-166827827","issue_url":"https://api.github.com/repos/GrahamDumpleton/wrapt/issues/61","id":166827827,"user":{"login":"lichen2013","id":3983266,"avatar_url":"https://avatars.githubusercontent.com/u/3983266?v=3","gravatar_id":"","url":"https://api.github.com/users/lichen2013","html_url":"https://github.com/lichen2013","followers_url":"https://api.github.com/users/lichen2013/followers","following_url":"https://api.github.com/users/lichen2013/following{/other_user}","gists_url":"https://api.github.com/users/lichen2013/gists{/gist_id}","starred_url":"https://api.github.com/users/lichen2013/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lichen2013/subscriptions","organizations_url":"https://api.github.com/users/lichen2013/orgs","repos_url":"https://api.github.com/users/lichen2013/repos","events_url":"https://api.github.com/users/lichen2013/events{/privacy}","received_events_url":"https://api.github.com/users/lichen2013/received_events","type":"User","site_admin":false},"created_at":"2015-12-23T07:41:17Z","updated_at":"2015-12-23T07:41:17Z","body":"Thanks!"}}