PythonSkills icon indicating copy to clipboard operation
PythonSkills copied to clipboard

cannot import name 'Sequence' from 'collections'

Open Alessandro-Barbieri opened this issue 2 years ago • 3 comments

 * python3_10: running distutils-r1_run_phase python_test
python3.10 setup.py test --verbose
running test
WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox.
running egg_info
writing skills.egg-info/PKG-INFO
writing dependency_links to skills.egg-info/dependency_links.txt
writing top-level names to skills.egg-info/top_level.txt
listing git files failed - pretending there aren't any
reading manifest file 'skills.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file 'skills.egg-info/SOURCES.txt'
running build_ext
skills (unittest.loader._FailedTest) ... ERROR

======================================================================
ERROR: skills (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: skills
Traceback (most recent call last):
  File "/usr/lib/python3.10/unittest/loader.py", line 470, in _find_test_path
    package = self._get_module_from_name(name)
  File "/usr/lib/python3.10/unittest/loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "/var/tmp/portage/dev-python/skills-0.3.0-r1/work/skills-0.3.0/skills/__init__.py", line 4, in <module>
    from collections import Sequence
ImportError: cannot import name 'Sequence' from 'collections' (/usr/lib/python3.10/collections/__init__.py)


----------------------------------------------------------------------
Ran 1 test in 0.000s

FAILED (errors=1)
Test failed: <unittest.runner.TextTestResult run=1 errors=1 failures=0>
error: Test failed: <unittest.runner.TextTestResult run=1 errors=1 failures=0>
 * ERROR: dev-python/skills-0.3.0-r1::guru failed (test phase):
 *   Tests failed with python3.10

see https://bugs.gentoo.org/848726 log https://848726.bugs.gentoo.org/attachment.cgi?id=781571

Alessandro-Barbieri avatar May 31 '22 09:05 Alessandro-Barbieri

已收到您的邮件,谢谢您,我将尽快给您回复。

kevinlsh avatar May 31 '22 09:05 kevinlsh

I have this issue as well. It can be mitigated by replacing from collections import Sequence with from collections.abc import Sequence

cthorrez avatar Oct 24 '23 23:10 cthorrez

已收到您的邮件,谢谢您,我将尽快给您回复。

kevinlsh avatar Oct 24 '23 23:10 kevinlsh