about summary refs log tree commit diff
path: root/pkgs/tools/networking
diff options
context:
space:
mode:
authorrnhmjoj <rnhmjoj@inventati.org>2020-04-17 22:18:59 +0200
committerrnhmjoj <rnhmjoj@inventati.org>2020-04-19 11:19:36 +0200
commit55d52851a6c650b2ce45d0752ed93b1de57e253a (patch)
tree60a321a8dfecaee618ff75aa5ed68d88cf597b8a /pkgs/tools/networking
parenta3e64e81fcf4cc597138f4b89d81ffe84195c4f7 (diff)
downloadnixlib-55d52851a6c650b2ce45d0752ed93b1de57e253a.tar
nixlib-55d52851a6c650b2ce45d0752ed93b1de57e253a.tar.gz
nixlib-55d52851a6c650b2ce45d0752ed93b1de57e253a.tar.bz2
nixlib-55d52851a6c650b2ce45d0752ed93b1de57e253a.tar.lz
nixlib-55d52851a6c650b2ce45d0752ed93b1de57e253a.tar.xz
nixlib-55d52851a6c650b2ce45d0752ed93b1de57e253a.tar.zst
nixlib-55d52851a6c650b2ce45d0752ed93b1de57e253a.zip
mitmproxy: 4.0.4 -> 5.1.1
Diffstat (limited to 'pkgs/tools/networking')
-rw-r--r--pkgs/tools/networking/mitmproxy/default.nix50
-rw-r--r--pkgs/tools/networking/mitmproxy/pytest5.patch31
2 files changed, 11 insertions, 70 deletions
diff --git a/pkgs/tools/networking/mitmproxy/default.nix b/pkgs/tools/networking/mitmproxy/default.nix
index 7a623ab69a68..b9d873fad6af 100644
--- a/pkgs/tools/networking/mitmproxy/default.nix
+++ b/pkgs/tools/networking/mitmproxy/default.nix
@@ -4,47 +4,15 @@ with python3Packages;
 
 buildPythonPackage rec {
   pname = "mitmproxy";
-  version = "4.0.4";
+  version = "5.1.1";
 
   src = fetchFromGitHub {
     owner  = pname;
     repo   = pname;
     rev    = "v${version}";
-    sha256 = "14i9dkafvyl15rq2qa8xldscn5lmkk2g52kbi2hl63nzx9yibx6r";
+    sha256 = "1lirlckpvd3c6s6q3p32w4k4yfna5mlgr1x9g39lhzzq0sdiz3lk";
   };
 
-  patches = [
-    (fetchpatch {
-      # Tests failed due to expired test certificates,
-      # https://github.com/mitmproxy/mitmproxy/issues/3316
-      # TODO: remove on next update
-      name = "test-certificates.patch";
-      url = "https://github.com/mitmproxy/mitmproxy/commit/1b6a8d6acd3d70f9b9627ad4ae9def08103f8250.patch";
-      sha256 = "03y79c25yir7d8xj79czdc81y3irqq1i3ks9ca0mv1az8b7xsvfv";
-    })
-    (fetchpatch {
-      # 0.13 <= wsproto < 0.14 patch
-      # https://github.com/mitmproxy/mitmproxy/issues/3459
-      # TODO: remove on next update
-      name = "wsproto-0.13.patch";
-      url = "https://github.com/mitmproxy/mitmproxy/commit/70777a1b6ed64af9cafcdef223a8a260ecc96864.patch";
-      sha256 = "1ddxdr7js510kzyq3gyks4k5k1n8zb1i9amxw7wzmi1dcg8kqw9a";
-      # We strip these bounds anyway
-      excludes = [ "setup.py" ];
-    })
-    (fetchpatch {
-      # Fix for newer pytest disallowing calling fixtures
-      # https://github.com/mitmproxy/mitmproxy/issues/3403
-      # TODO: remove on next update
-      name = "dont-call-fixtures.patch";
-      url = "https://github.com/mitmproxy/mitmproxy/commit/ce28721458c8cc71de86513a5110676e9763041b.patch";
-      sha256 = "05pljr28lx7l1xgswqr9sz8dnhvc7npzh8xg2p9hignf159kd54d";
-      # Irrelevant in nixpkgs
-      excludes = [ "setup.py" "setup.cfg" "release/docker/*" ];
-    })
-    ./pytest5.patch
-  ];
-
   postPatch = ''
     # remove dependency constraints
     sed 's/>=\([0-9]\.\?\)\+\( \?, \?<\([0-9]\.\?\)\+\)\?//' -i setup.py
@@ -61,17 +29,21 @@ buildPythonPackage rec {
   '';
 
   propagatedBuildInputs = [
-    blinker click certifi cryptography
-    h2 hyperframe kaitaistruct passlib
-    pyasn1 pyopenssl pyparsing pyperclip
-    ruamel_yaml tornado urwid brotlipy
-    sortedcontainers ldap3 wsproto setuptools
+    blinker brotli certifi cffi
+    click cryptography flask h11
+    h2 hpack hyperframe itsdangerous
+    jinja2 kaitaistruct ldap3 markupsafe
+    passlib protobuf publicsuffix2 pyasn1
+    pycparser pyopenssl pyparsing pyperclip
+    ruamel_yaml setuptools six sortedcontainers
+    tornado urwid werkzeug wsproto zstandard
   ];
 
   checkInputs = [
     beautifulsoup4 flask pytest
     requests glibcLocales
     asynctest parver pytest-asyncio
+    hypothesis
   ];
 
   meta = with stdenv.lib; {
diff --git a/pkgs/tools/networking/mitmproxy/pytest5.patch b/pkgs/tools/networking/mitmproxy/pytest5.patch
deleted file mode 100644
index bfbf7253b9c4..000000000000
--- a/pkgs/tools/networking/mitmproxy/pytest5.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-diff --git a/test/mitmproxy/net/test_tls.py b/test/mitmproxy/net/test_tls.py
-index 489bf89f..c78472e3 100644
---- a/test/mitmproxy/net/test_tls.py
-+++ b/test/mitmproxy/net/test_tls.py
-@@ -87,14 +87,16 @@ def test_get_client_hello():
-     rfile = io.BufferedReader(io.BytesIO(
-         FULL_CLIENT_HELLO_NO_EXTENSIONS[:30]
-     ))
--    with pytest.raises(exceptions.TlsProtocolException, message="Unexpected EOF"):
-+    with pytest.raises(exceptions.TlsProtocolException):
-         tls.get_client_hello(rfile)
-+        pytest.fail("Unexpected EOF")
- 
-     rfile = io.BufferedReader(io.BytesIO(
-         b"GET /"
-     ))
--    with pytest.raises(exceptions.TlsProtocolException, message="Expected TLS record"):
-+    with pytest.raises(exceptions.TlsProtocolException):
-         tls.get_client_hello(rfile)
-+        pytest.fail("Expected TLS record")
- 
- 
- class TestClientHello:
-@@ -153,5 +155,6 @@ class TestClientHello:
-             b"\x01\x00\x00\x03" +  # handshake header
-             b"foo"
-         ))
--        with pytest.raises(exceptions.TlsProtocolException, message='Cannot parse Client Hello'):
-+        with pytest.raises(exceptions.TlsProtocolException):
-             tls.ClientHello.from_file(rfile)
-+            pytest.fail('Cannot parse Client Hello')