Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUG: Fix
Mapping
and Iterables
names import modules
Fix `Mapping` and `Iterables` classes import modules: import them from `collections.abc` instead of from `collections` as they have been moved to the former since Python 3.3. Fixes: ``` Traceback (most recent call last): File ".virtualenvs/tract_querier/bin/tract_math", line 8, in <module> sys.exit(main()) File ".virtualenvs/tract_querier/lib/python3.10/site-packages/scripts/tract_math.py", line 33, in main from tract_querier.tract_math import operations File ".virtualenvs/tract_querier/lib/python3.10/site-packages/tract_querier/tract_math/__init__.py", line 3, in <module> from .decorator import tract_math_operation, TractMathWrongArgumentsError File ".virtualenvs/tract_querier/lib/python3.10/site-packages/tract_querier/tract_math/decorator.py", line 3, in <module> from collections import Mapping, Iterable ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py) ``` Documentation: https://docs.python.org/3.3/library/collections.abc.html
- Loading branch information