Bug#1008755: optlang/interface.py unusable with python3.10
Étienne Mollier
emollier at emlwks999.eu
Thu Mar 31 20:14:10 BST 2022
Source: optlang
Version: 1.4.4-2
Severity: serious
Tags: patch upstream
Justification: RT
Dear Fellow Maintainer,
While addressing failure to build from source in libsbml, I
noticed that python-cobra, one of its reverse dependencies,
had autopkgtest regressions: its test suite failed to run,
raising the following error:
self = <optlang.glpk_interface.Model object at 0x7f0b21f934c0>, stuff = []
sloppy = False
def add(self, stuff, sloppy=False):
"""Add variables and constraints.
Parameters
----------
stuff : iterable, Variable, Constraint
Either an iterable containing variables and constraints or a single variable or constraint.
sloppy : bool
Check constraints for variables that are not part of the model yet.
Returns
-------
None
"""
if self._pending_modifications.toggle == 'remove':
self.update()
self._pending_modifications.toggle = 'add'
> if isinstance(stuff, collections.Iterable):
E AttributeError: module 'collections' has no attribute 'Iterable'
/usr/lib/python3/dist-packages/optlang/interface.py:1358: AttributeError
The full log is available on ci.debian.net[1]. This turned out
to be caused by optlang. Using the patch in attachment, I
worked around the issue, and autopkgtest of python-cobra went
back on tracks on my side.
[1]: https://ci.debian.net/data/autopkgtest/testing/amd64/p/python-cobra/20469873/log.gz
Thanks for maintaining optlang!
Have a nice day, :)
--
Étienne Mollier <emollier at emlwks999.eu>
Fingerprint: 8f91 b227 c7d6 f2b1 948c 8236 793c f67e 8f0d 11da
Sent from /dev/pts/11, please excuse my verbosity.
On air: It Bites - The Last Escape
-------------- next part --------------
A non-text attachment was scrubbed...
Name: python3.10.patch
Type: text/x-diff
Size: 1198 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20220331/9417bb02/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20220331/9417bb02/attachment.sig>
More information about the debian-science-maintainers
mailing list