bump dependencies
This commit is contained in:
parent
544f859925
commit
2fb2b48a06
|
@ -42,7 +42,7 @@ def safecall():
|
|||
yield
|
||||
except (exceptions.AddonHalt, exceptions.OptionsError):
|
||||
raise
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
etype, value, tb = sys.exc_info()
|
||||
tb = cut_traceback(tb, "invoke_addon")
|
||||
ctx.log.error(
|
||||
|
|
|
@ -53,7 +53,7 @@ class Core:
|
|||
if "body_size_limit" in updated:
|
||||
try:
|
||||
human.parse_size(opts.body_size_limit)
|
||||
except ValueError as e:
|
||||
except ValueError:
|
||||
raise exceptions.OptionsError(
|
||||
"Invalid body size limit specification: %s" %
|
||||
opts.body_size_limit
|
||||
|
|
|
@ -152,7 +152,7 @@ class ProxyAuth:
|
|||
p = ctx.options.proxyauth[1:]
|
||||
try:
|
||||
self.htpasswd = passlib.apache.HtpasswdFile(p)
|
||||
except (ValueError, OSError) as v:
|
||||
except (ValueError, OSError):
|
||||
raise exceptions.OptionsError(
|
||||
"Could not open htpasswd file: %s" % p
|
||||
)
|
||||
|
|
|
@ -103,7 +103,7 @@ orders = [
|
|||
]
|
||||
|
||||
|
||||
class View(collections.Sequence):
|
||||
class View(collections.abc.Sequence):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self._store = collections.OrderedDict()
|
||||
|
@ -638,7 +638,7 @@ class Focus:
|
|||
self.flow = flow
|
||||
|
||||
|
||||
class Settings(collections.Mapping):
|
||||
class Settings(collections.abc.Mapping):
|
||||
def __init__(self, view: View) -> None:
|
||||
self.view = view
|
||||
self._values: typing.MutableMapping[str, typing.Dict] = {}
|
||||
|
|
|
@ -84,13 +84,14 @@ class Master:
|
|||
exc = None
|
||||
try:
|
||||
loop()
|
||||
except Exception as e: # pragma: no cover
|
||||
except Exception: # pragma: no cover
|
||||
exc = traceback.format_exc()
|
||||
finally:
|
||||
if not self.should_exit.is_set(): # pragma: no cover
|
||||
self.shutdown()
|
||||
loop = asyncio.get_event_loop()
|
||||
for p in asyncio.Task.all_tasks():
|
||||
tasks = asyncio.all_tasks(loop) if sys.version_info >= (3, 7) else asyncio.Task.all_tasks(loop)
|
||||
for p in tasks:
|
||||
p.cancel()
|
||||
loop.close()
|
||||
|
||||
|
|
|
@ -642,7 +642,7 @@ class Http2SingleStreamLayer(httpbase._HttpTransmissionLayer, basethread.BaseThr
|
|||
|
||||
try:
|
||||
layer()
|
||||
except exceptions.Http2ZombieException as e: # pragma: no cover
|
||||
except exceptions.Http2ZombieException: # pragma: no cover
|
||||
pass
|
||||
except exceptions.ProtocolException as e: # pragma: no cover
|
||||
self.log(repr(e), "info")
|
||||
|
|
|
@ -134,7 +134,7 @@ def run(
|
|||
except exceptions.OptionsError as e:
|
||||
print("%s: %s" % (sys.argv[0], e), file=sys.stderr)
|
||||
sys.exit(1)
|
||||
except (KeyboardInterrupt, RuntimeError) as e:
|
||||
except (KeyboardInterrupt, RuntimeError):
|
||||
pass
|
||||
return master
|
||||
|
||||
|
|
|
@ -279,7 +279,7 @@ class BuildEnviron:
|
|||
if self.tag.startswith("v"):
|
||||
try:
|
||||
parver.Version.parse(self.tag[1:], strict=True)
|
||||
except parver.ParseError as e:
|
||||
except parver.ParseError:
|
||||
return self.tag
|
||||
return self.tag[1:]
|
||||
return self.tag
|
||||
|
|
|
@ -21,7 +21,8 @@ RUN addgroup -S mitmproxy && adduser -S -G mitmproxy mitmproxy \
|
|||
openssl-dev \
|
||||
python3 \
|
||||
python3-dev \
|
||||
&& python3 -m ensurepip \
|
||||
&& python3 -m ensurepip --upgrade \
|
||||
&& pip3 install -U pip \
|
||||
&& LDFLAGS=-L/lib pip3 install -U /home/mitmproxy/${WHEEL_BASENAME_MITMPROXY} \
|
||||
&& apk del --purge \
|
||||
git \
|
||||
|
|
|
@ -23,7 +23,8 @@ RUN addgroup -S mitmproxy && adduser -S -G mitmproxy mitmproxy \
|
|||
openssl-dev \
|
||||
python3 \
|
||||
python3-dev \
|
||||
&& python3 -m ensurepip \
|
||||
&& python3 -m ensurepip --upgrade \
|
||||
&& pip3 install -U pip \
|
||||
&& LDFLAGS=-L/lib pip3 install -U /home/mitmproxy/${WHEEL_BASENAME_MITMPROXY} \
|
||||
&& apk del --purge \
|
||||
git \
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[flake8]
|
||||
max-line-length = 140
|
||||
max-complexity = 25
|
||||
ignore = E251,C901,W503,W292,E722,E741
|
||||
ignore = E251,E252,C901,W292,W503,W504,W605,E722,E741
|
||||
exclude = mitmproxy/contrib/*,test/mitmproxy/data/*,release/build/*,mitmproxy/io/proto/*
|
||||
addons = file,open,basestring,xrange,unicode,long,cmp
|
||||
|
||||
|
|
14
setup.py
14
setup.py
|
@ -65,7 +65,7 @@ setup(
|
|||
"brotlipy>=0.7.0,<0.8",
|
||||
"certifi>=2015.11.20.1", # no semver here - this should always be on the last release!
|
||||
"click>=6.2, <7",
|
||||
"cryptography>=2.1.4,<2.4",
|
||||
"cryptography>=2.1.4,<2.5",
|
||||
"h2>=3.0.1,<4",
|
||||
"hyperframe>=5.1.0,<6",
|
||||
"kaitaistruct>=0.7,<0.9",
|
||||
|
@ -74,9 +74,9 @@ setup(
|
|||
"protobuf>=3.6.0, <3.7",
|
||||
"pyasn1>=0.3.1,<0.5",
|
||||
"pyOpenSSL>=17.5,<18.1",
|
||||
"pyparsing>=2.1.3, <2.3",
|
||||
"pyperclip>=1.6.0, <1.7",
|
||||
"ruamel.yaml>=0.13.2, <0.15.55",
|
||||
"pyparsing>=2.1.3,<2.4",
|
||||
"pyperclip>=1.6.0,<1.8",
|
||||
"ruamel.yaml>=0.15,<0.16",
|
||||
"sortedcontainers>=1.5.4,<2.1",
|
||||
"tornado>=4.3,<5.2",
|
||||
"urwid>=2.0.1,<2.1",
|
||||
|
@ -88,7 +88,7 @@ setup(
|
|||
],
|
||||
'dev': [
|
||||
"asynctest>=0.12.0",
|
||||
"flake8>=3.5, <3.6",
|
||||
"flake8>=3.5,<3.7",
|
||||
"Flask>=1.0,<1.1",
|
||||
"mypy>=0.590,<0.591",
|
||||
"parver>=0.1,<2.0",
|
||||
|
@ -97,9 +97,9 @@ setup(
|
|||
"pytest-faulthandler>=1.3.1,<2",
|
||||
"pytest-timeout>=1.2.1,<2",
|
||||
"pytest-xdist>=1.22,<2",
|
||||
"pytest>=3.3,<4",
|
||||
"pytest>=4.0,<5",
|
||||
"requests>=2.9.1, <3",
|
||||
"tox>=3.0,<3.2",
|
||||
"tox>=3.5,<3.6",
|
||||
"rstcheck>=2.2, <4.0",
|
||||
],
|
||||
'examples': [
|
||||
|
|
|
@ -30,8 +30,8 @@ def data():
|
|||
|
||||
|
||||
@pytest.fixture
|
||||
def corrupt_data():
|
||||
f = data()
|
||||
def corrupt_data(data):
|
||||
f = io.BytesIO(data.getvalue())
|
||||
f.seek(0, io.SEEK_END)
|
||||
f.write(b"qibble")
|
||||
f.seek(0)
|
||||
|
|
|
@ -75,7 +75,7 @@ class TestHeaders:
|
|||
|
||||
def test_replace_multi(self):
|
||||
headers = self._2host()
|
||||
headers.replace(r"Host: example\.com", r"Host: example.de")
|
||||
headers.replace(r"Host: example.com", r"Host: example.de")
|
||||
assert headers.get_all("Host") == ["example.de", "example.org"]
|
||||
|
||||
def test_replace_remove_spacer(self):
|
||||
|
|
|
@ -49,7 +49,7 @@ class TestHTTPRequest:
|
|||
r.path = "path/foo"
|
||||
r.headers["Foo"] = "fOo"
|
||||
r.content = b"afoob"
|
||||
assert r.replace("foo(?i)", "boo") == 4
|
||||
assert r.replace("(?i)foo", "boo") == 4
|
||||
assert r.path == "path/boo"
|
||||
assert b"foo" not in r.content
|
||||
assert r.headers["boo"] == "boo"
|
||||
|
@ -82,7 +82,7 @@ class TestHTTPResponse:
|
|||
r = http.HTTPResponse.wrap(mitmproxy.test.tutils.tresp())
|
||||
r.headers["Foo"] = "fOo"
|
||||
r.content = b"afoob"
|
||||
assert r.replace("foo(?i)", "boo") == 3
|
||||
assert r.replace("(?i)foo", "boo") == 3
|
||||
assert b"foo" not in r.content
|
||||
assert r.headers["boo"] == "boo"
|
||||
|
||||
|
|
Loading…
Reference in New Issue