Patchwork D5975: url: don't pass strict argument on Python 3

login
register
mail settings
Submitter phabricator
Date Feb. 16, 2019, 3:34 a.m.
Message ID <17c00b017c1e6d0e9c83aabea789898b@localhost.localdomain>
Download mbox | patch
Permalink /patch/38784/
State Not Applicable
Headers show

Comments

phabricator - Feb. 16, 2019, 3:34 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG544035846830: url: don&#039;t pass strict argument on Python 3 (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5975?vs=14114&id=14121

REVISION DETAIL
  https://phab.mercurial-scm.org/D5975

AFFECTED FILES
  mercurial/url.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mjpieters, mercurial-devel

Patch

diff --git a/mercurial/url.py b/mercurial/url.py
--- a/mercurial/url.py
+++ b/mercurial/url.py
@@ -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()