Patchwork D1637: py3: handle keyword arguments correctly in keepalive.py

login
register
mail settings
Submitter phabricator
Date Dec. 10, 2017, 2:50 a.m.
Message ID <d5b54844b74694f395fec7f7f7b03651@localhost.localdomain>
Download mbox | patch
Permalink /patch/26183/
State Not Applicable
Headers show

Comments

phabricator - Dec. 10, 2017, 2:50 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG03112a2c9c83: py3: handle keyword arguments correctly in keepalive.py (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1637?vs=4316&id=4328

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

AFFECTED FILES
  mercurial/keepalive.py

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/keepalive.py b/mercurial/keepalive.py
--- a/mercurial/keepalive.py
+++ b/mercurial/keepalive.py
@@ -322,16 +322,16 @@ 
                 data = urllibcompat.getdata(req)
                 h.putrequest(
                     req.get_method(), urllibcompat.getselector(req),
-                    **skipheaders)
+                    **pycompat.strkwargs(skipheaders))
                 if 'content-type' not in headers:
                     h.putheader('Content-type',
                                 'application/x-www-form-urlencoded')
                 if 'content-length' not in headers:
                     h.putheader('Content-length', '%d' % len(data))
             else:
                 h.putrequest(
                     req.get_method(), urllibcompat.getselector(req),
-                    **skipheaders)
+                    **pycompat.strkwargs(skipheaders))
         except socket.error as err:
             raise urlerr.urlerror(err)
         for k, v in headers.items():
@@ -366,8 +366,8 @@ 
     def __init__(self, sock, debuglevel=0, strict=0, method=None):
         extrakw = {}
         if not pycompat.ispy3:
-            extrakw['strict'] = True
-            extrakw['buffering'] = True
+            extrakw[r'strict'] = True
+            extrakw[r'buffering'] = True
         httplib.HTTPResponse.__init__(self, sock, debuglevel=debuglevel,
                                       method=method, **extrakw)
         self.fileno = sock.fileno