[PATCH] casesmash.py: Removed compatibility warnings of Py3.

Pulkit Goyal 7895pulkit at gmail.com
Tue Mar 1 22:08:59 UTC 2016


# HG changeset patch
# User Pulkit Goyal <7895pulkit at gmail.com>
# Date 1456870004 -19800
#      Wed Mar 02 03:36:44 2016 +0530
# Node ID 31cedec0974f06ba10c0e40f8a36710b7d2ff5a3
# Parent  c7f89ad87baef87f00c507545dfd4cc824bc3131
casesmash.py- Fixed import warnings raise due to compatibility to Py3

diff -r c7f89ad87bae -r 31cedec0974f contrib/casesmash.py
--- a/contrib/casesmash.py    Mon Feb 29 17:52:17 2016 -0600
+++ b/contrib/casesmash.py    Wed Mar 02 03:36:44 2016 +0530
@@ -1,5 +1,9 @@
-import os, __builtin__
-from mercurial import util
+from __future__ import absolute_import
+import os
+import __builtin__
+from mercurial import (
+util,
+)

 def lowerwrap(scope, funcname):
     f = getattr(scope, funcname)
diff -r c7f89ad87bae -r 31cedec0974f tests/test-check-py3-compat.t
--- a/tests/test-check-py3-compat.t    Mon Feb 29 17:52:17 2016 -0600
+++ b/tests/test-check-py3-compat.t    Wed Mar 02 03:36:44 2016 +0530
@@ -3,7 +3,6 @@
   $ cd "$TESTDIR"/..

   $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs python
contrib/check-py3-compat.py
-  contrib/casesmash.py not using absolute_import
   contrib/check-code.py not using absolute_import
   contrib/check-code.py requires print_function
   contrib/check-config.py not using absolute_import

Regards
Pulkit Goyal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20160302/a8e62401/attachment.html>


More information about the Mercurial-devel mailing list