FTBFS: module 'collections' has no attribute 'Callable'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mando (Ubuntu) |
Fix Released
|
Undecided
|
Andreas Hasenack |
Bug Description
In python 3.10[1] deprecated aliases to Collections Abstract Base Classes from
the collections module have been removed. These imports must be done from
collections.abc.
1. https:/
running build_ext
Traceback (most recent call last):
File "/home/
setup(
File "/usr/lib/
return distutils.
File "/usr/lib/
dist.
File "/usr/lib/
self.
File "/usr/lib/
cmd_obj.run()
File "/usr/lib/
self.
File "/usr/lib/
test = unittest.main(
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.test = self.testLoader
File "/usr/lib/
suites = [self.loadTests
File "/usr/lib/
suites = [self.loadTests
File "/usr/lib/
return self.loadTestsF
File "/usr/lib/
tests.
File "/usr/lib/
module = __import_
File "/home/
def simple_
File "/home/
return self._generate_
File "/home/
doc = str(GoogleDocst
File "/home/
elif isinstance(obj, collections.
AttributeError: module 'collections' has no attribute 'Callable'
Related branches
- Utkarsh Gupta (community): Approve
- Canonical Server: Pending requested
-
Diff: 176 lines (+138/-1)5 files modifieddebian/changelog (+10/-0)
debian/control (+2/-1)
debian/patches/py310-collections-import.patch (+40/-0)
debian/patches/py310-help-output.patch (+84/-0)
debian/patches/series (+2/-0)
Changed in mando (Ubuntu): | |
assignee: | nobody → Andreas Hasenack (ahasenack) |
status: | New → In Progress |
That particular issue is fixed in upstream's 0.7.0. I patched it, but hit another issue afterwards: ======= ======= ======= ======= FAILURES ======= ======= ======= ======= ======= docstring_ help[simple_ google_ docstring --help 2 --arg2=test-usage: example.py simple_ google_ docstring [-h] [--arg2 ARG2] arg1\n\nExtended description. \n\npositional arguments:\n arg1 Description of `arg1`\n\noptional arguments:\n -h, --help show this help message and exit\n --arg2 ARG2 Description of `arg2`\n] _
=======
_ test_google_
args = ['simple_ google_ docstring' , '--help', '2', '--arg2=test'] google_ docstring [-h] [--arg2 ARG2] arg1\n\nExtended description. \n\npositional arguments:\n... `arg1`\n\noptional arguments:\n -h, --help show this help message and exit\n --arg2 ARG2 Description of `arg2`\n'
result = 'usage: example.py simple_
@pytest. mark.parametriz e('args, result' , GOOGLE_ DOCSTRING_ HELP_CASES) docstring_ help(args, result): raises( SystemExit) : capture_ sys_output( ) as (stdout, stderr):
program. execute( args)
def test_google_
args = args.split()
with pytest.
with capture.
> assert result == stdout.getvalue()
E AssertionError: assert 'usage: examp...n of `arg2`\n' == 'usage: examp...n of `arg2`\n'
E Skipping 146 identical leading characters in diff, use -v to show
E 1`
E
E - options:
E + optional arguments:
E -h, --help show this help message and exit
E --arg2 ARG2 Description of `arg2`
mando/tests/ test_google. py:57: AssertionError docstring_ help[simple_ numpy_docstring --help 2 --arg2=test-usage: example.py simple_ numpy_docstring [-h] [--arg2 ARG2] arg1\n\nExtended description. \n\npositional arguments:\n arg1 Description of `arg1`\n\noptional arguments:\n -h, --help show this help message and exit\n --arg2 ARG2 Description of `arg2`\n] _
_ test_numpy_
args = ['simple_ numpy_docstring ', '--help', '2', '--arg2=test'] numpy_docstring [-h] [--arg2 ARG2] arg1\n\nExtended description. \n\npositional arguments:\n ... `arg1`\n\noptional arguments:\n -h, --help show this help message and exit\n --arg2 ARG2 Description of `arg2`\n'
result = 'usage: example.py simple_
@pytest. mark.parametriz e('args, result' , NUMPY_DOCSTRING _HELP_CASES) docstring_ help(args, result): raises( SystemExit) : capture_ sys_output( ) as (stdout, stderr):
program. execute( args)
def test_numpy_
args = args.split()
with pytest.
with capture.
> assert result == stdout.getvalue()
E AssertionError: assert 'usage: examp...n of `arg2`\n' == 'usage: examp...n of `arg2`\n'
E Skipping 145 identical leading characters in diff, use -v to show
E 1`
E
E - options:
E + optional arguments:
E -h, --help show this help message and exit
E --arg2 ARG2 Description of `arg2`
mando/tests/ test_numpy. py:62: AssertionError ======= ======= ====== short test summary info ======= ======= ======= ======= test_google. py::test_ google_ docstring_ help[simple_ google_ docstring --help 2 --arg2=test-usage: example.py simple_g...
=======
FAILED mando/tests/