casesmash.py: use absolute_import

Pulkit Goyal 7895pulkit at gmail.com
Mon Feb 29 21:09:44 EST 2016


diff -r c7f89ad87bae contrib/casesmash.py
--- a/contrib/casesmash.py    Mon Feb 29 17:52:17 2016 -0600
+++ b/contrib/casesmash.py    Tue Mar 01 07:29:55 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,
+)

This will remove the compatibility warning regarding casesmash.py from the
test-check-py3-compat.t
I have runned the test and they are showing no error. Only one test is
failing and that is test-check-py3-compat.t file changed because the import
error was removed.

I am very much interested in working with Mercurial and especially on the
GSOC project "Moving towards Python 3" and for sure that won't be the last
and first work. I will love to keep contributing even after then.

I was working on fixing import cycles and eliminating compatibility
warnings which are initial to-do for the project. I want to ask is this is
the right way to solve this problem because earlier I have tried adding
just from future statement and I got replies that it is not the correct
way. So is it. Any kind of suggestions are welcomed.

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


More information about the Mercurial-devel mailing list