[Python-modules-commits] r13596 - in packages/python-pygraphviz/trunk/debian (5 files)

morph at users.alioth.debian.org morph at users.alioth.debian.org
Thu Jun 24 14:30:29 UTC 2010


    Date: Thursday, June 24, 2010 @ 14:30:14
  Author: morph
Revision: 13596

* debian/patches/changeset_r{1131, 1746, 1752}.diff
  - added from upstream svn to support Python 2.6 (no string exceptions and
    not access to __dict__); Closes: #585317

Added:
  packages/python-pygraphviz/trunk/debian/patches/changeset_r1131.diff
  packages/python-pygraphviz/trunk/debian/patches/changeset_r1746.diff
  packages/python-pygraphviz/trunk/debian/patches/changeset_r1752.diff
Modified:
  packages/python-pygraphviz/trunk/debian/changelog
  packages/python-pygraphviz/trunk/debian/patches/series

Modified: packages/python-pygraphviz/trunk/debian/changelog
===================================================================
--- packages/python-pygraphviz/trunk/debian/changelog	2010-06-24 13:56:02 UTC (rev 13595)
+++ packages/python-pygraphviz/trunk/debian/changelog	2010-06-24 14:30:14 UTC (rev 13596)
@@ -6,8 +6,11 @@
     - removed pyversions, now using XS-P-V
   * debian/watch
     - only report number-only versions
+  * debian/patches/changeset_r{1131, 1746, 1752}.diff
+    - added from upstream svn to support Python 2.6 (no string exceptions and
+      not access to __dict__); Closes: #585317
 
- -- Sandro Tosi <morph at debian.org>  Wed, 23 Jun 2010 19:50:53 +0200
+ -- Sandro Tosi <morph at debian.org>  Thu, 24 Jun 2010 16:21:18 +0200
 
 python-pygraphviz (0.99.1-1) unstable; urgency=low
 

Added: packages/python-pygraphviz/trunk/debian/patches/changeset_r1131.diff
===================================================================
--- packages/python-pygraphviz/trunk/debian/patches/changeset_r1131.diff	                        (rev 0)
+++ packages/python-pygraphviz/trunk/debian/patches/changeset_r1131.diff	2010-06-24 14:30:14 UTC (rev 13596)
@@ -0,0 +1,119 @@
+Index: pygraphviz/pygraphviz/agraph.py
+===================================================================
+--- pygraphviz/pygraphviz/agraph.py (revision 1130)
++++ pygraphviz/pygraphviz/agraph.py (revision 1131)
+@@ -260,5 +260,5 @@
+             gv.agdelnode(self.handle,nh)
+         except KeyError:
+-            raise KeyError("node %s not in graph"%n)
++            raise KeyError("Node %s not in graph."%n)
+ 
+     delete_node=remove_node
+@@ -425,5 +425,5 @@
+             gv.agdeledge(self.handle,e.handle)
+         except KeyError:
+-            raise KeyError("edge %s-%s not in graph"%(u,v))
++            raise KeyError("Edge %s-%s not in graph."%(u,v))
+ 
+     delete_edge=remove_edge        
+@@ -538,5 +538,5 @@
+             except TypeError:
+                 raise TypeError(
+-                      "nbunch is not a node or a sequence of nodes")
++                      "nbunch is not a node or a sequence of nodes.")
+             for n in nbunch:
+                 try: 
+@@ -591,5 +591,5 @@
+             except TypeError:
+                 raise TypeError(
+-                      "nbunch is not a node or a sequence of nodes")
++                      "nbunch is not a node or a sequence of nodes.")
+             for n in nbunch:
+                 try: 
+@@ -689,5 +689,5 @@
+             try: bunch=[Node(self,n) for n in nbunch if n in self]
+             except TypeError:
+-                raise TypeError("nbunch is not a node or a sequence of nodes")
++                raise TypeError("nbunch is not a node or a sequence of nodes.")
+         for n in bunch:
+             yield (Node(self,n),gv.agdegree(self.handle,
+@@ -852,5 +852,5 @@
+                 # bunch=(n for n in nbunch if n in self) # need python 2.4
+             except TypeError:
+-               raise TypeError("nbunch is not a node or a sequence of nodes")
++               raise TypeError("nbunch is not a node or a sequence of nodes.")
+         return bunch
+ 
+@@ -877,5 +877,6 @@
+         """Remove subgraph with given name."""  
+         handle=gv.agsubg(self.handle,name,_Action.find)
+-        if handle is None: raise KeyError("subgraph %s not in graph"%name)
++        if handle is None: 
++            raise KeyError("Subgraph %s not in graph."%name)
+         gv.agdelsubg(self.handle,handle)
+         
+@@ -1102,5 +1103,5 @@
+             p=gvprogs[prog]
+         except KeyError:
+-            raise ValueError("prog %s is not one of: %s"%\
++            raise ValueError("Program %s is not one of: %s."%\
+                            (prog,', '.join(gvprogs.keys()))) 
+     
+@@ -1108,5 +1109,5 @@
+             runprog = self._which(prog)
+         except:
+-            raise ValueError("program %s not found in path"%prog) 
++            raise ValueError("Program %s not found in path."%prog) 
+         return runprog
+ 
+@@ -1276,6 +1277,6 @@
+             except:
+                 raise AttributeError(\
+-                    """graph has no layout information, see layout()
+-                or specify prog=%s"""%\
++                    """Graph has no layout information, see layout()
++                or specify prog=%s."""%\
+                 ("|".join(['neato','dot','twopi','circo','fdp','nop'])))
+ 
+@@ -1333,5 +1334,5 @@
+             fh = path
+         else:
+-            raise TypeError('path must be a string or file handle')
++            raise TypeError('path must be a string or file handle.')
+         return fh
+ 
+@@ -1350,5 +1351,5 @@
+             if match:
+                 return match[0]
+-        raise ValueError, "no prog %s in path"%name        
++        raise ValueError, "No prog %s in path."%name        
+ 
+ 
+@@ -1390,5 +1391,5 @@
+                 nh=gv.agnode(graph.handle,n,_Action.find)
+             except KeyError:
+-                raise KeyError("node %s not in graph"%n)
++                raise KeyError("Node %s not in graph."%n)
+             
+         n.ghandle=graph.handle
+@@ -1460,5 +1461,5 @@
+                              _Action.find)
+             except KeyError:
+-                raise KeyError("edge %s-%s not in graph"%(source,target))
++                raise KeyError("Edge %s-%s not in graph."%(source,target))
+ 
+         tp=tuple.__new__(self,(s,t))
+@@ -1514,5 +1515,5 @@
+                     pass
+         except TypeError:
+-            raise "Attribute value must be a string"
++            raise TypeError("Attribute value must be a string.")
+ 
+ 
+@@ -1587,5 +1588,5 @@
+                 pass
+         except TypeError:
+-            raise "Attribute value must be a string"
++            raise TypeError("Attribute value must be a string.")
+ 
+     def __getitem__(self, name):

Added: packages/python-pygraphviz/trunk/debian/patches/changeset_r1746.diff
===================================================================
--- packages/python-pygraphviz/trunk/debian/patches/changeset_r1746.diff	                        (rev 0)
+++ packages/python-pygraphviz/trunk/debian/patches/changeset_r1746.diff	2010-06-24 14:30:14 UTC (rev 13596)
@@ -0,0 +1,44 @@
+Index: pygraphviz/pygraphviz/agraph.py
+===================================================================
+--- pygraphviz/pygraphviz/agraph.py (revision 1714)
++++ pygraphviz/pygraphviz/agraph.py (revision 1746)
+@@ -1512,6 +1512,6 @@
+     # atype:graph=0, node=1,edge=3
+     def __init__(self,handle,atype):
+-        self.__dict__['handle']=handle
+-        self.__dict__['type']=atype
++        self.handle=handle
++        self.type=atype
+ 
+     def __setitem__(self, name, value):
+@@ -1591,7 +1591,7 @@
+     # graphs and default node and edge attributes use Attribute
+     def __init__(self,handle,atype):
+-        self.__dict__['handle']=handle
+-        self.__dict__['type']=atype
+-        self.__dict__['ghandle']=gv.agraphof(handle)
++        self.handle=handle
++        self.type=atype
++        self.ghandle=gv.agraphof(handle)
+ 
+     def __setitem__(self, name, value):
+Index: pygraphviz/examples/miles.py
+===================================================================
+--- pygraphviz/examples/miles.py (revision 1069)
++++ pygraphviz/examples/miles.py (revision 1746)
+@@ -43,11 +43,8 @@
+     # open file miles_dat.txt.gz (or miles_dat.txt)
+     try:
+-        try:
+-            import gzip
+-            fh = gzip.open('miles_dat.txt.gz','r')
+-        except:
+-            fh=open("miles_dat.txt","r")
+-    except IOError:
+-        raise "File miles_dat.txt not found."
++        import gzip
++        fh = gzip.open('miles_dat.txt.gz','r')
++    except:
++        fh=open("miles_dat.txt","r")
+ 
+     G=pgv.AGraph(name='miles_dat')

Added: packages/python-pygraphviz/trunk/debian/patches/changeset_r1752.diff
===================================================================
--- packages/python-pygraphviz/trunk/debian/patches/changeset_r1752.diff	                        (rev 0)
+++ packages/python-pygraphviz/trunk/debian/patches/changeset_r1752.diff	2010-06-24 14:30:14 UTC (rev 13596)
@@ -0,0 +1,27 @@
+Index: pygraphviz/pygraphviz/agraph.py
+===================================================================
+--- pygraphviz/pygraphviz/agraph.py (revision 1746)
++++ pygraphviz/pygraphviz/agraph.py (revision 1752)
+@@ -540,6 +540,5 @@
+             try: bunch=[n for n in nbunch if n in self]
+             except TypeError:
+-                raise TypeError(
+-                      "nbunch is not a node or a sequence of nodes.")
++                raise TypeError("nbunch is not a node or a sequence of nodes.")
+             for n in nbunch:
+                 try: 
+@@ -593,6 +592,5 @@
+             try: bunch=[n for n in nbunch if n in self]
+             except TypeError:
+-                raise TypeError(
+-                      "nbunch is not a node or a sequence of nodes.")
++                raise TypeError("nbunch is not a node or a sequence of nodes.")
+             for n in nbunch:
+                 try: 
+@@ -1368,5 +1366,5 @@
+             if match:
+                 return match[0]
+-        raise ValueError, "No prog %s in path."%name        
++        raise ValueError("No prog %s in path."%name)        
+ 
+ 

Modified: packages/python-pygraphviz/trunk/debian/patches/series
===================================================================
--- packages/python-pygraphviz/trunk/debian/patches/series	2010-06-24 13:56:02 UTC (rev 13595)
+++ packages/python-pygraphviz/trunk/debian/patches/series	2010-06-24 14:30:14 UTC (rev 13596)
@@ -1 +1,4 @@
 10_ship_examples_miles.dat
+changeset_r1131.diff
+changeset_r1746.diff
+changeset_r1752.diff




More information about the Python-modules-commits mailing list