Patchwork [1,of,7] acl: use absolute_import

login
register
mail settings
Submitter Gregory Szorc
Date Feb. 10, 2016, 1:52 a.m.
Message ID <1d08873cd79736b708c7.1455069156@7.1.168.192.in-addr.arpa>
Download mbox | patch
Permalink /patch/13080/
State Accepted
Delegated to: Martin von Zweigbergk
Headers show

Comments

Gregory Szorc - Feb. 10, 2016, 1:52 a.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1455067779 28800
#      Tue Feb 09 17:29:39 2016 -0800
# Node ID 1d08873cd79736b708c7fdd601af5e43ffb1b289
# Parent  a036e1ae1fbe88ab99cb861ebfc2e4da7a3912ca
acl: use absolute_import

Continuing the march towards Python 3.

Patch

diff --git a/hgext/acl.py b/hgext/acl.py
--- a/hgext/acl.py
+++ b/hgext/acl.py
@@ -190,11 +190,19 @@  3) Deny access to a file to anyone but u
   /misty/mountains/cave/ring = !gollum
 
 '''
 
+from __future__ import absolute_import
+
+import getpass
+import urllib
+
 from mercurial.i18n import _
-from mercurial import util, match, error
-import getpass, urllib
+from mercurial import (
+    error,
+    match,
+    util,
+)
 
 # Note for extension authors: ONLY specify testedwith = 'internal' for
 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
 # be specifying the version(s) of Mercurial they are tested with, or
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
@@ -31,9 +31,8 @@ 
   doc/check-seclevel.py not using absolute_import
   doc/gendoc.py not using absolute_import
   doc/hgmanpage.py not using absolute_import
   hgext/__init__.py not using absolute_import
-  hgext/acl.py not using absolute_import
   hgext/blackbox.py not using absolute_import
   hgext/bugzilla.py not using absolute_import
   hgext/censor.py not using absolute_import
   hgext/children.py not using absolute_import