Mercurial > hg
diff mercurial/hgweb/server.py @ 27046:37fcfe52c68c
hgweb: use absolute_import
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 31 Oct 2015 22:07:40 +0900 |
parents | d962e955da08 |
children | 032c4c2f802a |
line wrap: on
line diff
--- a/mercurial/hgweb/server.py Sun Nov 01 15:09:35 2015 +0900 +++ b/mercurial/hgweb/server.py Sat Oct 31 22:07:40 2015 +0900 @@ -6,10 +6,27 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. -import os, sys, errno, urllib, BaseHTTPServer, socket, SocketServer, traceback -from mercurial import util, error -from mercurial.hgweb import common -from mercurial.i18n import _ +from __future__ import absolute_import + +import BaseHTTPServer +import SocketServer +import errno +import os +import socket +import sys +import traceback +import urllib + +from ..i18n import _ + +from .. import ( + error, + util, +) + +from . import ( + common, +) def _splitURI(uri): """Return path and query that has been split from uri @@ -219,8 +236,8 @@ self.wfile = socket._fileobject(self.request, "wb", self.wbufsize) try: - from threading import activeCount - activeCount() # silence pyflakes + import threading + threading.activeCount() # silence pyflakes and bypass demandimport _mixin = SocketServer.ThreadingMixIn except ImportError: if util.safehasattr(os, "fork"):