casesmash.py: use absolute_import

Augie Fackler raf at durin42.com
Tue Mar 1 18:22:45 UTC 2016


On Tue, Mar 01, 2016 at 07:39:44AM +0530, Pulkit Goyal wrote:
> 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.

This patch looks pretty good, but your message isn't in the form that
makes it easy for us to accept. Please look through
http://mercurial.selenic.com/wiki/ContributingChanges and use one of
the methods listed there to mail us a patch (pushgate is probably the
easiest).

Thanks!

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

> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list