update dependencies, minor fixes (#1577)

This commit is contained in:
Maximilian Hils 2016-09-24 21:01:48 -07:00 committed by GitHub
parent de65aebfdf
commit eeec17902f
4 changed files with 14 additions and 13 deletions

View File

@ -1,7 +1,5 @@
from __future__ import absolute_import, print_function, division
import sys
from typing import Optional # noqa
import typing # noqa
@ -49,12 +47,17 @@ class DumpMaster(flow.FlowMaster):
self.set_stream_large_bodies(options.stream_large_bodies)
if not self.options.no_server and server:
print("Proxy server listening at http://{}".format(server.address))
self.add_log(
"Proxy server listening at http://{}".format(server.address),
"info"
)
if self.server and self.options.http2 and not tcp.HAS_ALPN: # pragma: no cover
print("ALPN support missing (OpenSSL 1.0.2+ required)!\n"
self.add_log(
"ALPN support missing (OpenSSL 1.0.2+ required)!\n"
"HTTP/2 is disabled. Use --no-http2 to silence this warning.",
file=sys.stderr)
"error"
)
if options.rfile:
try:

View File

@ -5,7 +5,7 @@ ignore = E251,C901
exclude = mitmproxy/contrib/*,test/mitmproxy/data/*
builtins = file,open,basestring,xrange,unicode,long,cmp
[pytest]
[tool:pytest]
testpaths = test
addopts = --capture=no --color=yes

View File

@ -64,13 +64,13 @@ setup(
"blinker>=1.4, <1.5",
"click>=6.2, <7.0",
"certifi>=2015.11.20.1", # no semver here - this should always be on the last release!
"configargparse>=0.10, <0.11",
"configargparse>=0.10, <0.12",
"construct>=2.5.2, <2.6",
"cryptography>=1.3, <1.6",
"cssutils>=1.0.1, <1.1",
"Flask>=0.10.1, <0.12",
"h2>=2.4.1, <3",
"html2text>=2016.1.8, <=2016.5.29",
"html2text>=2016.1.8, <=2016.9.19",
"hyperframe>=4.0.1, <5",
"jsbeautifier>=1.6.3, <1.7",
"lxml>=3.5.0, <=3.6.0", # no wheels for 3.6.1 yet.
@ -103,7 +103,7 @@ setup(
'dev': [
"tox>=2.3, <3",
"mock>=2.0, <2.1",
"pytest>=2.8.7, <3",
"pytest>=3, <3.1",
"pytest-cov>=2.2.1, <3",
"pytest-timeout>=1.0.0, <2",
"pytest-xdist>=1.14, <2",

View File

@ -3,7 +3,6 @@ from six.moves import cStringIO as StringIO
from mitmproxy import dump, flow, exceptions
from . import tutils, mastertest
import mock
class TestDumpMaster(mastertest.MasterTest):
@ -102,8 +101,7 @@ class TestDumpMaster(mastertest.MasterTest):
def test_app(self):
o = dump.Options(app=True)
s = mock.MagicMock()
m = dump.DumpMaster(s, o)
m = dump.DumpMaster(None, o)
assert len(m.apps.apps) == 1
def test_replacements(self):