diff --git a/docs/conf.py b/docs/conf.py index e1cbc4976..ce942aa94 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -5,7 +5,7 @@ import subprocess import sys sys.path.insert(0, os.path.abspath('..')) -import netlib.version +from mitmproxy import version extensions = [ @@ -47,9 +47,9 @@ author = u'The mitmproxy project' # built documents. # # The short X.Y version. -version = netlib.version.VERSION +version = version.VERSION # The full version, including alpha/beta/rc tags. -release = netlib.version.VERSION +release = version.VERSION # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/examples/har_dump.py b/examples/har_dump.py index 95090edb1..deed2e70a 100644 --- a/examples/har_dump.py +++ b/examples/har_dump.py @@ -14,7 +14,7 @@ import pytz import mitmproxy -from netlib import version +from mitmproxy import version from netlib import strutils from netlib.http import cookies diff --git a/mitmproxy/addons/wsgiapp.py b/mitmproxy/addons/wsgiapp.py index d83a1e2ec..0879a87be 100644 --- a/mitmproxy/addons/wsgiapp.py +++ b/mitmproxy/addons/wsgiapp.py @@ -2,7 +2,7 @@ from mitmproxy import ctx from mitmproxy import exceptions from netlib import wsgi -from netlib import version +from mitmproxy import version class WSGIApp: diff --git a/mitmproxy/flow.py b/mitmproxy/flow.py index 13b852efb..2fb7ace0b 100644 --- a/mitmproxy/flow.py +++ b/mitmproxy/flow.py @@ -4,8 +4,8 @@ import uuid from mitmproxy import stateobject from mitmproxy import connections +from mitmproxy import version -from netlib import version from typing import Optional # noqa diff --git a/mitmproxy/http.py b/mitmproxy/http.py index 7fe70f9bd..4474ca3be 100644 --- a/mitmproxy/http.py +++ b/mitmproxy/http.py @@ -2,7 +2,7 @@ import cgi from mitmproxy import flow from netlib import http -from netlib import version +from mitmproxy import version from netlib import tcp diff --git a/mitmproxy/io_compat.py b/mitmproxy/io_compat.py index fc190e2fd..7f8f41b38 100644 --- a/mitmproxy/io_compat.py +++ b/mitmproxy/io_compat.py @@ -4,7 +4,8 @@ This module handles the import of mitmproxy flows generated by old versions. from typing import Any -from netlib import version, strutils +from mitmproxy import version +from netlib import strutils def convert_011_012(data): diff --git a/mitmproxy/tools/cmdline.py b/mitmproxy/tools/cmdline.py index ddc4a5cef..41770631d 100644 --- a/mitmproxy/tools/cmdline.py +++ b/mitmproxy/tools/cmdline.py @@ -7,7 +7,7 @@ from mitmproxy import options from mitmproxy import platform from netlib import human from netlib import tcp -from netlib import version +from mitmproxy import version class ParseException(Exception): diff --git a/mitmproxy/tools/console/help.py b/mitmproxy/tools/console/help.py index 752ebf008..dda8bfbc9 100644 --- a/mitmproxy/tools/console/help.py +++ b/mitmproxy/tools/console/help.py @@ -6,7 +6,7 @@ from mitmproxy import flowfilter from mitmproxy.tools.console import common from mitmproxy.tools.console import signals -from netlib import version +from mitmproxy import version footer = [ ("heading", 'mitmproxy {} (Python {}) '.format(version.VERSION, platform.python_version())), diff --git a/mitmproxy/tools/web/app.py b/mitmproxy/tools/web/app.py index 89b421868..41701d36b 100644 --- a/mitmproxy/tools/web/app.py +++ b/mitmproxy/tools/web/app.py @@ -15,7 +15,7 @@ from mitmproxy import flow from mitmproxy import http from mitmproxy import contentviews from mitmproxy import io -from netlib import version +from mitmproxy import version def convert_flow_to_json_dict(flow: flow.Flow) -> dict: diff --git a/netlib/version.py b/mitmproxy/version.py similarity index 100% rename from netlib/version.py rename to mitmproxy/version.py diff --git a/netlib/debug.py b/netlib/debug.py index f1b3d7922..147fe4b13 100644 --- a/netlib/debug.py +++ b/netlib/debug.py @@ -6,7 +6,7 @@ import signal import platform import traceback -from netlib import version +from mitmproxy import version from OpenSSL import SSL diff --git a/pathod/pathoc_cmdline.py b/pathod/pathoc_cmdline.py index ab330505b..2b4b9f9ce 100644 --- a/pathod/pathoc_cmdline.py +++ b/pathod/pathoc_cmdline.py @@ -4,7 +4,7 @@ import os import os.path from netlib import tcp -from netlib import version +from mitmproxy import version from netlib.http import user_agents from . import pathoc, language diff --git a/pathod/pathod.py b/pathod/pathod.py index 0f659d401..3692ceff2 100644 --- a/pathod/pathod.py +++ b/pathod/pathod.py @@ -7,7 +7,7 @@ import threading from netlib import tcp from netlib import certutils from netlib import websockets -from netlib import version +from mitmproxy import version import urllib from netlib.exceptions import HttpException, HttpReadDisconnect, TcpTimeout, TcpDisconnect, \ diff --git a/pathod/pathod_cmdline.py b/pathod/pathod_cmdline.py index 3531b8f3e..e467ef308 100644 --- a/pathod/pathod_cmdline.py +++ b/pathod/pathod_cmdline.py @@ -6,7 +6,7 @@ import re from netlib import tcp from netlib import human -from netlib import version +from mitmproxy import version from . import pathod diff --git a/pathod/protocols/http.py b/pathod/protocols/http.py index 179303206..0822e8644 100644 --- a/pathod/protocols/http.py +++ b/pathod/protocols/http.py @@ -1,4 +1,4 @@ -from netlib import version +from mitmproxy import version from netlib.exceptions import TlsException from netlib.http import http1 from .. import language diff --git a/setup.py b/setup.py index f856ff7ae..9981ea6cf 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages from codecs import open import os -from netlib import version +from mitmproxy import version # Based on https://github.com/pypa/sampleproject/blob/master/setup.py # and https://python-packaging-user-guide.readthedocs.org/