From 31e1a525213d7e88f31a6b4719e5363d300f61e49a444e2bc011d4a9cd6c5e96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Sat, 10 Oct 2020 20:58:09 +0000 Subject: [PATCH] Accepting request 840889 from home:apersaud:branches:devel:languages:python update to latest version OBS-URL: https://build.opensuse.org/request/show/840889 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flake8?expand=0&rev=69 --- fix-mock-patch-with-python3.4.patch | 10 +++---- flake8-3.8.3.tar.gz | 3 -- flake8-3.8.4.tar.gz | 3 ++ pytest6.patch | 46 ----------------------------- python-flake8.changes | 13 ++++++++ python-flake8.spec | 3 +- 6 files changed, 22 insertions(+), 56 deletions(-) delete mode 100644 flake8-3.8.3.tar.gz create mode 100644 flake8-3.8.4.tar.gz delete mode 100644 pytest6.patch diff --git a/fix-mock-patch-with-python3.4.patch b/fix-mock-patch-with-python3.4.patch index 38eebff..f9ce5f3 100644 --- a/fix-mock-patch-with-python3.4.patch +++ b/fix-mock-patch-with-python3.4.patch @@ -5,7 +5,7 @@ In python 3.5, mock.patch uses create=True automatically if you are patching builtins in a module, but in python 3.4 the argument is still needed. --- a/tests/unit/test_debug.py +++ b/tests/unit/test_debug.py -@@ -70,7 +70,7 @@ def test_information(system, pyversion, +@@ -64,7 +64,7 @@ def test_information(system, pyversion, system.assert_called_once_with() @@ -14,7 +14,7 @@ builtins in a module, but in python 3.4 the argument is still needed. @mock.patch('flake8.main.debug.information', return_value={}) @mock.patch('json.dumps', return_value='{}') def test_print_information_no_plugins(dumps, information, print_mock): -@@ -84,7 +84,7 @@ def test_print_information_no_plugins(du +@@ -79,7 +79,7 @@ def test_print_information_no_plugins(du assert print_mock.called is False @@ -25,7 +25,7 @@ builtins in a module, but in python 3.4 the argument is still needed. def test_print_information(dumps, information, print_mock): --- a/tests/unit/test_base_formatter.py +++ b/tests/unit/test_base_formatter.py -@@ -23,7 +23,7 @@ def test_start(filename): +@@ -20,7 +20,7 @@ def test_start(filename): """Verify we open a new file in the start method.""" mock_open = mock.mock_open() formatter = base.BaseFormatter(options(output_file=filename)) @@ -34,7 +34,7 @@ builtins in a module, but in python 3.4 the argument is still needed. formatter.start() if filename is None: -@@ -93,7 +93,7 @@ def test_write_uses_an_output_file(tee): +@@ -100,7 +100,7 @@ def test_write_uses_an_output_file(tee): formatter = base.BaseFormatter(options(tee=tee)) formatter.output_fd = filemock @@ -43,7 +43,7 @@ builtins in a module, but in python 3.4 the argument is still needed. formatter.write(line, source) if tee: assert print_func.called -@@ -112,7 +112,7 @@ def test_write_uses_an_output_file(tee): +@@ -119,7 +119,7 @@ def test_write_uses_an_output_file(tee): ] diff --git a/flake8-3.8.3.tar.gz b/flake8-3.8.3.tar.gz deleted file mode 100644 index 870007c..0000000 --- a/flake8-3.8.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f04b9fcbac03b0a3e58c0ab3a0ecc462e023a9faf046d57794184028123aa208 -size 162305 diff --git a/flake8-3.8.4.tar.gz b/flake8-3.8.4.tar.gz new file mode 100644 index 0000000..477bf16 --- /dev/null +++ b/flake8-3.8.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aadae8761ec651813c24be05c6f7b4680857ef6afaae4651a4eccaef97ce6c3b +size 163583 diff --git a/pytest6.patch b/pytest6.patch deleted file mode 100644 index 9605d43..0000000 --- a/pytest6.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 91b09d5b376cfb8afd4b6af5b407f57aa42011c7 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= -Date: Mon, 20 Jul 2020 13:18:23 +0200 -Subject: [PATCH] Tests: Add a value to mocked entry_points, so pytest 6+ can - log it - -Pytest 6.0.0rc1 attempts to log a repr of our mocked entry_point, -but it fails, becasue the repr metohod expects a valua attribute: - -Reproducer: - - $ tox -e py38 --force-dep 'pytest==6.0.0rc1' - ... - Traceback (most recent call last): - File "/usr/lib/python3.8/logging/__init__.py", line 1081, in emit - msg = self.format(record) - File "/usr/lib/python3.8/logging/__init__.py", line 925, in format - return fmt.format(record) - File "/usr/lib/python3.8/logging/__init__.py", line 664, in format - record.message = record.getMessage() - File "/usr/lib/python3.8/logging/__init__.py", line 369, in getMessage - msg = msg % self.args - File "/tmp/flake8/.tox/py38/lib/python3.8/site-packages/flake8/plugins/manager.py", line 44, in __repr__ - self.name, self.entry_point.value - File "/tmp/flake8/.tox/py38/lib/python3.8/site-packages/mock/mock.py", line 632, in __getattr__ - raise AttributeError("Mock object has no attribute %r" % name) - AttributeError: Mock object has no attribute 'value' ---- - tests/integration/test_checker.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/tests/integration/test_checker.py b/tests/integration/test_checker.py -index eaab5c3..0acdb6e 100644 ---- a/tests/integration/test_checker.py -+++ b/tests/integration/test_checker.py -@@ -100,6 +100,7 @@ def mock_file_checker_with_plugin(plugin_target): - entry_point = mock.Mock(spec=['load']) - entry_point.name = plugin_target.name - entry_point.load.return_value = plugin_target -+ entry_point.value = 'mocked:value' - - # Load the checker plugins using the entry point mock - with mock.patch.object( --- -GitLab - diff --git a/python-flake8.changes b/python-flake8.changes index c09ec09..2b1f4f0 100644 --- a/python-flake8.changes +++ b/python-flake8.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Sat Oct 10 18:37:52 UTC 2020 - Arun Persaud + +- specfile: + * update patch lines numbers + * removed pytest6.patch (included upstream) + +- update to version 3.8.4: + * Fix multiprocessing errors on platforms without sem_open syscall. + (See also GitLab!448) + * Fix skipping of physical checks on the last line of a file which + does not end in a newline (See also GitLab!451) + ------------------------------------------------------------------- Mon Aug 31 10:20:01 UTC 2020 - Tomáš Chvátal diff --git a/python-flake8.spec b/python-flake8.spec index 7d8ec65..a9ef166 100644 --- a/python-flake8.spec +++ b/python-flake8.spec @@ -19,14 +19,13 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %bcond_without python2 Name: python-flake8 -Version: 3.8.3 +Version: 3.8.4 Release: 0 Summary: Modular source code checker: pep8, pyflakes and co License: MIT URL: https://gitlab.com/pycqa/flake8 Source: https://files.pythonhosted.org/packages/source/f/flake8/flake8-%{version}.tar.gz Patch0: fix-mock-patch-with-python3.4.patch -Patch1: pytest6.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros