[Debian-med-packaging] Bug#1005030: resfinder: tests fail under python 3.10: collections import
Andreas Hasenack
andreas at canonical.com
Sat Feb 5 19:40:18 GMT 2022
Package: resfinder
Version: 4.1.5-2
Severity: normal
Dear Maintainer,
with python 3.10, the DEP8 tests of this package fail:
Running tests
Done
Traceback (most recent call last):
File "/usr/bin/run_resfinder.py", line 8, in <module>
from cge.resfinder import ResFinder
File "/usr/share/resfinder/cge/resfinder.py", line 14, in <module>
from .output.table import TableResults
File "/usr/share/resfinder/cge/output/table.py", line 2, in <module>
from .orderedset import OrderedSet
File "/usr/share/resfinder/cge/output/orderedset.py", line 20, in <module>
class OrderedSet(collections.MutableSet):
AttributeError: module 'collections' has no attribute 'MutableSet'
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.
Here is a trivial patch:
--- a/cge/output/orderedset.py
+++ b/cge/output/orderedset.py
@@ -17,7 +17,7 @@
# SOFTWARE.
import collections
-class OrderedSet(collections.MutableSet):
+class OrderedSet(collections.abc.MutableSet):
def __init__(self, iterable=None):
self.end = end = []
1. https://docs.python.org/3/whatsnew/3.10.html
More information about the Debian-med-packaging
mailing list