diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-04-21 17:11:28 -0700 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2016-04-21 17:11:28 -0700 |
commit | 028f5c4929a8775d5211d4f73c0d52808dccbf6b (patch) | |
tree | 209547fea125f310992cfed717cfe9ccc4dcdb7e | |
parent | 49d1bcc8a237e56d9adef62ea0fce35ae3d4b1e8 (diff) | |
download | mitmproxy-028f5c4929a8775d5211d4f73c0d52808dccbf6b.tar.gz mitmproxy-028f5c4929a8775d5211d4f73c0d52808dccbf6b.tar.bz2 mitmproxy-028f5c4929a8775d5211d4f73c0d52808dccbf6b.zip |
downgrade pyparsing to fix #1087 and #1090
-rw-r--r-- | setup.py | 2 | ||||
-rw-r--r-- | test/mitmproxy/test_filt.py | 12 |
2 files changed, 10 insertions, 4 deletions
@@ -76,7 +76,7 @@ setup( "passlib>=1.6.5, <1.7", "pyasn1>=0.1.9, <0.2", "pyOpenSSL>=16.0, <17.0", - "pyparsing>=2.1,<2.2", + "pyparsing>=2.0,<2.1", # 2.1.1 breaks our binaries, see https://sourceforge.net/p/pyparsing/bugs/93/ "pyperclip>=1.5.22, <1.6", "requests>=2.9.1, <2.10", "six>=1.10, <1.11", diff --git a/test/mitmproxy/test_filt.py b/test/mitmproxy/test_filt.py index 4401f2be..9fe36b2a 100644 --- a/test/mitmproxy/test_filt.py +++ b/test/mitmproxy/test_filt.py @@ -1,8 +1,6 @@ from six.moves import cStringIO as StringIO from mitmproxy import filt -from mitmproxy.models import Error -from mitmproxy.models import http -from netlib.http import Headers +from mock import patch from . import tutils @@ -247,3 +245,11 @@ class TestMatching: assert self.q("! ~c 201", s) assert self.q("!~c 201 !~c 202", s) assert not self.q("!~c 201 !~c 200", s) + + +@patch('traceback.extract_tb') +def test_pyparsing_bug(extract_tb): + """https://github.com/mitmproxy/mitmproxy/issues/1087""" + # The text is a string with leading and trailing whitespace stripped; if the source is not available it is None. + extract_tb.return_value = [("", 1, "test", None)] + assert filt.parse("test") |