diff options
Diffstat (limited to 'pygerrit/rest/__init__.py')
-rw-r--r-- | pygerrit/rest/__init__.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/pygerrit/rest/__init__.py b/pygerrit/rest/__init__.py index 2c80313..31e5b3e 100644 --- a/pygerrit/rest/__init__.py +++ b/pygerrit/rest/__init__.py @@ -73,7 +73,6 @@ class GerritRestAPI(object): 'verify': verify, 'headers': headers} self.url = url.rstrip('/') - self.session = requests.session() if auth: if not isinstance(auth, requests.auth.AuthBase): @@ -115,7 +114,7 @@ class GerritRestAPI(object): """ kwargs.update(self.kwargs.copy()) - response = self.session.get(self.make_url(endpoint), **kwargs) + response = requests.get(self.make_url(endpoint), **kwargs) return _decode_response(response) def put(self, endpoint, **kwargs): @@ -134,7 +133,7 @@ class GerritRestAPI(object): if "data" in kwargs: kwargs["headers"].update( {"Content-Type": "application/json;charset=UTF-8"}) - response = self.session.put(self.make_url(endpoint), **kwargs) + response = requests.put(self.make_url(endpoint), **kwargs) return _decode_response(response) def post(self, endpoint, **kwargs): @@ -153,7 +152,7 @@ class GerritRestAPI(object): if "data" in kwargs: kwargs["headers"].update( {"Content-Type": "application/json;charset=UTF-8"}) - response = self.session.post(self.make_url(endpoint), **kwargs) + response = requests.post(self.make_url(endpoint), **kwargs) return _decode_response(response) def delete(self, endpoint, **kwargs): @@ -169,7 +168,7 @@ class GerritRestAPI(object): """ kwargs.update(self.kwargs.copy()) - response = self.session.delete(self.make_url(endpoint), **kwargs) + response = requests.delete(self.make_url(endpoint), **kwargs) return _decode_response(response) def review(self, change_id, revision, review): |