url: don't pass strict argument on Python 3
authorGregory Szorc <gregory.szorc@gmail.com>
Fri, 15 Feb 2019 13:22:01 -0800
changeset 41711 544035846830
parent 41710 4028897dfa05
child 41712 88d4477ac4f6
url: don't pass strict argument on Python 3 The argument was removed in Python 3.4. Differential Revision: https://phab.mercurial-scm.org/D5975
mercurial/url.py
--- a/mercurial/url.py	Fri Feb 15 13:16:07 2019 -0800
+++ b/mercurial/url.py	Fri Feb 15 13:22:01 2019 -0800
@@ -216,9 +216,14 @@
     # majority of the following code is duplicated from
     # httplib.HTTPConnection as there are no adequate places to
     # override functions to provide the needed functionality
+    # strict was removed in Python 3.4.
+    kwargs = {}
+    if not pycompat.ispy3:
+        kwargs['strict'] = self.strict
+
     res = self.response_class(self.sock,
-                              strict=self.strict,
-                              method=self._method)
+                              method=self._method,
+                              **kwargs)
 
     while True:
         version, status, reason = res._read_status()