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

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Thu Dec 28 19:50:12 EST 2017


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

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):



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


More information about the Mercurial-devel mailing list