aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2016-07-07 01:21:15 -0700
committerMaximilian Hils <git@maximilianhils.com>2016-07-07 01:21:15 -0700
commitf259b9478fb03e816af8abde29ae369342d40e4f (patch)
treebc77a497bdfd11516e91c341a3107f098c384824
parent64ac2c73fe1c10bda9c5ff348e81f6dfaa7439b9 (diff)
downloadmitmproxy-f259b9478fb03e816af8abde29ae369342d40e4f.tar.gz
mitmproxy-f259b9478fb03e816af8abde29ae369342d40e4f.tar.bz2
mitmproxy-f259b9478fb03e816af8abde29ae369342d40e4f.zip
disable harparser on py3
-rw-r--r--examples/har_extractor.py6
-rw-r--r--test/mitmproxy/test_examples.py7
-rw-r--r--tox.ini2
3 files changed, 14 insertions, 1 deletions
diff --git a/examples/har_extractor.py b/examples/har_extractor.py
index d6b50c21..a5c05519 100644
--- a/examples/har_extractor.py
+++ b/examples/har_extractor.py
@@ -60,6 +60,12 @@ def start(context):
suit your actual needs of HAR generation. As it will probably be
necessary to cluster logs by IPs or reset them from time to time.
"""
+ if sys.version_info >= (3, 0):
+ raise RuntimeError(
+ "har_extractor.py does not work on Python 3. "
+ "Please check out https://github.com/mitmproxy/mitmproxy/issues/1320 "
+ "if you want to help making this work again."
+ )
context.dump_file = None
if len(sys.argv) > 1:
context.dump_file = sys.argv[1]
diff --git a/test/mitmproxy/test_examples.py b/test/mitmproxy/test_examples.py
index 22d3c425..206a0366 100644
--- a/test/mitmproxy/test_examples.py
+++ b/test/mitmproxy/test_examples.py
@@ -1,6 +1,7 @@
import glob
import json
import os
+import sys
from contextlib import contextmanager
from mitmproxy import script
@@ -133,6 +134,12 @@ def test_redirect_requests():
def test_har_extractor():
+ if sys.version_info >= (3, 0):
+ with tutils.raises("does not work on Python 3"):
+ with example("har_extractor.py -"):
+ pass
+ return
+
with tutils.raises(script.ScriptException):
with example("har_extractor.py"):
pass
diff --git a/tox.ini b/tox.ini
index 251609a5..6e9aa386 100644
--- a/tox.ini
+++ b/tox.ini
@@ -16,7 +16,7 @@ commands =
[testenv:py35]
setenv =
- TESTS = test/netlib test/pathod/ test/mitmproxy/script test/mitmproxy/test_contentview.py test/mitmproxy/test_custom_contentview.py test/mitmproxy/test_app.py test/mitmproxy/test_controller.py test/mitmproxy/test_fuzzing.py test/mitmproxy/test_script.py test/mitmproxy/test_web_app.py test/mitmproxy/test_utils.py test/mitmproxy/test_stateobject.py test/mitmproxy/test_cmdline.py test/mitmproxy/test_contrib_tnetstring.py test/mitmproxy/test_proxy.py test/mitmproxy/test_protocol_http1.py test/mitmproxy/test_platform_pf.py test/mitmproxy/test_server.py test/mitmproxy/test_filt.py test/mitmproxy/test_flow_export.py test/mitmproxy/test_web_master.py test/mitmproxy/test_flow_format_compat.py
+ TESTS = test/netlib test/pathod/ test/mitmproxy/script test/mitmproxy/test_contentview.py test/mitmproxy/test_custom_contentview.py test/mitmproxy/test_app.py test/mitmproxy/test_controller.py test/mitmproxy/test_fuzzing.py test/mitmproxy/test_script.py test/mitmproxy/test_web_app.py test/mitmproxy/test_utils.py test/mitmproxy/test_stateobject.py test/mitmproxy/test_cmdline.py test/mitmproxy/test_contrib_tnetstring.py test/mitmproxy/test_proxy.py test/mitmproxy/test_protocol_http1.py test/mitmproxy/test_platform_pf.py test/mitmproxy/test_server.py test/mitmproxy/test_filt.py test/mitmproxy/test_flow_export.py test/mitmproxy/test_web_master.py test/mitmproxy/test_flow_format_compat.py test/mitmproxy/test_examples.py
HOME = {envtmpdir}
[testenv:docs]