paymill/paymill-python

Enabling httplib debugging globally can have unwanted side effects

Closed this issue · 3 comments

vain commented

In paymill/utils/http_client.py, you set:

http_client.HTTPConnection.debuglevel = 1

Problem is, this affects all code that uses httplib. We’re using paymill-python in a larger application and ended up with huge log files because each and every HTTP request got logged. :)

Hi @vain,

thanks for the report and sorry for the inconvenience. We will make changes to switch off httplib debugging by default and expose this flag to be set by the developer. I think we can have a release with the above mentioned in the begining of next week.

Hi @vain,

I just released the changes related to your issue. From now on the httplib debugging is not enabled by default. If you for some reason need to switch it on, you can do so by setting to True the optional parameter http_debug_enabled added to the PaymillContext init.
You can find the current release 2.3.0 on PyPi.

vain commented

That's great news, thank you! :)