[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1001344: jaraco.itertools: needs update for python3.10: 'collections' has no attribute 'Mapping'

Source: jaraco.itertools
Version: 2.0.1-4
Severity: serious
X-Debbugs-CC: debian-ci@lists.debian.org
Tags: sid bookworm
User: debian-ci@lists.debian.org
Usertags: needs-update
Control: affects -1 src:python3-defaults

Dear maintainer(s),

With a recent upload of python3-defaults the autopkgtest of jaraco.itertools fails in testing when that autopkgtest is run with the binary packages of python3-defaults from unstable. It passes when run with only packages from testing. In tabular form:

                       pass            fail
python3-defaults       from testing    3.9.8-1
jaraco.itertools       from testing    2.0.1-4
all others             from testing    from testing

I copied some of the output at the bottom of this report. https://docs.python.org/3.9/library/collections.html says:
Deprecated since version 3.3, will be removed in version 3.10: Moved Collections Abstract Base Classes to the collections.abc module. For backwards compatibility, they continue to be visible in this module through Python 3.9.
Time to move on.

Currently this regression is blocking the migration of python3-defaults to testing [1].

More information about this bug and the reason for filing it can be found on


[1] https://qa.debian.org/excuses.php?package=python3-defaults


Testing with python3.10:
============================= test session starts ==============================
platform linux -- Python 3.10.0+, pytest-6.2.5, py-1.10.0, pluggy-0.13.0
rootdir: /tmp/autopkgtest-lxc.lkeiwwur/downtmp/autopkgtest_tmp, configfile: pytest.ini
collected 32 items

. ........F....................... [100%]

=================================== FAILURES =================================== __________________ [doctest] jaraco.itertools.always_iterable __________________
839 840 	Given an object, always return an iterable. If the item is not
841 	already iterable, return a tuple containing only the item. If item is
842 	None, an empty iterable is returned.
843 844 	>>> always_iterable([1,2,3])
UNEXPECTED EXCEPTION: AttributeError("module 'collections' has no attribute 'Mapping'")
Traceback (most recent call last):
  File "/usr/lib/python3.10/doctest.py", line 1348, in __run
    exec(compile(example.source, filename, "single",
  File "<doctest jaraco.itertools.always_iterable[0]>", line 1, in <module>
File "/usr/lib/python3/dist-packages/jaraco/itertools.py", line 866, in always_iterable
    or isinstance(item, collections.Mapping)
AttributeError: module 'collections' has no attribute 'Mapping'
/usr/lib/python3/dist-packages/jaraco/itertools.py:844: UnexpectedException
=============================== warnings summary ===============================
/usr/lib/python3/dist-packages/more_itertools/recipes.py:292: DeprecationWarning: grouper expects iterable as first parameter

-- Docs: https://docs.pytest.org/en/stable/warnings.html
=========================== short test summary info ============================
FAILED ::jaraco.itertools.always_iterable
=================== 1 failed, 31 passed, 2 warnings in 0.08s ===================
autopkgtest [21:40:15]: test py3test

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply to: