{"action":"created","issue":{"url":"https://api.github.com/repos/alecthomas/flask_injector/issues/6","labels_url":"https://api.github.com/repos/alecthomas/flask_injector/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/alecthomas/flask_injector/issues/6/comments","events_url":"https://api.github.com/repos/alecthomas/flask_injector/issues/6/events","html_url":"https://github.com/alecthomas/flask_injector/issues/6","id":39601860,"number":6,"title":"Doing multiple requests on a flask test client on an injected route fails for all but the first request.","user":{"login":"niax","id":275397,"avatar_url":"https://avatars.githubusercontent.com/u/275397?v=3","gravatar_id":"","url":"https://api.github.com/users/niax","html_url":"https://github.com/niax","followers_url":"https://api.github.com/users/niax/followers","following_url":"https://api.github.com/users/niax/following{/other_user}","gists_url":"https://api.github.com/users/niax/gists{/gist_id}","starred_url":"https://api.github.com/users/niax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niax/subscriptions","organizations_url":"https://api.github.com/users/niax/orgs","repos_url":"https://api.github.com/users/niax/repos","events_url":"https://api.github.com/users/niax/events{/privacy}","received_events_url":"https://api.github.com/users/niax/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2014-08-06T08:58:09Z","updated_at":"2015-11-02T23:32:13Z","closed_at":"2015-11-02T23:32:13Z","body":"All but the first call to the test client results in:\r\n\r\n        Traceback (most recent call last):\r\n          File \"/home/nickh/env/local/lib/python2.7/site-packages/flask/app.py\", line 1817, in wsgi_app\r\n                response = self.full_dispatch_request()\r\n          File \"/home/nickh/env/local/lib/python2.7/site-packages/flask/app.py\", line 1477, in full_dispatch_request\r\n                rv = self.handle_user_exception(e)\r\n          File \"/home/nickh/env/local/lib/python2.7/site-packages/flask/app.py\", line 1381, in handle_user_exception\r\n                reraise(exc_type, exc_value, tb)\r\n          File \"/home/nickh/env/local/lib/python2.7/site-packages/flask/app.py\", line 1475, in full_dispatch_request\r\n                rv = self.dispatch_request()\r\n          File \"/home/nickh/env/local/lib/python2.7/site-packages/flask/app.py\", line 1461, in dispatch_request\r\n                return self.view_functions[rule.endpoint](**req.view_args)\r\n          File \"/home/nickh/env/local/lib/python2.7/site-packages/flask/views.py\", line 83, in view\r\n                self = view.view_class(*class_args, **class_kwargs)\r\n          File \"/home/nickh/env/local/lib/python2.7/site-packages/flask_injector.py\", line 48, in cls\r\n                current_class, additional_kwargs=kwargs)\r\n          File \"/home/nickh/env/local/lib/python2.7/site-packages/injector.py\", line 692, in create_object\r\n                instance = cls.__new__(cls)\r\n        TypeError: function.__new__(X): X is not a type object (function)\r\n\r\nThis looks to be because the flask injector double-wraps the object being made.\r\n"},"comment":{"url":"https://api.github.com/repos/alecthomas/flask_injector/issues/comments/153192592","html_url":"https://github.com/alecthomas/flask_injector/issues/6#issuecomment-153192592","issue_url":"https://api.github.com/repos/alecthomas/flask_injector/issues/6","id":153192592,"user":{"login":"jstasiak","id":36209,"avatar_url":"https://avatars.githubusercontent.com/u/36209?v=3","gravatar_id":"","url":"https://api.github.com/users/jstasiak","html_url":"https://github.com/jstasiak","followers_url":"https://api.github.com/users/jstasiak/followers","following_url":"https://api.github.com/users/jstasiak/following{/other_user}","gists_url":"https://api.github.com/users/jstasiak/gists{/gist_id}","starred_url":"https://api.github.com/users/jstasiak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jstasiak/subscriptions","organizations_url":"https://api.github.com/users/jstasiak/orgs","repos_url":"https://api.github.com/users/jstasiak/repos","events_url":"https://api.github.com/users/jstasiak/events{/privacy}","received_events_url":"https://api.github.com/users/jstasiak/received_events","type":"User","site_admin":false},"created_at":"2015-11-02T23:32:13Z","updated_at":"2015-11-02T23:32:13Z","body":"To the best of my knowledge this is fixed so I'll close this issue. @niax please reopen if it doesn't work for you."}}