Mercurial > public > mercurial-scm > hg-stable
diff tests/tinyproxy.py @ 27302:faca4adfed0a
tests: use absolute_import in tinyproxy
Thus begins a series of adding absolute_import to a bunch of files for
Python 3 compatibility.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 06 Dec 2015 22:20:08 -0800 |
parents | 328739ea70c3 |
children | b502138f5faa |
line wrap: on
line diff
--- a/tests/tinyproxy.py Sun Dec 06 22:02:39 2015 -0800 +++ b/tests/tinyproxy.py Sun Dec 06 22:20:08 2015 -0800 @@ -1,5 +1,7 @@ #!/usr/bin/env python +from __future__ import absolute_import + __doc__ = """Tiny HTTP Proxy. This module implements GET, HEAD, POST, PUT and DELETE methods @@ -12,7 +14,12 @@ __version__ = "0.2.1" -import BaseHTTPServer, select, socket, SocketServer, urlparse, os +import BaseHTTPServer +import os +import select +import socket +import SocketServer +import urlparse class ProxyHandler (BaseHTTPServer.BaseHTTPRequestHandler): __base = BaseHTTPServer.BaseHTTPRequestHandler