Patchwork [1,of,8] py3: make contrib/check-commit use absolute_import

login
register
mail settings
Submitter Yuya Nishihara
Date May 15, 2016, 1:10 p.m.
Message ID <20160515221025.5bb26436@mimosa>
Download mbox | patch
Permalink /patch/15116/
State Accepted
Headers show

Comments

Yuya Nishihara - May 15, 2016, 1:10 p.m.
On Thu, 12 May 2016 15:54:54 -0500, Pulkit Goyal wrote:
> # HG changeset patch
> # User Pulkit Goyal <7895pulkit@gmail.com>
> # Date 1463085717 -19800
> #      Fri May 13 02:11:57 2016 +0530
> # Node ID b203e6318c6e6bce968d41990efebc8c17ca49ec
> # Parent  df838803c1d487e4601f96c6cfd85e6ad4f6291f
> py3: make contrib/check-commit use absolute_import

Pushing 1, 2, 3, 4, and 8 to the committed repo, thanks.

I have a couple of fixes on import-checker and it reported problems for
the other patches:

% ./run-tests.py -l test-check-module-imports.t test-check-pyflakes.t
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

--- /home/yuya/work/hghacks/mercurial-work/tests/test-check-module-imports.t
+++ /home/yuya/work/hghacks/mercurial-work/tests/test-check-module-imports.t.err
@@ -178,5 +178,11 @@ 
   > -X tests/test-hgweb-no-request-uri.t \
   > -X tests/test-hgweb-non-interactive.t \
   > | sed 's-\\-/-g' | python "$import_checker" -
+  contrib/hg-ssh:37: stdlib import "os" follows local import: mercurial
+  contrib/hg-ssh:38: stdlib import "shlex" follows local import: mercurial
+  contrib/hg-ssh:39: stdlib import "sys" follows local import: mercurial
+  contrib/hgperf:59: direct symbol import disptach from mercurial
+  contrib/simplemerge:8: stdlib import "sys" follows local import: mercurial
+  contrib/simplemerge:9: symbol import follows non-symbol import: mercurial.i18n
   Import cycle: hgext.largefiles.basestore -> hgext.largefiles.localstore -> hgext.largefiles.basestore
   [1]

ERROR: test-check-module-imports.t output changed
!
--- /home/yuya/work/hghacks/mercurial-work/tests/test-check-pyflakes.t
+++ /home/yuya/work/hghacks/mercurial-work/tests/test-check-pyflakes.t.err
@@ -7,6 +7,12 @@ 
 
   $ hg locate 'set:**.py or grep("^#!.*python")' 2>/dev/null \
   > | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py"
+  contrib/hgperf:59: 'mercurial.disptach' imported but unused
+  contrib/hgperf:59: 'mercurial.util' imported but unused
+  contrib/hgperf:89: undefined name 'mercurial'
+  contrib/hgperf:99: undefined name 'mercurial'
+  contrib/hgperf:102: undefined name 'mercurial'
+  contrib/hgperf:104: undefined name 'mercurial'
   tests/filterpyflakes.py:61: undefined name 'undefinedname'
_______________________________________________
Mercurial-devel mailing list