[PATCH 1 of 2] commandserver: use absolute_import
Gregory Szorc
gregory.szorc at gmail.com
Sun Dec 13 09:19:53 CST 2015
> On Dec 13, 2015, at 06:49, Yuya Nishihara <yuya at tcha.org> wrote:
>
> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1448373520 -32400
> # Tue Nov 24 22:58:40 2015 +0900
> # Node ID d5bbc726e292099326891eedd2e5d1c309d84b8f
> # Parent 1c78ada22f9dc6ede81f2c231cec65d5d77dc45d
> commandserver: use absolute_import
>
Series LGTM and I'd queue it if I could.
> diff --git a/mercurial/commandserver.py b/mercurial/commandserver.py
> --- a/mercurial/commandserver.py
> +++ b/mercurial/commandserver.py
> @@ -5,10 +5,22 @@
> # This software may be used and distributed according to the terms of the
> # GNU General Public License version 2 or any later version.
>
> -from i18n import _
> +from __future__ import absolute_import
> +
> +import SocketServer
> +import errno
> +import os
> import struct
> -import sys, os, errno, traceback, SocketServer
> -import dispatch, encoding, util, error
> +import sys
> +import traceback
> +
> +from .i18n import _
> +from . import (
> + dispatch,
> + encoding,
> + error,
> + util,
> +)
>
> logfile = None
>
> diff --git a/tests/test-check-py3-compat.t b/tests/test-check-py3-compat.t
> --- a/tests/test-check-py3-compat.t
> +++ b/tests/test-check-py3-compat.t
> @@ -101,7 +101,6 @@
> mercurial/byterange.py not using absolute_import
> mercurial/cmdutil.py not using absolute_import
> mercurial/commands.py not using absolute_import
> - mercurial/commandserver.py not using absolute_import
> mercurial/context.py not using absolute_import
> mercurial/dirstate.py not using absolute_import
> mercurial/dispatch.py requires print_function
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list