pytest-plugins
pytest-plugins copied to clipboard
Incompatible with Python 3.10
Python 3.10 finally really eliminated all those classes in collections
package which were long time ago moved to collections.abc
. So, from collections import Iterable
truly ceased to work.
This patch:
---
pytest_verbose_parametrize.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- a/pytest_verbose_parametrize.py
+++ b/pytest_verbose_parametrize.py
@@ -1,4 +1,7 @@
-from collections import Iterable
+try:
+ from collections.abc import Iterable
+except (ImportError, ModuleNotFoundError):
+ from collections import Iterable
from six import string_types, text_type
fixes the problem.