Patchwork [4,of,7] convert: bzr use absolute_import

login
register
mail settings
Submitter Pierre-Yves David
Date March 10, 2016, 3:35 p.m.
Message ID <56E19440.9020506@ens-lyon.org>
Download mbox | patch
Permalink /patch/13741/
State Superseded
Commit 098bb566058089fffc594265584402dce5cb323d
Headers show

Comments

Pierre-Yves David - March 10, 2016, 3:35 p.m.
On 03/09/2016 04:25 AM, timeless wrote:
> # HG changeset patch
> # User timeless <timeless@mozdev.org>
> # Date 1456936372 0
> #      Wed Mar 02 16:32:52 2016 +0000
> # Node ID 2a9a21afd35fbc2cad414078c6ec00ad0157834b
> # Parent  81f563d9b69385a37f1f45de5be67340dc87f075
> convert: bzr use absolute_import

this one make test-check-module-imports.t unhappy, I've dropped it from 
the clowncopter.

Timeless, use the following command to get a non-dead version:

   hg pull -r 5120b551e95f http://hg.netv6.net/marmoute-wip/mercurial/

hgext.largefiles.localstore -> hgext.largefiles.basestore
    [1]

ERROR: test-check-module-imports.t output changed
Katsunori FUJIWARA - March 10, 2016, 6:08 p.m.
At Thu, 10 Mar 2016 15:35:28 +0000,
Pierre-Yves David wrote:
> 
> On 03/09/2016 04:25 AM, timeless wrote:
> > # HG changeset patch
> > # User timeless <timeless@mozdev.org>
> > # Date 1456936372 0
> > #      Wed Mar 02 16:32:52 2016 +0000
> > # Node ID 2a9a21afd35fbc2cad414078c6ec00ad0157834b
> > # Parent  81f563d9b69385a37f1f45de5be67340dc87f075
> > convert: bzr use absolute_import
> 
> this one make test-check-module-imports.t unhappy, I've dropped it from 
> the clowncopter.
> 
> Timeless, use the following command to get a non-dead version:
> 
>    hg pull -r 5120b551e95f http://hg.netv6.net/marmoute-wip/mercurial/
> 
> --- /home/pyd/src/mercurial-dev/tests/test-check-module-imports.t
> +++ /home/pyd/src/mercurial-dev/tests/test-check-module-imports.t.err
> @@ -142,5 +142,8 @@
>   these may expose other cycles.
> 
>     $ hg locate 'mercurial/**.py' 'hgext/**.py' | sed 's-\\-/-g' | 
> python "$import_checker" -
> +  hgext/convert/bzr.py:29: relative import of stdlib module
> +  hgext/convert/bzr.py:34: relative import of stdlib module
> +  hgext/convert/bzr.py:69: relative import of stdlib module
>     Import cycle: hgext.largefiles.basestore -> 
> hgext.largefiles.localstore -> hgext.largefiles.basestore
>     [1]
> 
> ERROR: test-check-module-imports.t output changed

In my environment (Python 2.6.2 on Linux 2.6.32-5),
test-check-module-import.t reports errors below after this series:

   $ hg locate 'mercurial/**.py' 'hgext/**.py' | sed 's-\\-/-g' | python "$import_checker" -
+  hgext/convert/subversion.py:46: relative import of stdlib module
+  hgext/convert/transport.py:25: stdlib import "svn.client" follows local import: mercurial
+  hgext/convert/transport.py:26: stdlib import "svn.core" follows local import: mercurial
+  hgext/convert/transport.py:27: stdlib import "svn.ra" follows local import: mercurial
   Import cycle: hgext.largefiles.basestore -> hgext.largefiles.localstore -> hgext.largefiles.basestore
   [1]

In addition to it, after "convert: subversion use absolute_import"
change (e5aca467220e on clowncopter), tests for "hg convert svn" below
fail by aborting "No module named transport!" .

    test-convert-svn-move.t
    test-convert-svn-source.t
    test-convert-svn-encoding.t
    test-convert-hg-svn.t
    test-convert-svn-branches.t
    test-convert-svn-startrev.t
    test-convert-svn-tags.t

Does this problem depend on environment ?

> 
> 
> -- 
> Pierre-Yves David
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

----------------------------------------------------------------------
[FUJIWARA Katsunori]                             foozy@lares.dti.ne.jp
Katsunori FUJIWARA - March 11, 2016, 8:52 a.m.
At Fri, 11 Mar 2016 03:08:50 +0900,
FUJIWARA Katsunori wrote:
> 
> At Thu, 10 Mar 2016 15:35:28 +0000,
> Pierre-Yves David wrote:
> > 
> > On 03/09/2016 04:25 AM, timeless wrote:
> > > # HG changeset patch
> > > # User timeless <timeless@mozdev.org>
> > > # Date 1456936372 0
> > > #      Wed Mar 02 16:32:52 2016 +0000
> > > # Node ID 2a9a21afd35fbc2cad414078c6ec00ad0157834b
> > > # Parent  81f563d9b69385a37f1f45de5be67340dc87f075
> > > convert: bzr use absolute_import
> > 
> > this one make test-check-module-imports.t unhappy, I've dropped it from 
> > the clowncopter.
> > 
> > Timeless, use the following command to get a non-dead version:
> > 
> >    hg pull -r 5120b551e95f http://hg.netv6.net/marmoute-wip/mercurial/
> > 
> > --- /home/pyd/src/mercurial-dev/tests/test-check-module-imports.t
> > +++ /home/pyd/src/mercurial-dev/tests/test-check-module-imports.t.err
> > @@ -142,5 +142,8 @@
> >   these may expose other cycles.
> > 
> >     $ hg locate 'mercurial/**.py' 'hgext/**.py' | sed 's-\\-/-g' | 
> > python "$import_checker" -
> > +  hgext/convert/bzr.py:29: relative import of stdlib module
> > +  hgext/convert/bzr.py:34: relative import of stdlib module
> > +  hgext/convert/bzr.py:69: relative import of stdlib module
> >     Import cycle: hgext.largefiles.basestore -> 
> > hgext.largefiles.localstore -> hgext.largefiles.basestore
> >     [1]
> > 
> > ERROR: test-check-module-imports.t output changed
> 
> In my environment (Python 2.6.2 on Linux 2.6.32-5),
> test-check-module-import.t reports errors below after this series:
> 
>    $ hg locate 'mercurial/**.py' 'hgext/**.py' | sed 's-\\-/-g' | python "$import_checker" -
> +  hgext/convert/subversion.py:46: relative import of stdlib module
> +  hgext/convert/transport.py:25: stdlib import "svn.client" follows local import: mercurial
> +  hgext/convert/transport.py:26: stdlib import "svn.core" follows local import: mercurial
> +  hgext/convert/transport.py:27: stdlib import "svn.ra" follows local import: mercurial
>    Import cycle: hgext.largefiles.basestore -> hgext.largefiles.localstore -> hgext.largefiles.basestore
>    [1]
> 
> In addition to it, after "convert: subversion use absolute_import"
> change (e5aca467220e on clowncopter), tests for "hg convert svn" below
> fail by aborting "No module named transport!" .
> 
>     test-convert-svn-move.t
>     test-convert-svn-source.t
>     test-convert-svn-encoding.t
>     test-convert-hg-svn.t
>     test-convert-svn-branches.t
>     test-convert-svn-startrev.t
>     test-convert-svn-tags.t
> 
> Does this problem depend on environment ?

I confirmed that these problems are reproduced also with Python 2.7.x.

I'll post patches for them soon.


> > -- 
> > Pierre-Yves David
> > _______________________________________________
> > Mercurial-devel mailing list
> > Mercurial-devel@mercurial-scm.org
> > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
> 
> ----------------------------------------------------------------------
> [FUJIWARA Katsunori]                             foozy@lares.dti.ne.jp
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
----------------------------------------------------------------------
[FUJIWARA Katsunori]                             foozy@lares.dti.ne.jp

Patch

--- /home/pyd/src/mercurial-dev/tests/test-check-module-imports.t
+++ /home/pyd/src/mercurial-dev/tests/test-check-module-imports.t.err
@@ -142,5 +142,8 @@ 
  these may expose other cycles.

    $ hg locate 'mercurial/**.py' 'hgext/**.py' | sed 's-\\-/-g' | 
python "$import_checker" -
+  hgext/convert/bzr.py:29: relative import of stdlib module
+  hgext/convert/bzr.py:34: relative import of stdlib module
+  hgext/convert/bzr.py:69: relative import of stdlib module
    Import cycle: hgext.largefiles.basestore ->