peopledoc / pydocusign

Python client for DocuSign signature API
Other
18 stars 21 forks source link

Don't overwrite methods of an external object #95

Closed kbussell closed 8 years ago

kbussell commented 8 years ago

Fixes #94

response.raw is an urllib3 Response object. response.close() is a method on a requests Response object. I'm not sure why this was added in the first place, but this should not work.

It's possible that older versions of Requests and urllib3 had a bug around this, but using 2.9.0 and up, this line doesn't do anything useful and could be harmful.

zebuline commented 8 years ago

@kbussell seems legit. We had some bugs too when Requests was updated on our project, with document.close() calls, where document is the result of the get_envelope_document method.

zebuline commented 8 years ago

And thanks for the PR :)