summaryrefslogtreecommitdiff
path: root/dev-python/flake8/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
commitd934827bf44b7cfcf6711964418148fa60877668 (patch)
tree0625f358789b5e015e49db139cc1dbc9be00428f /dev-python/flake8/files
parent2e34d110f164bf74d55fced27fe0000201b3eec5 (diff)
gentoo resync : 25.11.2020
Diffstat (limited to 'dev-python/flake8/files')
-rw-r--r--dev-python/flake8/files/flake8-3.8.3-pytest6.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/dev-python/flake8/files/flake8-3.8.3-pytest6.patch b/dev-python/flake8/files/flake8-3.8.3-pytest6.patch
new file mode 100644
index 000000000000..78e7391d0379
--- /dev/null
+++ b/dev-python/flake8/files/flake8-3.8.3-pytest6.patch
@@ -0,0 +1,40 @@
+commit 91b09d5b376cfb8afd4b6af5b407f57aa42011c7
+Author: Miro HronĨok <miro@hroncok.cz>
+Date: Mon Jul 20 13:18:23 2020 +0200
+
+ 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'
+
+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(