DEP8 failure due to py3.10 incompatible import

Bug #1959907 reported by Andreas Hasenack
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-fysom (Debian)
Fix Released
Unknown
python-fysom (Ubuntu)
Fix Released
Undecided
Andreas Hasenack

Bug Description

In python 3.10, "from collections import Mapping" doesn't work anymore
and should be imported from collections.abc

$ python3 debian/tests/import3
Traceback (most recent call last):
  File "/home/ubuntu/deb/python-fysom/python-fysom/debian/tests/import3",
line 4, in <module>
    fsm = Fysom({'initial': 'green',
  File "/usr/lib/python3/dist-packages/fysom/__init__.py", line 162,
in __init__
    if isinstance(e, collections.Mapping):
AttributeError: module 'collections' has no attribute 'Mapping'

Upstream fixed this in 2.1.6, and this is the patch:
https://github.com/mriehl/fysom/commit/1ed6950d2b683a9a2a2ab35dfd0ea79dc2963dc3

Related branches

Changed in python-fysom (Debian):
status: Unknown → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-fysom - 2.1.5-3ubuntu1

---------------
python-fysom (2.1.5-3ubuntu1) jammy; urgency=medium

  * d/p/import_abc_from_collections_abc.patch: Fix collections import
    for Python 3.10+ (LP: #1959907)

 -- Andreas Hasenack <email address hidden> Thu, 03 Feb 2022 14:34:40 -0300

Changed in python-fysom (Ubuntu):
status: In Progress → Fix Released
Changed in python-fysom (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.