mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-22 15:37:45 +00:00
update dependencies, minor fixes (#1577)
This commit is contained in:
parent
de65aebfdf
commit
eeec17902f
@ -1,7 +1,5 @@
|
|||||||
from __future__ import absolute_import, print_function, division
|
from __future__ import absolute_import, print_function, division
|
||||||
|
|
||||||
import sys
|
|
||||||
|
|
||||||
from typing import Optional # noqa
|
from typing import Optional # noqa
|
||||||
import typing # noqa
|
import typing # noqa
|
||||||
|
|
||||||
@ -49,12 +47,17 @@ class DumpMaster(flow.FlowMaster):
|
|||||||
self.set_stream_large_bodies(options.stream_large_bodies)
|
self.set_stream_large_bodies(options.stream_large_bodies)
|
||||||
|
|
||||||
if not self.options.no_server and server:
|
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
|
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.",
|
"HTTP/2 is disabled. Use --no-http2 to silence this warning.",
|
||||||
file=sys.stderr)
|
"error"
|
||||||
|
)
|
||||||
|
|
||||||
if options.rfile:
|
if options.rfile:
|
||||||
try:
|
try:
|
||||||
|
@ -5,7 +5,7 @@ ignore = E251,C901
|
|||||||
exclude = mitmproxy/contrib/*,test/mitmproxy/data/*
|
exclude = mitmproxy/contrib/*,test/mitmproxy/data/*
|
||||||
builtins = file,open,basestring,xrange,unicode,long,cmp
|
builtins = file,open,basestring,xrange,unicode,long,cmp
|
||||||
|
|
||||||
[pytest]
|
[tool:pytest]
|
||||||
testpaths = test
|
testpaths = test
|
||||||
addopts = --capture=no --color=yes
|
addopts = --capture=no --color=yes
|
||||||
|
|
||||||
|
6
setup.py
6
setup.py
@ -64,13 +64,13 @@ setup(
|
|||||||
"blinker>=1.4, <1.5",
|
"blinker>=1.4, <1.5",
|
||||||
"click>=6.2, <7.0",
|
"click>=6.2, <7.0",
|
||||||
"certifi>=2015.11.20.1", # no semver here - this should always be on the last release!
|
"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",
|
"construct>=2.5.2, <2.6",
|
||||||
"cryptography>=1.3, <1.6",
|
"cryptography>=1.3, <1.6",
|
||||||
"cssutils>=1.0.1, <1.1",
|
"cssutils>=1.0.1, <1.1",
|
||||||
"Flask>=0.10.1, <0.12",
|
"Flask>=0.10.1, <0.12",
|
||||||
"h2>=2.4.1, <3",
|
"h2>=2.4.1, <3",
|
||||||
"html2text>=2016.1.8, <=2016.5.29",
|
"html2text>=2016.1.8, <=2016.9.19",
|
||||||
"hyperframe>=4.0.1, <5",
|
"hyperframe>=4.0.1, <5",
|
||||||
"jsbeautifier>=1.6.3, <1.7",
|
"jsbeautifier>=1.6.3, <1.7",
|
||||||
"lxml>=3.5.0, <=3.6.0", # no wheels for 3.6.1 yet.
|
"lxml>=3.5.0, <=3.6.0", # no wheels for 3.6.1 yet.
|
||||||
@ -103,7 +103,7 @@ setup(
|
|||||||
'dev': [
|
'dev': [
|
||||||
"tox>=2.3, <3",
|
"tox>=2.3, <3",
|
||||||
"mock>=2.0, <2.1",
|
"mock>=2.0, <2.1",
|
||||||
"pytest>=2.8.7, <3",
|
"pytest>=3, <3.1",
|
||||||
"pytest-cov>=2.2.1, <3",
|
"pytest-cov>=2.2.1, <3",
|
||||||
"pytest-timeout>=1.0.0, <2",
|
"pytest-timeout>=1.0.0, <2",
|
||||||
"pytest-xdist>=1.14, <2",
|
"pytest-xdist>=1.14, <2",
|
||||||
|
@ -3,7 +3,6 @@ from six.moves import cStringIO as StringIO
|
|||||||
|
|
||||||
from mitmproxy import dump, flow, exceptions
|
from mitmproxy import dump, flow, exceptions
|
||||||
from . import tutils, mastertest
|
from . import tutils, mastertest
|
||||||
import mock
|
|
||||||
|
|
||||||
|
|
||||||
class TestDumpMaster(mastertest.MasterTest):
|
class TestDumpMaster(mastertest.MasterTest):
|
||||||
@ -102,8 +101,7 @@ class TestDumpMaster(mastertest.MasterTest):
|
|||||||
|
|
||||||
def test_app(self):
|
def test_app(self):
|
||||||
o = dump.Options(app=True)
|
o = dump.Options(app=True)
|
||||||
s = mock.MagicMock()
|
m = dump.DumpMaster(None, o)
|
||||||
m = dump.DumpMaster(s, o)
|
|
||||||
assert len(m.apps.apps) == 1
|
assert len(m.apps.apps) == 1
|
||||||
|
|
||||||
def test_replacements(self):
|
def test_replacements(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user