httpconnection: remove a mutable default argument
Mutable default arguments are know to the state of California to cause bugs.
--- a/mercurial/httpconnection.py Thu Sep 24 00:52:21 2015 -0700
+++ b/mercurial/httpconnection.py Thu Sep 24 00:54:30 2015 -0700
@@ -107,7 +107,9 @@
class HTTPConnection(httpclient.HTTPConnection):
response_class = HTTPResponse
- def request(self, method, uri, body=None, headers={}):
+ def request(self, method, uri, body=None, headers=None):
+ if headers is None:
+ headers = {}
if isinstance(body, httpsendfile):
body.seek(0)
httpclient.HTTPConnection.request(self, method, uri, body=body,