Your message dated Fri, 08 Apr 2022 17:48:48 +0000
with message-id <e1ncsj2-0002e6...@fasolo.debian.org>
and subject line Bug#1008755: fixed in optlang 1.5.2-1
has caused the Debian Bug report #1008755,
regarding optlang/interface.py unusable with python3.10
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
1008755: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1008755
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
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 <emoll...@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
Description: call collections.abc.Iterables instead of collections.Iterables
 This allows the module to operate properly when using python3.10.
Author: Étienne Mollier <emoll...@debian.org>
Forwarded: no
Last-Update: 2022-03-31
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- optlang-1.4.4.orig/optlang/interface.py
+++ optlang-1.4.4/optlang/interface.py
@@ -1355,7 +1355,7 @@
         if self._pending_modifications.toggle == 'remove':
             self.update()
             self._pending_modifications.toggle = 'add'
-        if isinstance(stuff, collections.Iterable):
+        if isinstance(stuff, collections.abc.Iterable):
             for elem in stuff:
                 self.add(elem, sloppy=sloppy)
         elif isinstance(stuff, Variable):
@@ -1404,7 +1404,7 @@
             self._pending_modifications.rm_var.append(stuff)
         elif isinstance(stuff, Constraint):
             self._pending_modifications.rm_constr.append(stuff)
-        elif isinstance(stuff, collections.Iterable):
+        elif isinstance(stuff, collections.abc.Iterable):
             for elem in stuff:
                 self.remove(elem)
         elif isinstance(stuff, Objective):

Attachment: signature.asc
Description: PGP signature


--- End Message ---
--- Begin Message ---
Source: optlang
Source-Version: 1.5.2-1
Done: Étienne Mollier <emoll...@debian.org>

We believe that the bug you reported is fixed in the latest version of
optlang, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1008...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Étienne Mollier <emoll...@debian.org> (supplier of updated optlang package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Fri, 08 Apr 2022 19:23:13 +0200
Source: optlang
Architecture: source
Version: 1.5.2-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Science Maintainers 
<debian-science-maintain...@lists.alioth.debian.org>
Changed-By: Étienne Mollier <emoll...@debian.org>
Closes: 1008755
Changes:
 optlang (1.5.2-1) unstable; urgency=medium
 .
   * Team upload.
   * New upstream version (Closes: #1008755)
   * Standards-Version: 4.6.0 (routine-update)
   * debhelper-compat 13 (routine-update)
   * Reorder sequence of d/control fields by cme (routine-update)
   * Testsuite: autopkgtest-pkg-python (routine-update)
   * Add salsa-ci file (routine-update)
   * Rules-Requires-Root: no (routine-update)
   * Use secure URI in Homepage field.
   * Set upstream metadata fields: Bug-Database, Bug-Submit, Repository,
     Repository-Browse.
   * Make d/python3-optlang.examples a regular file to fix build issues where
     the initial link to d/examples is erroneously recognized as an executable.
Checksums-Sha1:
 330c7004752b35b2410e88c6b1ec6f103eb91885 2108 optlang_1.5.2-1.dsc
 ddcc0ef9b3b2878b8149ff2d3bee7865c80e49af 8700038 optlang_1.5.2.orig.tar.gz
 b7627f5665ebedcb9f0fdcbda51efaab6b8515a7 2476 optlang_1.5.2-1.debian.tar.xz
 577e2426870005119336f2ac17c167d793bcc85d 6667 optlang_1.5.2-1_amd64.buildinfo
Checksums-Sha256:
 de1fffc2b096a84b98a3d652465a111183f9ce3d2ad605d8c9523e495765c51c 2108 
optlang_1.5.2-1.dsc
 b67ee407bff3e12d65652aef613795153c099ac2e679cb8c74ac35c8029fd3e3 8700038 
optlang_1.5.2.orig.tar.gz
 320d78a94a2575152b3b196bc81810318df9c91590f2379c495b7a3f3831672e 2476 
optlang_1.5.2-1.debian.tar.xz
 33bfa9999291b2cf80451534244b4e86bb25111cda5637662dda9394ee775904 6667 
optlang_1.5.2-1_amd64.buildinfo
Files:
 a91e4fd4a3d867c0ee749764c367609c 2108 python optional optlang_1.5.2-1.dsc
 d4cd19f47b7f6638f1d4a1e8d1924c91 8700038 python optional 
optlang_1.5.2.orig.tar.gz
 a7389ebd475213f9202b94c146264ff7 2476 python optional 
optlang_1.5.2-1.debian.tar.xz
 957407589f8917bac8398fc252672ce0 6667 python optional 
optlang_1.5.2-1_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJIBAEBCgAyFiEEj5GyJ8fW8rGUjII2eTz2fo8NEdoFAmJQcjkUHGVtb2xsaWVy
QGRlYmlhbi5vcmcACgkQeTz2fo8NEdq9ng//fwi1XmuqGHGodiG91REPIMz4GFaC
rCEgbl02iWJkDCSkenV6E+0dMLhiTV2dwiS8Ookc6j20Ki3jRgYYRgwSZfNjCibk
xeT9hiVSqugKzbU6lPlfQ0FBElDR1yVXYzfkn11PwYhDhaRALdo9m0CQhbUaXsIE
1gdG0+XAkhcuZjfhgEKjW4+EASawvSC/EJCpHbCw2iXs1FSFPkyovClei/OmQCa2
oZE2vt+dhWFzcOq13I8/W1LaAiQXxJmpQGcbYYQfh4FjGxE7SdoULRS1dgQo7nPf
+oW/sq8QpJcVVe4PAm9tg1Knd2OxfDuxMDNr1oqrGkOBwQA7bori2k7jfhG7MbZ/
xdMn+0qGORwbM5Ayf/oITW7jk7v0GpWeEYpagqsgIUWl/2NyBWUpoDHzlQLDGfXe
Exhm9ZUqgE4EjJAFZTHhbllT6Y3PJRrdJ8IKissyJnTpNQhjhw2lJyVqyn4DRcOa
kcI+QrFIN9fwC1BopxHmqkxZFZQh2i9G8b5RLS1ZXhiLRiVLSKjWlbxRS62gemnR
KVHmk4Hjuxoq1G5blJlUm+SWJCRC+ZVVg9V4U9nN9xyRNUTUCicQJSMpwHQHDrTW
I2gsiBut6IXl6z0Q528qXhrPc+wH+0WUcc6TGIjkZfKKzHm/AV8xyn1zdS/ubm36
VBs+HKupATQ0Tqs=
=AP98
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to