# HG changeset patch # User Gregory Szorc # Date 2015-12-13 07:19:38 # Node ID 6daa795ed32ff589ae745f8b2dfd6edba09b21e6 # Parent a56c47ed3885c930c4bff97898eeb933c5279b68 windows: use absolute_import diff --git a/mercurial/windows.py b/mercurial/windows.py --- a/mercurial/windows.py +++ b/mercurial/windows.py @@ -5,11 +5,23 @@ # 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 _ -import osutil, encoding -import errno, msvcrt, os, re, stat, sys, _winreg +from __future__ import absolute_import +import _winreg +import errno +import msvcrt +import os +import re +import stat +import sys import win32 + +from .i18n import _ +from . import ( + encoding, + osutil, +) + executablepath = win32.executablepath getuser = win32.getuser hidewindow = win32.hidewindow 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 @@ -127,7 +127,6 @@ mercurial/scmutil.py not using absolute_import mercurial/scmwindows.py not using absolute_import mercurial/store.py not using absolute_import - mercurial/windows.py not using absolute_import setup.py not using absolute_import tests/filterpyflakes.py requires print_function tests/generate-working-copy-states.py requires print_function