Patchwork D1798: py3: convert dict keys' to str before passing as kwargs

login
register
mail settings
Submitter phabricator
Date Dec. 29, 2017, 12:50 a.m.
Message ID <differential-rev-PHID-DREV-d5gwfdzf63hfl4onbfte-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/26495/
State Superseded
Headers show

Comments

phabricator - Dec. 29, 2017, 12:50 a.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We have pycompat.strkwargs() which converts the keys of a dict to str and
  returns that.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/templater.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/templater.py b/mercurial/templater.py
--- a/mercurial/templater.py
+++ b/mercurial/templater.py
@@ -397,7 +397,7 @@ 
         # pair instead of **props
         props = context._resources.copy()
         props.update(mapping)
-        return v(**props)
+        return v(**pycompat.strkwargs(props))
     return v
 
 def buildtemplate(exp, context):