[ecflow] 43/50: More python3 changes

Alastair McKinstry mckinstry at moszumanska.debian.org
Wed Sep 20 15:30:54 UTC 2017


This is an automated email from the git hooks/post-receive script.

mckinstry pushed a commit to branch debian/master
in repository ecflow.

commit 30fef17545ddf92d63746ae492e84ba076e76e2e
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Mon Jul 17 13:32:03 2017 +0100

    More python3 changes
---
 debian/changelog             |  4 +--
 debian/patches/python3.patch | 84 ++++++++++++++++++++++++++++++++++++++------
 2 files changed, 75 insertions(+), 13 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 3136eb2..e68c161 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,6 @@
-ecflow (4.6.1-1) UNRELEASED; urgency=medium
+ecflow (4.6.1-1) unstable; urgency=medium
 
 
   * Initial release. (Closes: #679237)
 
- -- Alastair McKinstry <mckinstry at debian.org>  Mon, 23 Jan 2017 11:18:00 +0000
+ -- Alastair McKinstry <mckinstry at debian.org>  Mon, 17 Jul 2017 13:25:01 +0100
diff --git a/debian/patches/python3.patch b/debian/patches/python3.patch
index 8d99df1..991f6ec 100644
--- a/debian/patches/python3.patch
+++ b/debian/patches/python3.patch
@@ -258,7 +258,7 @@ Index: ecflow-4.6.1/Pyext/samples/api/sms2ecf.py
 ===================================================================
 --- ecflow-4.6.1.orig/Pyext/samples/api/sms2ecf.py
 +++ ecflow-4.6.1/Pyext/samples/api/sms2ecf.py
-@@ -56,7 +56,7 @@ DICT_SMS_ECF = {
+@@ -54,7 +54,7 @@ DICT_SMS_ECF = {
      'SMSLOGTIMEOUT': 'ECF_LOGTIMEOUT',
  }
  
@@ -267,7 +267,7 @@ Index: ecflow-4.6.1/Pyext/samples/api/sms2ecf.py
        
  def translate(name, value=None):
      """ find and replace submit, kill and status command, according to
-@@ -90,7 +90,7 @@ def translate(name, value=None):
+@@ -88,7 +88,7 @@ def translate(name, value=None):
                  else: rc = STATCMD + " %s" % rc
              return rc
  
@@ -276,7 +276,7 @@ Index: ecflow-4.6.1/Pyext/samples/api/sms2ecf.py
          if name in ('SMSCMD', 'SMSKILL', 'SMSSTATUSCMD', 'SMSHOME'):
              value2 = value.replace('SMS', 'ECF_')
              value  = value2.replace(smssubmit, ecfsubmit)
-@@ -99,7 +99,7 @@ def translate(name, value=None):
+@@ -97,7 +97,7 @@ def translate(name, value=None):
              value  = value2.replace(smssubmit, ecfsubmit)
          transl = DICT_SMS_ECF[name]
  
@@ -334,6 +334,15 @@ Index: ecflow-4.6.1/Pyext/samples/api/ecf.py
  
  class Date(Time):
      """ wrapper to add date """
+@@ -461,7 +462,7 @@ class Limit(Attribute):
+     def add_to(self, node):
+         if USE_LIMIT and self.name is not None:
+             if type(self.name) is dict:
+-                for name, size in self.name.items():
++                for name, size in list(self.name.items()):
+                     node.add_limit(name, size)
+             else: node.add_limit(self.name, self.size)
+ 
 @@ -471,7 +472,7 @@ class Late(Attribute):
      def __init__(self, arg):
          self.data = None
@@ -343,7 +352,19 @@ Index: ecflow-4.6.1/Pyext/samples/api/ecf.py
              return
          sub = False
          act = False
-@@ -535,14 +536,14 @@ class Variables(Attribute):
+@@ -526,26 +527,26 @@ class Variables(Attribute):
+         if self.data is None:
+             self.data = Variable(keyt, valt)
+         else:
+-            next = self.next
+-            self.next = Variables(keyt, valt, next)
++            next = self.__next__
++            self.__next__ = Variables(keyt, valt, next)
+ 
+     def __init__(self, __a=None, __b=None, __next=None, *args, **kwargs):
+         self.data = None
+-        self.next = __next
++        self.next = __next__
  
          if len(args) > 0:
              if type(args) == list:
@@ -360,17 +381,35 @@ Index: ecflow-4.6.1/Pyext/samples/api/ecf.py
 +            for key, val in list(kwargs.items()):
                  self._set_tvar(key, val)
          if type(__a) == dict:
-             for key, val in __a.items():
-@@ -577,7 +578,7 @@ class Variables(Attribute):
+-            for key, val in __a.items():
++            for key, val in list(__a.items()):
+                 self._set_tvar(key, val)
+         elif type(__a) == tuple: raise BaseException()
+             # for key, val in __a.items(): self._set_tvar(key, val)
+@@ -577,8 +578,8 @@ class Variables(Attribute):
              elif "edit HOST " in edit:
                node.add_label("infophs", edit.replace("edit HOST ", ""))
            except: pass
 -        if self.next is not None:
+-            self.next.add_to(node)
 +        if self.__next__ is not None:
-             self.next.add_to(node)
++            self.__next__.add_to(node)
  
      def add(self, what): raise baseException(what.fullname())
-@@ -599,13 +600,13 @@ class Limits(Attribute):
+ 
+@@ -590,25 +591,25 @@ class Limits(Attribute):
+         if self.data is None:
+             self.data = ecflow.Limit(key, val)
+         else:
+-            next = self.next
+-            self.next = Limits(key, val, next)
++            next = self.__next__
++            self.__next__ = Limits(key, val, next)
+ 
+     def __init__(self, __a=None, __b=None, __next=None, *args, **kwargs):
+         self.data = None
+-        self.next = __next
++        self.__next__ = __next
  
          if len(args) > 0:
              if type(args) == list:
@@ -386,7 +425,22 @@ Index: ecflow-4.6.1/Pyext/samples/api/ecf.py
 +            for key, val in list(kwargs.items()):
                  self._set_tvar(key, val)
          elif type(__a) == dict:
-             for key in sorted(__a.iterkeys()):
+-            for key in sorted(__a.iterkeys()):
++            for key in sorted(__a.keys()):
+                 self._set_tvar(key, __a[key])
+ 
+         if __a is not None and __b is not None:
+@@ -617,8 +618,8 @@ class Limits(Attribute):
+     def add_to(self, node):
+         if self.data is not None:
+             node.add_limit(self.data)
+-        if self.next is not None:
+-            self.next.add_to(node)
++        if self.__next__ is not None:
++            self.__next__.add_to(node)
+ 
+ class Repeat(Attribute):
+     def __init__(self, name="YMD", start=20120101, end=21010101, step=1, kind="date"):
 @@ -725,7 +726,7 @@ class Root(object): # from where Suite a
  
      def add(self, item=None, *args):
@@ -410,9 +464,17 @@ Index: ecflow-4.6.1/Pyext/samples/api/ecf.py
                    raise BaseException("not yet", self, type(item), exc)
  
          if len(args) > 0:
-@@ -786,7 +787,7 @@ class Node(Root): # from where Task and
+@@ -780,13 +781,13 @@ class Node(Root): # from where Task and
+ 
+     def add_limits(self, __a = None, __b = None, **kwargs):
+         """ add limit dependency"""
+-        if isinstance(__a, basestring):
++        if isinstance(__a, str):
+             self.add_limit(__a, __b)
+         elif isinstance(__a, dict):
              assert __b is None
-             for key, val in __a.items():
+-            for key, val in __a.items():
++            for key, val in list(__a.items()):
                  self.add_limit(key, val)
 -        for key, val in kwargs.items():
 +        for key, val in list(kwargs.items()):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/ecflow.git



More information about the debian-science-commits mailing list