Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot import name 'Sequence' from 'collections' #11

Open
Alessandro-Barbieri opened this issue May 31, 2022 · 3 comments
Open

cannot import name 'Sequence' from 'collections' #11

Alessandro-Barbieri opened this issue May 31, 2022 · 3 comments

Comments

@Alessandro-Barbieri
Copy link

 * 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

@kevinlsh
Copy link

kevinlsh commented May 31, 2022 via email

@cthorrez
Copy link

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

@kevinlsh
Copy link

kevinlsh commented Oct 24, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants