# HG changeset patch # User Pierre-Yves David # Date 1443081270 25200 # Node ID e9a35411bbbcf7c09ab002fca424ce982d8b3dc5 # Parent 2449a0a6ebda323da36f260bc52b3636b131cbea httpconnection: remove a mutable default argument Mutable default arguments are know to the state of California to cause bugs. diff -r 2449a0a6ebda -r e9a35411bbbc mercurial/httpconnection.py --- 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,