Hello community,
here is the log from the commit of package python-mitmproxy for
openSUSE:Factory checked in at 2020-08-12 10:31:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-mitmproxy (Old)
and /work/SRC/openSUSE:Factory/.python-mitmproxy.new.3399 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-mitmproxy"
Wed Aug 12 10:31:41 2020 rev:2 rq:825834 version:5.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-mitmproxy/python-mitmproxy.changes
2020-06-18 10:23:56.368060552 +0200
+++
/work/SRC/openSUSE:Factory/.python-mitmproxy.new.3399/python-mitmproxy.changes
2020-08-12 10:36:53.836303172 +0200
@@ -1,0 +2,54 @@
+Tue Aug 11 10:05:06 UTC 2020 - Benjamin Greiner <[email protected]>
+
+- Update to v5.2
+ * Add Filter message to mitmdump (@sarthak212)
+ * Display TCP flows at flow list (@Jessonsotoventura,
+ @nikitastupin, @mhils)
+ * Colorize JSON Contentview (@sarthak212)
+ * Fix console crash when entering regex escape character in
+ half-open string (@sarthak212)
+ * Integrate contentviews to TCP flow details (@nikitastupin)
+ * Added add-ons that enhance the performance of web application
+ scanners (@anneborcherding)
+ * Increase WebSocket message timestamp precision
+ (@JustAnotherArchivist)
+ * Fix HTTP reason value on HTTP/2 reponses (@rbdixon)
+ * mitmweb: support wslview to open a web browser (@G-Rath)
+ * Fix dev version detection with parent git repo
+ (@JustAnotherArchivist)
+ * Restructure examples and supported addons (@mhils)
+ * Certificate generation: mark SAN as critical if no CN is set
+ (@mhils)
+ * Simplify Replacements with new ModifyBody addon (@mplattner)
+ * Rename SetHeaders addon to ModifyHeaders (@mplattner)
+ * mitmweb: "New -> File" menu option has been renamed to
+ "Clear All" (@yogeshojha)
+ * Add new MapRemote addon to rewrite URLs of requests
+ (@mplattner)
+ * Add support for HTTP Trailers to the HTTP/2 protocol
+ (@sanlengjingvv and @Kriechi)
+ * Fix certificate runtime error during expire cleanup
+ (@gorogoroumaru)
+ * Fixed the DNS Rebind Protection for secure support of IPv6
+ addresses (@tunnelpr0)
+ * WebSockets: match the HTTP-WebSocket flow for the ~websocket
+ filter (@Kriechi)
+ * Fix deadlock caused by the "replay.client.stop" command
+ (@gorogoroumaru)
+ * Add new MapLocal addon to serve local files instead of remote
+ resources (@mplattner and @mhils)
+ * Add minimal TCP interception and modification (@nikitastupin)
+ * Add new CheckSSLPinning addon to check SSL-Pinning on client
+ (@su-vikas)
+ * Add a JSON dump script: write data into a file or send to an
+ endpoint as JSON (@emedvedev)
+ * Fix console output formatting (@sarthak212)
+ * Add example for proxy authentication using selenium
+ (@anneborcherding and @weichweich)
+- refresh unpin.patch
+- replace unmaintained asynctest by native python 3.8 unittest
+ calls
+ * replace-asynctest.patch
+ * gh#mitmproxy/mitmproxy#4020
+
+-------------------------------------------------------------------
Old:
----
mitmproxy-5.1.1.tar.gz
New:
----
mitmproxy-5.2.tar.gz
replace-asynctest.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-mitmproxy.spec ++++++
--- /var/tmp/diff_new_pack.FkIziN/_old 2020-08-12 10:36:54.884303692 +0200
+++ /var/tmp/diff_new_pack.FkIziN/_new 2020-08-12 10:36:54.888303694 +0200
@@ -19,18 +19,25 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-mitmproxy
-Version: 5.1.1
+Version: 5.2
Release: 0
-Summary: An interactive, SSL/TLS-capable intercepting proxy for HTTP/1,
HTTP/2, and WebSockets
+Summary: An interactive, SSL/TLS-capable intercepting proxy
License: MIT
Group: Development/Languages/Python
URL: https://mitmproxy.org
Source:
https://github.com/mitmproxy/mitmproxy/archive/v%{version}.tar.gz#/mitmproxy-%{version}.tar.gz
# upstream likes to pin dependencies too aggressively
Patch0: unpin.patch
+# PATCH-FIX-UPSTREAM replace-asynctest.patch gh#mitmproxy/mitmproxy#4020
+Patch1: replace-asynctest.patch
BuildRequires: %{python_module Brotli >= 1.0}
-BuildRequires: %{python_module Flask >= 1.1.1}
+BuildRequires: %{python_module Flask >= 1.0}
+%if 0%{?suse_version} < 1550
+# Python 3.6 only
+BuildRequires: %{python_module dataclasses >= 0.7}
+# Python < 3.8
BuildRequires: %{python_module asynctest >= 0.12.0}
+%endif
BuildRequires: %{python_module beautifulsoup4 >= 4.4.1}
BuildRequires: %{python_module blinker >= 1.4}
BuildRequires: %{python_module certifi >= 2019.9.11}
@@ -51,6 +58,7 @@
BuildRequires: %{python_module pyperclip >= 1.6.0}
BuildRequires: %{python_module pytest >= 5.1.3}
BuildRequires: %{python_module pytest-asyncio >= 0.10.0}
+BuildRequires: %{python_module pytest-mock}
BuildRequires: %{python_module requests >= 2.9.1}
BuildRequires: %{python_module ruamel.yaml >= 0.16}
BuildRequires: %{python_module setuptools}
@@ -84,6 +92,10 @@
Requires: python-urwid >= 2.1.0
Requires: python-wsproto >= 0.14
Requires: python-zstandard >= 0.11
+%if 0%{?python3_version_nodots} < 37
+# Python 3.6 only
+Requires: python3-dataclasses >= 0.7
+%endif
Requires(post): update-alternatives
Requires(postun): update-alternatives
Recommends: python-beautifulsoup4 >= 4.4.1
@@ -107,6 +119,12 @@
%prep
%setup -q -n mitmproxy-%{version}
%patch0 -p1
+%if 0%{?suse_version} >= 1550
+%patch1 -p1
+%endif
+#remove shebang
+sed -i '1 {\@^#!/usr/bin/env@ d}' mitmproxy/contrib/wbxml/*.py
+rm mitmproxy/contrib/kaitaistruct/make.sh
%build
%python_build
@@ -123,7 +141,8 @@
%check
# test_refresh fails on i586... wrong timestamp type, maybe?
# test_rollback and test_output[None-expected_out0-expected_err0] just
randomly fail on i586
-%pytest -k "not (test_refresh or test_rollback or test_output)"
+# test_get_version fails to mock updated git version
+%pytest -k "not (test_refresh or test_rollback or test_output or
test_get_version)"
%post
%python_install_alternative mitmdump
++++++ mitmproxy-5.1.1.tar.gz -> mitmproxy-5.2.tar.gz ++++++
/work/SRC/openSUSE:Factory/python-mitmproxy/mitmproxy-5.1.1.tar.gz
/work/SRC/openSUSE:Factory/.python-mitmproxy.new.3399/mitmproxy-5.2.tar.gz
differ: char 13, line 1
++++++ replace-asynctest.patch ++++++
Index: mitmproxy-5.2/test/mitmproxy/addons/test_readfile.py
===================================================================
--- mitmproxy-5.2.orig/test/mitmproxy/addons/test_readfile.py
+++ mitmproxy-5.2/test/mitmproxy/addons/test_readfile.py
@@ -1,8 +1,9 @@
import asyncio
import io
+from unittest.mock import patch
import pytest
-import asynctest
+
import mitmproxy.io
from mitmproxy import exceptions
@@ -54,17 +55,17 @@ class TestReadFile:
tf = tmpdir.join("tfile")
- with asynctest.patch('mitmproxy.master.Master.load_flow') as mck:
+ with patch('mitmproxy.master.Master.load_flow') as mck:
tf.write(data.getvalue())
tctx.configure(
rf,
rfile = str(tf),
readfile_filter = ".*"
)
- assert not mck.awaited
+ mck.assert_not_awaited()
rf.running()
await asyncio.sleep(0)
- assert mck.awaited
+ mck.assert_awaited()
tf.write(corrupt_data.getvalue())
tctx.configure(rf, rfile=str(tf))
@@ -93,16 +94,16 @@ class TestReadFile:
class TestReadFileStdin:
- @asynctest.patch('sys.stdin')
+ @patch('sys.stdin')
@pytest.mark.asyncio
async def test_stdin(self, stdin, data, corrupt_data):
rf = readfile.ReadFileStdin()
with taddons.context(rf):
- with asynctest.patch('mitmproxy.master.Master.load_flow') as mck:
+ with patch('mitmproxy.master.Master.load_flow') as mck:
stdin.buffer = data
- assert not mck.awaited
+ mck.assert_not_awaited()
await rf.load_flows(stdin.buffer)
- assert mck.awaited
+ mck.assert_awaited()
stdin.buffer = corrupt_data
with pytest.raises(exceptions.FlowReadException):
@@ -113,10 +114,10 @@ class TestReadFileStdin:
rf = readfile.ReadFileStdin()
with taddons.context(rf) as tctx:
tf = tmpdir.join("tfile")
- with asynctest.patch('mitmproxy.master.Master.load_flow') as mck:
+ with patch('mitmproxy.master.Master.load_flow') as mck:
tf.write(data.getvalue())
tctx.configure(rf, rfile=str(tf))
- assert not mck.awaited
+ mck.assert_not_awaited()
rf.running()
await asyncio.sleep(0)
- assert mck.awaited
+ mck.assert_awaited()
++++++ unpin.patch ++++++
--- /var/tmp/diff_new_pack.FkIziN/_old 2020-08-12 10:36:54.944303722 +0200
+++ /var/tmp/diff_new_pack.FkIziN/_new 2020-08-12 10:36:54.948303724 +0200
@@ -1,8 +1,8 @@
-Index: mitmproxy-5.1.1/setup.py
+Index: mitmproxy-5.2/setup.py
===================================================================
---- mitmproxy-5.1.1.orig/setup.py
-+++ mitmproxy-5.1.1/setup.py
-@@ -62,29 +62,29 @@ setup(
+--- mitmproxy-5.2.orig/setup.py
++++ mitmproxy-5.2/setup.py
+@@ -62,46 +62,46 @@ setup(
# https://packaging.python.org/en/latest/requirements/#install-requires
# It is not considered best practice to use install_requires to pin
dependencies to specific versions.
install_requires=[
@@ -27,7 +27,7 @@
- "ruamel.yaml>=0.16,<0.17",
- "sortedcontainers>=2.1.0,<2.2",
- "tornado>=4.3,<7",
-- "urwid>=2.1.0,<2.2",
+- "urwid==2.0.1,!=2.1.0",
- "wsproto>=0.14,<0.16",
- "publicsuffix2>=2.20190812,<3",
- "zstandard>=0.11,<0.14",
@@ -54,12 +54,31 @@
],
extras_require={
':sys_platform == "win32"': [
-@@ -104,7 +104,7 @@ setup(
- "tox>=3.5,<3.15",
+- "pydivert>=2.0.3,<2.2",
++ "pydivert>=2.0.3",
],
- 'examples': [
-- "beautifulsoup4>=4.4.1,<4.9"
-+ "beautifulsoup4>=4.4.1"
+ 'dev': [
+ "asynctest>=0.12.0",
+- "Flask>=1.0,<1.2",
+- "hypothesis>=5.8,<5.9",
+- "parver>=0.1,<2.0",
+- "pytest-asyncio>=0.10.0,<0.11",
+- "pytest-cov>=2.7.1,<3",
+- "pytest-timeout>=1.3.3,<2",
+- "pytest-xdist>=1.29,<2",
+- "pytest>=5.1.3,<6",
+- "requests>=2.9.1,<3",
+- "tox>=3.5,<3.15",
++ "Flask>=1.0",
++ "hypothesis>=5.8",
++ "parver>=0.1",
++ "pytest-asyncio>=0.10.0",
++ "pytest-cov>=2.7.1",
++ "pytest-timeout>=1.3.3",
++ "pytest-xdist>=1.29",
++ "pytest>=5.1.3",
++ "requests>=2.9.1",
++ "tox>=3.5",
]
}
)