Patchwork [9,of,9] hghave: replace relative import of docutils.core

login
register
mail settings
Submitter Yuya Nishihara
Date April 4, 2016, 3:07 p.m.
Message ID <81c7b0cd9a77864ce4f1.1459782462@mimosa>
Download mbox | patch
Permalink /patch/14354/
State Accepted
Delegated to: Martin von Zweigbergk
Headers show

Comments

Yuya Nishihara - April 4, 2016, 3:07 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1459680449 -32400
#      Sun Apr 03 19:47:29 2016 +0900
# Node ID 81c7b0cd9a77864ce4f14d405878ed9636a97fde
# Parent  2f683be2ecc2c168da0323391418749ff90c3155
hghave: replace relative import of docutils.core
via Mercurial-devel - April 4, 2016, 5:33 p.m.
Queued, thanks!

On Mon, Apr 4, 2016 at 8:07 AM, Yuya Nishihara <yuya@tcha.org> wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1459680449 -32400
> #      Sun Apr 03 19:47:29 2016 +0900
> # Node ID 81c7b0cd9a77864ce4f14d405878ed9636a97fde
> # Parent  2f683be2ecc2c168da0323391418749ff90c3155
> hghave: replace relative import of docutils.core
>
> diff --git a/tests/hghave.py b/tests/hghave.py
> --- a/tests/hghave.py
> +++ b/tests/hghave.py
> @@ -267,8 +267,8 @@ def has_git():
>  @check("docutils", "Docutils text processing library")
>  def has_docutils():
>      try:
> -        from docutils.core import publish_cmdline
> -        publish_cmdline # silence unused import
> +        import docutils.core
> +        docutils.core.publish_cmdline # silence unused import
>          return True
>      except ImportError:
>          return False
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -267,8 +267,8 @@  def has_git():
 @check("docutils", "Docutils text processing library")
 def has_docutils():
     try:
-        from docutils.core import publish_cmdline
-        publish_cmdline # silence unused import
+        import docutils.core
+        docutils.core.publish_cmdline # silence unused import
         return True
     except ImportError:
         return False