Patchwork [1,of,8] py3: make doc/docchecker use absolute_import

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

Comments

Yuya Nishihara - May 15, 2016, 1:19 p.m.
On Thu, 12 May 2016 16:28:54 -0500, Pulkit Goyal wrote:
> # HG changeset patch
> # User Pulkit Goyal <7895pulkit@gmail.com>
> # Date 1463087439 -19800
> #      Fri May 13 02:40:39 2016 +0530
> # Node ID edaa549fd32eb620beb255e979019ee91bb0d414
> # Parent  df838803c1d487e4601f96c6cfd85e6ad4f6291f
> py3: make doc/docchecker use absolute_import

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

My import-checker reported problems for the patch 3, and the patch 4 breaks
everything.

% ./run-tests.py -l test-check-module-imports.t test-check-pyflakes.t

Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Yuya Nishihara - May 16, 2016, 12:55 p.m.
On Sun, 15 May 2016 19:47:22 +0530, Pulkit Goyal wrote:
> > My import-checker reported problems for the patch 3, and the patch 4 breaks
> > everything.  
> 
> Breaks everything?

Yep.

% ./hg
Traceback (most recent call last):
  File "./hg", line 45, in <module>
    mercurial.util.setbinary(fp)
NameError: name 'mercurial' is not defined

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,9 @@ 
   > -X tests/test-hgweb-no-request-uri.t \
   > -X tests/test-hgweb-non-interactive.t \
   > | sed 's-\\-/-g' | python "$import_checker" -
+  doc/runrst:19: relative import of stdlib module
+  doc/runrst:20: relative import of stdlib module
+  doc/runrst:21: relative import of stdlib module
   Import cycle: hgext.largefiles.basestore -> hgext.largefiles.localstore -> hgext.largefiles.basestore
   [1]
_______________________________________________