Your message dated Fri, 23 Nov 2018 18:21:19 +0000
with message-id <e1gqg4t-0002gi...@fasolo.debian.org>
and subject line Bug#914378: fixed in python-pygraphviz 1.5-1
has caused the Debian Bug report #914378,
regarding with Python 3.7: RuntimeError: generator raised StopIteration
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.)


-- 
914378: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=914378
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Source: python-pygraphviz
Version: 1.4~rc1-1+b2
Severity: grave
Tags: patch
Justification: renders package unusable

Hi,

steps to reproduce:

$ python3 --version
Python 3.7.1
$ python3 -c 'import pygraphviz; A=pygraphviz.AGraph(); A.graph_attr.keys()'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pygraphviz/agraph.py", line 1743, in 
iteritems
    ah = gv.agnxtattr(self.handle, self.type, ah)
StopIteration: agnxtattr

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/pygraphviz/agraph.py", line 1733, in keys
    return list(self.__iter__())
  File "/usr/lib/python3/dist-packages/pygraphviz/agraph.py", line 1736, in 
__iter__
    for (k, v) in self.iteritems():
RuntimeError: generator raised StopIteration

This problem does not happen with snapshot 20181121T102052Z but does
happen with snapshot 20181121T232318Z. There is only one change between
chroots made from these two snapshots, the following packages have been
upgraded from version 3.6.7-1 to 3.7.1-1:

libpython3-stdlib, libpython3.6-minimal, libpython3.6-stdlib, python3,
python3-minimal, python3.6, python3.6-minimal

Thus I conclude that this problem was introduced because of the upgrade
of Python from 3.6 to 3.7.

Upstream has a fix here:

https://github.com/pygraphviz/pygraphviz/commit/b5df022700669ae496f65d20dd9cd387d6af948e

I backported that commit on top of the version of python-pygraphviz from
Debian unstable. Please find the patch attached.

I see that this package did not see an upload since January 2017. If you
are okay with me NMU-ing the package for this fix, then please tell me.

Alternatively, this bug can also be fixed by packaging the latest
upstream version 1.5 of pygraphviz which includes the above commit.

Thanks!

cheers, josch
diff -Nru python-pygraphviz-1.4~rc1/debian/changelog 
python-pygraphviz-1.4~rc1/debian/changelog
--- python-pygraphviz-1.4~rc1/debian/changelog  2017-01-08 21:03:20.000000000 
+0100
+++ python-pygraphviz-1.4~rc1/debian/changelog  2018-11-22 19:31:03.000000000 
+0100
@@ -1,3 +1,10 @@
+python-pygraphviz (1.4~rc1-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix StopIteration with Python 3.7
+
+ -- Johannes 'josch' Schauer <jo...@debian.org>  Thu, 22 Nov 2018 19:31:03 
+0100
+
 python-pygraphviz (1.4~rc1-1) unstable; urgency=medium
 
   * New upstream release candidate
diff -Nru 
python-pygraphviz-1.4~rc1/debian/patches/catch_stopiterations_created_by_c_code 
python-pygraphviz-1.4~rc1/debian/patches/catch_stopiterations_created_by_c_code
--- 
python-pygraphviz-1.4~rc1/debian/patches/catch_stopiterations_created_by_c_code 
    1970-01-01 01:00:00.000000000 +0100
+++ 
python-pygraphviz-1.4~rc1/debian/patches/catch_stopiterations_created_by_c_code 
    2018-11-22 19:30:55.000000000 +0100
@@ -0,0 +1,174 @@
+From b5df022700669ae496f65d20dd9cd387d6af948e Mon Sep 17 00:00:00 2001
+From: Dan Schult <dsch...@colgate.edu>
+Date: Thu, 2 Aug 2018 21:32:47 -0400
+Subject: [PATCH] catch StopIterations created by C code
+
+--- a/pygraphviz/agraph.py
++++ b/pygraphviz/agraph.py
+@@ -374,8 +374,10 @@ class AGraph(object):
+         nh = gv.agfstnode(self.handle)
+         while nh is not None:
+             yield Node(self, nh=nh)
+-            nh = gv.agnxtnode(self.handle, nh)
+-        raise StopIteration
++            try:
++                nh = gv.agnxtnode(self.handle, nh)
++            except StopIteration:
++                return
+ 
+     iternodes = nodes_iter
+ 
+@@ -597,8 +599,10 @@ class AGraph(object):
+                 yield Node(self, t)
+             else:
+                 yield Node(self, s)
+-            eh = gv.agnxtedge(self.handle, eh, nh)
+-        raise StopIteration
++            try:
++                eh = gv.agnxtedge(self.handle, eh, nh)
++            except StopIteration:
++                return
+ 
+     def neighbors(self, n):
+         """Return a list of the nodes attached to n."""
+@@ -627,8 +631,14 @@ class AGraph(object):
+                         yield (e[0], e[1], e.name)
+                     else:
+                         yield e
+-                    eh = gv.agnxtout(self.handle, eh)
+-                nh = gv.agnxtnode(self.handle, nh)
++                    try:
++                        eh = gv.agnxtout(self.handle, eh)
++                    except StopIteration:
++                        break
++                try:
++                    nh = gv.agnxtnode(self.handle, nh)
++                except StopIteration:
++                    return
+         elif nbunch in self: # if nbunch is a single node
+             n = Node(self, nbunch)
+             nh = n.handle
+@@ -639,7 +649,10 @@ class AGraph(object):
+                     yield (e[0], e[1], e.name)
+                 else:
+                     yield e
+-                eh = gv.agnxtout(self.handle, eh)
++                try:
++                    eh = gv.agnxtout(self.handle, eh)
++                except StopIteration:
++                    return
+         else:                # if nbunch is a sequence of nodes
+             try:
+                 bunch = [n for n in nbunch if n in self]
+@@ -657,8 +670,10 @@ class AGraph(object):
+                         yield (e[0], e[1], e.name)
+                     else:
+                         yield e
+-                    eh = gv.agnxtout(self.handle, eh)
+-        raise StopIteration
++                    try:
++                        eh = gv.agnxtout(self.handle, eh)
++                    except StopIteration:
++                        break
+ 
+ 
+     iteroutedges = out_edges_iter
+@@ -683,8 +698,14 @@ class AGraph(object):
+                         yield (e[0], e[1], e.name)
+                     else:
+                         yield e
+-                    eh = gv.agnxtin(self.handle, eh)
+-                nh = gv.agnxtnode(self.handle, nh)
++                    try:
++                        eh = gv.agnxtin(self.handle, eh)
++                    except StopIteration:
++                        break
++                try:
++                    nh = gv.agnxtnode(self.handle, nh)
++                except StopIteration:
++                    return
+         elif nbunch in self: # if nbunch is a single node
+             n = Node(self, nbunch)
+             nh = n.handle
+@@ -695,7 +716,10 @@ class AGraph(object):
+                     yield (e[0], e[1], e.name)
+                 else:
+                     yield e
+-                eh = gv.agnxtin(self.handle, eh)
++                try:
++                    eh = gv.agnxtin(self.handle, eh)
++                except StopIteration:
++                    break
+         else:                # if nbunch is a sequence of nodes
+             try:
+                 bunch = [n for n in nbunch if n in self]
+@@ -713,8 +737,10 @@ class AGraph(object):
+                         yield (e[0], e[1], e.name)
+                     else:
+                         yield e
+-                    eh = gv.agnxtin(self.handle, eh)
+-        raise StopIteration
++                    try:
++                        eh = gv.agnxtin(self.handle, eh)
++                    except StopIteration:
++                        break
+ 
+     def edges_iter(self, nbunch=None, keys=False):
+         """Return iterator over edges in the graph.
+@@ -780,8 +806,10 @@ class AGraph(object):
+                 yield Node(self, t)
+             else:
+                 yield Node(self, s)
+-            eh = gv.agnxtin(self.handle, eh)
+-        raise StopIteration
++            try:
++                eh = gv.agnxtin(self.handle, eh)
++            except StopIteration:
++                return
+ 
+ 
+     iterpred = predecessors_iter
+@@ -802,8 +830,10 @@ class AGraph(object):
+                 yield Node(self, t)
+             else:
+                 yield Node(self, s)
+-            eh = gv.agnxtout(self.handle, eh)
+-        raise StopIteration
++            try:
++                eh = gv.agnxtout(self.handle, eh)
++            except StopIteration:
++                return
+ 
+     itersucc = successors_iter
+ 
+@@ -1089,8 +1119,10 @@ class AGraph(object):
+             yield self.__class__(strict=self.strict,
+                                  directed=self.directed,
+                                  handle=handle)
+-            handle = gv.agnxtsubg(handle)
+-        raise StopIteration
++            try:
++                handle = gv.agnxtsubg(handle)
++            except StopIteration:
++                return
+ 
+     def subgraphs(self):
+         """Return a list of all subgraphs in the graph."""
+@@ -1745,6 +1777,8 @@ class Attribute(MutableMapping):
+                        gv.agattrdefval(ah).decode(self.encoding))
+             except KeyError: # gv.agattrdefval returned KeyError, skip
+                 continue
++            except StopIteration:  # gv.agnxtattr is done, as are we
++                return
+ 
+ 
+ class ItemAttribute(Attribute):
+@@ -1816,6 +1850,8 @@ class ItemAttribute(Attribute):
+                        value.decode(self.encoding))
+             except KeyError: # gv.agxget returned KeyError, skip
+                 continue
++            except StopIteration:  # gv.agnxtattr is done, as are we
++                return
+ 
+ def _test_suite():
+     import doctest
diff -Nru python-pygraphviz-1.4~rc1/debian/patches/series 
python-pygraphviz-1.4~rc1/debian/patches/series
--- python-pygraphviz-1.4~rc1/debian/patches/series     2017-01-08 
21:03:20.000000000 +0100
+++ python-pygraphviz-1.4~rc1/debian/patches/series     2018-11-22 
19:19:32.000000000 +0100
@@ -1 +1,2 @@
 dont_install_data.patch
+catch_stopiterations_created_by_c_code

--- End Message ---
--- Begin Message ---
Source: python-pygraphviz
Source-Version: 1.5-1

We believe that the bug you reported is fixed in the latest version of
python-pygraphviz, 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 914...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Sandro Tosi <mo...@debian.org> (supplier of updated python-pygraphviz 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: SHA256

Format: 1.8
Date: Fri, 23 Nov 2018 12:42:16 -0500
Source: python-pygraphviz
Binary: python-pygraphviz python3-pygraphviz python-pygraphviz-dbg 
python3-pygraphviz-dbg python-pygraphviz-doc
Architecture: source amd64 all
Version: 1.5-1
Distribution: unstable
Urgency: medium
Maintainer: Sandro Tosi <mo...@debian.org>
Changed-By: Sandro Tosi <mo...@debian.org>
Description:
 python-pygraphviz - Python interface to the Graphviz graph layout and 
visualization p
 python-pygraphviz-dbg - Python interface to the Graphviz graph layout and 
visualization p
 python-pygraphviz-doc - Python interface to the Graphviz graph layout and 
visualization p
 python3-pygraphviz - Python interface to the Graphviz graph layout and 
visualization p
 python3-pygraphviz-dbg - Python interface to the Graphviz graph layout and 
visualization p
Closes: 914378
Changes:
 python-pygraphviz (1.5-1) unstable; urgency=medium
 .
   [ Ondřej Nový ]
   * d/control: Set Vcs-* to salsa.debian.org
   * d/control: Deprecating priority extra as per policy 4.0.1
   * d/watch: Use https protocol
   * Convert git repository from git-dpm to gbp layout
 .
   [ Sandro Tosi ]
   * New upstream release; Closes: #914378
   * debian/copyright
     - extend packaging copyright years
     - update upstream copyright years
   * debian/control
     - bump Standards-Version to 4.2.1 (no changes needed)
   * debian/{control,rules}
     - build with py3k sphinx
Checksums-Sha1:
 c0327a8f2fd35727987667a9d0df1e1a10ed525b 2556 python-pygraphviz_1.5-1.dsc
 50e69ff58274c08895f8cb2802e43a2afc6184c1 102322 
python-pygraphviz_1.5.orig.tar.gz
 7a4b77280217233502b0279f0244084795db85ab 9036 
python-pygraphviz_1.5-1.debian.tar.xz
 0aacd90c111b5a2deb1ffa7cead518381e29c302 139888 
python-pygraphviz-dbg_1.5-1_amd64.deb
 036e9b52fb21a2c72ab875c663f1227500864b73 65064 
python-pygraphviz-doc_1.5-1_all.deb
 8933ecbdaed5de94f017f7d16ab0c1063fc876d8 13487 
python-pygraphviz_1.5-1_amd64.buildinfo
 659e16c45d5ae87ddd6be79a44f807e45dcd6e66 76500 
python-pygraphviz_1.5-1_amd64.deb
 1caf9c25c944a92eeacd853426c0cadf488d20b6 223580 
python3-pygraphviz-dbg_1.5-1_amd64.deb
 577c06f48d9e0b2dc15160225fb406e3c5e9c67c 76632 
python3-pygraphviz_1.5-1_amd64.deb
Checksums-Sha256:
 577c0b4fefe7771e0ea199c717120a0970778920672bc0cc4d6b4158aa4c61ca 2556 
python-pygraphviz_1.5-1.dsc
 c1250d6dcfe2e029fd4d92b14fa859bf612da66a7cce9872d5cc2a54e47dade3 102322 
python-pygraphviz_1.5.orig.tar.gz
 fa3aaf60a6d25be7685592c632f7ccae057fa0a889feaa6c28a619716c468c4c 9036 
python-pygraphviz_1.5-1.debian.tar.xz
 112eb63f1af03f555a3f53ec559707660e15565ab6b92648f058a45fddcffcb9 139888 
python-pygraphviz-dbg_1.5-1_amd64.deb
 cc5c26da49294d9363506a3a8fb135558d7fbb5a8f858270a78db0e1aa710818 65064 
python-pygraphviz-doc_1.5-1_all.deb
 5f9729007302b916b8b234ab7a44803330a81cb7f00007a2ad7eb1fcc02d4c41 13487 
python-pygraphviz_1.5-1_amd64.buildinfo
 170aaa7a4dc0f36c07696affcb318b7848511eadef9e3e327d01bff5a668bab5 76500 
python-pygraphviz_1.5-1_amd64.deb
 b1807247a3d16e7a4ed349305c09abd9c6b2f375f4211aef74f07751ad1952cf 223580 
python3-pygraphviz-dbg_1.5-1_amd64.deb
 4282b05508563b16aca8a546b8c84eea24ffb4e9cbd079b08d5625778501eca6 76632 
python3-pygraphviz_1.5-1_amd64.deb
Files:
 3b0a126211436b452aa8b7a654972e60 2556 python optional 
python-pygraphviz_1.5-1.dsc
 fd4b9bffd8cd206b72bb113c99a5b308 102322 python optional 
python-pygraphviz_1.5.orig.tar.gz
 801176cf39a0b0c4d0e206f04cd5ac24 9036 python optional 
python-pygraphviz_1.5-1.debian.tar.xz
 12aa4aba3b5a7677426becbbe9730d70 139888 debug optional 
python-pygraphviz-dbg_1.5-1_amd64.deb
 d750c338cbd7e4d57f18f970a8f8ee59 65064 doc optional 
python-pygraphviz-doc_1.5-1_all.deb
 ab93df2e75aed9a98531e40d451486e1 13487 python optional 
python-pygraphviz_1.5-1_amd64.buildinfo
 597a97b9af75d89a196600a9c4359359 76500 python optional 
python-pygraphviz_1.5-1_amd64.deb
 98dae5c37a84623fc87eb2f6d414c7a9 223580 debug optional 
python3-pygraphviz-dbg_1.5-1_amd64.deb
 189a1efdaed4ea9d34807e27af0c3ab1 76632 python optional 
python3-pygraphviz_1.5-1_amd64.deb

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

iQIzBAEBCAAdFiEEufrTGSrz5KUwnZ05h588mTgBqU8FAlv4QdgACgkQh588mTgB
qU8CLA//fRvlm9yAFWN8MqrEZFpsIal70F1xSkkyIRMUfpu4cpj2Ippp+uwPHSGx
4g+EjasxolmCfQfVaewOcnK5QucGYf1yZ1lb86m1jljWS5JQ81JII5pUevQ1Y9cA
QvmZBXXbnZJugbUPPuM/1mIdPQheM9eph1CCVVPyoztXrvfT/C3PmB9vNiIBjiiw
NKWEjYUIC2Ukfma+lih4rC9tzD36l6lqQgkbUg5MULTOXYr+MOzIRdMFqAPurPwc
Y/qN1h5npiHDAFJlkFuh9imZ98MCk2Gjc5SR6bBlICKEkt84gw0bcTLnrlGXW+b5
mwTxAbQRfqS1gSr2CY+XGtUrexe1LnKTQIoNzQqrVxkJyyYUcf/vF2q1PzqUUg4r
ve07sYtNBEH92aa36TquDAwnEGd0N+jgluYjiP4fsWl4OvWk9jrLZ5bfiaJV9jkg
1CysA4nYDPoEXnZ4Og4ns7Y15RjIWPP4pKHB7WNIz/GtPxNLK8x7d2BZ0IR8sQjI
nM7/ENF5RuSIMYFBPqGTmbrYYx0M7uzHtIIQW8LPPUIRn4Gj6rjbSL3cl5vrOVEy
idLBrSqrpkVwZFRblbNII5UhIIKYsa7Q+KRMEMMX3Y3Ug9r7XeB1HVFL+2jOs26H
YMISZGLc7iHYxeV16zUqUFMTdle3wt7/Ko90cuobPs6XUR8wM9M=
=DWir
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to