[PATCH 2 of 3 V3] demandimport: support "absolute_import" for external libraries (issue4029)

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Sun Sep 8 08:23:31 CDT 2013


At Sat, 7 Sep 2013 20:48:14 +0000,
Jason R. Coombs wrote:
> 
> A few comments:

Thank you for your comments, Jason.


> First, the unit test for ambigrel will fail on Python 3. And while
> Mercurial doesn't support Python 3, I would recommend not adding
> tests that can be expected to fail on Python 3.

IMHO, at least while Mercurial supports Python 2.x, loading by
relative name, which is specific to Python 2.x, should be tested, to
prevent from degrading by changes in the future.

According to wiki pages describing about Python version, care to
follow Python 3.x specific behavior seems to be not yet needed.

    http://mercurial.selenic.com/wiki/SupportedPythonVersions
    http://mercurial.selenic.com/wiki/CompatibilityRules#Python_versions

Or should I separate absolute and relative loading tests for ease to
guard the latter on Python 3.x in the future ?


> Second, the test appears to include an 'hg id' output which I would
> expect to change over time. Perhaps the test suite normalizes this
> so that it's predictable when running the tests, but I wanted to
> mention it just in case.
>
> Third, the tests seem to be guarded by 'absimport'. I grepped the
> folder for that indicator but didn't find one. Would this test be
> run by default? I think it should (though it must be skipped on
> Python 2.4 as it doesn't support the feature).

"absimport" check is added by the patch #1 in this seires.

    http://selenic.com/pipermail/mercurial-devel/2013-September/053406.html

Code guarded by "absimport" should be skipped on Python 2.4.

> Overall, though, +1
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
> 

----------------------------------------------------------------------
[FUJIWARA Katsunori]                             foozy at lares.dti.ne.jp


More information about the Mercurial-devel mailing list