[med-svn] [Git][med-team/gwyddion][master] Append all changes into changelog and 2to3 patch to close bug
Shayan Doust
gitlab at salsa.debian.org
Sat Sep 28 19:13:15 BST 2019
Shayan Doust pushed to branch master at Debian Med / gwyddion
Commits:
11e5ec41 by Shayan Doust at 2019-09-28T07:19:41Z
Append all changes into changelog and 2to3 patch to close bug
- - - - -
4 changed files:
- debian/changelog
- debian/control
- + debian/patches/2to3.patch
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,6 +1,9 @@
gwyddion (2.54-1) UNRELEASED; urgency=medium
+ * Team upload
* New upstream release
+ * Use 2to3 to port over python2 files to python3
+ Closes: #936681
-- Shayan Doust <hello at shayandoust.me> Sat, 28 Sep 2019 05:36:31 +0100
=====================================
debian/control
=====================================
@@ -10,9 +10,9 @@ Build-Depends: debhelper (>= 12~),
libfftw3-dev,
libminizip-dev,
libxmu6,
- python-gtk2-dev,
+ python3-gtk2-dev,
libgtksourceview2.0-dev,
- python,
+ python3,
ruby,
libxml2-dev,
chrpath
@@ -68,7 +68,7 @@ Architecture: any
Depends: ${shlibs:Depends},
${misc:Depends},
gwyddion,
- python
+ python3
Description: plugins for Gwyddion SPM analysis tool
Gwyddion is a modular program for Scanning Probe Microscopy (SPM) data
visualization and analysis. It is primarily intended for analysis of height
@@ -92,7 +92,7 @@ Architecture: any
Section: libs
Depends: ${shlibs:Depends},
${misc:Depends},
- python,
+ python3,
gwyddion-common (= ${source:Version})
Suggests: libgwyddion20-doc
Description: libraries for Gwyddion SPM analysis tool
=====================================
debian/patches/2to3.patch
=====================================
@@ -0,0 +1,1229 @@
+Description: port over python2 files to python3
+Author: Shayan Doust <hello at shayandoust.me>
+Bug-Debian: https://bugs.debian.org/936681
+Last-Update: 2019-09-28
+---
+
+Index: gwyddion/devel-docs/add-objects.py
+===================================================================
+--- gwyddion.orig/devel-docs/add-objects.py 2019-09-28 08:03:02.934097799 +0100
++++ gwyddion/devel-docs/add-objects.py 2019-09-28 08:03:02.922097661 +0100
+@@ -5,7 +5,7 @@
+ debug = False
+
+ if len(sys.argv) < 3:
+- print sys.argv[0], 'SECTION_FILE [--standard-files=FILE,...]'
++ print(sys.argv[0], 'SECTION_FILE [--standard-files=FILE,...]')
+ sys.exit(1)
+
+ title_re = re.compile(r'<TITLE>(?P<object>\w+)</TITLE>')
+@@ -57,7 +57,7 @@
+ tostd.add(symbol)
+
+ if debug:
+- print section['FILE'], tostd
++ print(section['FILE'], tostd)
+ section['Symbols'].extend(symbol for symbol in substd
+ if symbol not in tostd)
+ section['Standard'] = [symbol for symbol in substd
+Index: gwyddion/modules/pygwy/gwyutils.py
+===================================================================
+--- gwyddion.orig/modules/pygwy/gwyutils.py 2019-09-28 08:03:02.934097799 +0100
++++ gwyddion/modules/pygwy/gwyutils.py 2019-09-28 08:03:02.922097661 +0100
+@@ -36,7 +36,7 @@
+ and similar functions to get lists of specific data types.
+ """
+ l = []
+- for key in container.keys():
++ for key in list(container.keys()):
+ x = container.get_value(key)
+ if type(x) is gwy.DataField:
+ l.append(x)
+Index: gwyddion/modules/pygwy/pygtk-embed/codegen/argtypes.py
+===================================================================
+--- gwyddion.orig/modules/pygwy/pygtk-embed/codegen/argtypes.py 2019-09-28 08:03:02.934097799 +0100
++++ gwyddion/modules/pygwy/pygtk-embed/codegen/argtypes.py 2019-09-28 08:03:02.922097661 +0100
+@@ -20,13 +20,13 @@
+ def __init__(self):
+ self.vars = {}
+ def add(self, ctype, name):
+- if self.vars.has_key(ctype):
++ if ctype in self.vars:
+ self.vars[ctype] = self.vars[ctype] + (name,)
+ else:
+ self.vars[ctype] = (name,)
+ def __str__(self):
+ ret = []
+- for type in self.vars.keys():
++ for type in list(self.vars.keys()):
+ ret.append(' ')
+ ret.append(type)
+ ret.append(' ')
+@@ -867,7 +867,7 @@
+ self.register('GdkBitmap', oa)
+ self.register('GdkBitmap*', oa)
+ def register_boxed(self, ptype, typecode):
+- if self.argtypes.has_key(ptype): return
++ if ptype in self.argtypes: return
+ arg = BoxedArg(ptype, typecode)
+ self.register(ptype, arg)
+ self.register(ptype+'*', arg)
+@@ -934,7 +934,7 @@
+ def object_is_a(self, otype, parent):
+ if otype == None: return 0
+ if otype == parent: return 1
+- if not self.argtypes.has_key(otype): return 0
++ if otype not in self.argtypes: return 0
+ return self.object_is_a(self.get(otype).parent, parent)
+
+ matcher = ArgMatcher()
+Index: gwyddion/modules/pygwy/pygtk-embed/codegen/codegen.py
+===================================================================
+--- gwyddion.orig/modules/pygwy/pygtk-embed/codegen/codegen.py 2019-09-28 08:03:02.934097799 +0100
++++ gwyddion/modules/pygwy/pygtk-embed/codegen/codegen.py 2019-09-28 08:03:02.926097707 +0100
+@@ -6,11 +6,11 @@
+ import string
+ import sys
+
+-import argtypes
+-import definitions
+-import defsparser
+-import override
+-import reversewrapper
++from . import argtypes
++from . import definitions
++from . import defsparser
++from . import override
++from . import reversewrapper
+ import warnings
+
+ class Coverage(object):
+@@ -268,7 +268,7 @@
+ self.fp.write('\n/* ----------- %s ----------- */\n\n' %
+ self.objinfo.c_name)
+ substdict = self.get_initial_class_substdict()
+- if not substdict.has_key('tp_flags'):
++ if 'tp_flags' not in substdict:
+ substdict['tp_flags'] = 'Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE'
+ substdict['typename'] = self.objinfo.c_name
+ if self.overrides.modulename:
+@@ -298,7 +298,7 @@
+ self.write_function(slotname, data)
+ substdict[slot] = slotfunc
+ else:
+- if not substdict.has_key(slot):
++ if slot not in substdict:
+ substdict[slot] = '0'
+
+ self.fp.write(self.type_tmpl % substdict)
+@@ -426,7 +426,7 @@
+ constructor))[0]
+ self.fp.write(code)
+ initfunc = '_wrap_' + funcname
+- except argtypes.ArgTypeError, ex:
++ except argtypes.ArgTypeError as ex:
+ sys.stderr.write('Could not write constructor for %s: %s\n'
+ % (self.objinfo.c_name, str(ex)))
+
+@@ -503,7 +503,7 @@
+ 'flags': methflags,
+ 'docstring': meth.docstring })
+ methods_coverage.declare_wrapped()
+- except argtypes.ArgTypeError, ex:
++ except argtypes.ArgTypeError as ex:
+ methods_coverage.declare_not_wrapped()
+ sys.stderr.write('Could not write method %s.%s: %s\n'
+ % (klass, meth.name, str(ex)))
+@@ -525,7 +525,7 @@
+ 'flags': methflags,
+ 'docstring': 'NULL' })
+ methods_coverage.declare_wrapped()
+- except argtypes.ArgTypeError, ex:
++ except argtypes.ArgTypeError as ex:
+ methods_coverage.declare_not_wrapped()
+ sys.stderr.write('Could not write method %s.%s: %s\n'
+ % (klass, method_name, str(ex)))
+@@ -579,7 +579,7 @@
+ 'flags': methflags + '|METH_CLASS',
+ 'docstring': 'NULL'})
+ vaccessors_coverage.declare_wrapped()
+- except argtypes.ArgTypeError, ex:
++ except argtypes.ArgTypeError as ex:
+ vaccessors_coverage.declare_not_wrapped()
+ sys.stderr.write(
+ 'Could not write virtual accessor method %s.%s: %s\n'
+@@ -623,7 +623,7 @@
+ self.fp.write(buf.flush())
+ virtuals.append((fixname(meth.name), '_wrap_' + method_name))
+ vproxies_coverage.declare_wrapped()
+- except argtypes.ArgTypeError, ex:
++ except argtypes.ArgTypeError as ex:
+ vproxies_coverage.declare_not_wrapped()
+ virtuals.append((fixname(meth.name), None))
+ sys.stderr.write('Could not write virtual proxy %s.%s: %s\n'
+@@ -711,7 +711,7 @@
+ 'field': self.get_field_accessor(cfname),
+ 'codeafter': info.get_codeafter() })
+ gettername = funcname
+- except argtypes.ArgTypeError, ex:
++ except argtypes.ArgTypeError as ex:
+ sys.stderr.write(
+ "Could not write getter for %s.%s: %s\n"
+ % (self.objinfo.c_name, fname, str(ex)))
+@@ -851,7 +851,7 @@
+ functions.append((func.name, '_wrap_' + funcname,
+ methflags, func.docstring))
+ functions_coverage.declare_wrapped()
+- except argtypes.ArgTypeError, ex:
++ except argtypes.ArgTypeError as ex:
+ functions_coverage.declare_not_wrapped()
+ sys.stderr.write('Could not write function %s: %s\n'
+ % (func.name, str(ex)))
+@@ -865,7 +865,7 @@
+ functions.append((funcname, '_wrap_' + funcname,
+ methflags, 'NULL'))
+ functions_coverage.declare_wrapped()
+- except argtypes.ArgTypeError, ex:
++ except argtypes.ArgTypeError as ex:
+ functions_coverage.declare_not_wrapped()
+ sys.stderr.write('Could not write function %s: %s\n'
+ % (funcname, str(ex)))
+@@ -994,17 +994,17 @@
+ def write_property_based_constructor(self, constructor):
+ self.objinfo.has_new_constructor_api = True
+ out = self.fp
+- print >> out, "static int"
+- print >> out, '_wrap_%s(PyGObject *self, PyObject *args,' \
+- ' PyObject *kwargs)\n{' % constructor.c_name
++ print("static int", file=out)
++ print('_wrap_%s(PyGObject *self, PyObject *args,' \
++ ' PyObject *kwargs)\n{' % constructor.c_name, file=out)
+ if constructor.params:
+ s = " GType obj_type = pyg_type_from_object((PyObject *) self);"
+- print >> out, s
++ print(s, file=out)
+
+ def py_str_list_to_c(arg):
+ if arg:
+ return "{" + ", ".join(
+- map(lambda s: '"' + s + '"', arg)) + ", NULL }"
++ ['"' + s + '"' for s in arg]) + ", NULL }"
+ else:
+ return "{ NULL }"
+
+@@ -1024,21 +1024,21 @@
+ [param.pname
+ for param in mandatory_arguments + optional_arguments])
+
+- print >> out, " GParameter params[%i];" % \
+- len(constructor.params)
+- print >> out, " PyObject *parsed_args[%i] = {NULL, };" % \
+- len(constructor.params)
+- print >> out, " char *arg_names[] = %s;" % arg_names
+- print >> out, " char *prop_names[] = %s;" % prop_names
+- print >> out, " guint nparams, i;"
+- print >> out
++ print(" GParameter params[%i];" % \
++ len(constructor.params), file=out)
++ print(" PyObject *parsed_args[%i] = {NULL, };" % \
++ len(constructor.params), file=out)
++ print(" char *arg_names[] = %s;" % arg_names, file=out)
++ print(" char *prop_names[] = %s;" % prop_names, file=out)
++ print(" guint nparams, i;", file=out)
++ print(file=out)
+ if constructor.deprecated is not None:
+ out.write(
+ ' if (PyErr_Warn(PyExc_DeprecationWarning, '
+ '"%s") < 0)\n' %
+ constructor.deprecated)
+- print >> out, ' return -1;'
+- print >> out
++ print(' return -1;', file=out)
++ print(file=out)
+ out.write(" if (!PyArg_ParseTupleAndKeywords(args, kwargs, ")
+ template = '"'
+ if mandatory_arguments:
+@@ -1046,9 +1046,9 @@
+ if optional_arguments:
+ template += "|" + "O"*len(optional_arguments)
+ template += ':%s.__init__"' % classname
+- print >> out, template, ", arg_names",
++ print(template, ", arg_names", end=' ', file=out)
+ for i in range(len(constructor.params)):
+- print >> out, ", &parsed_args[%i]" % i,
++ print(", &parsed_args[%i]" % i, end=' ', file=out)
+
+ out.write(
+ "))\n"
+@@ -1090,7 +1090,7 @@
+ ' }\n' % classname)
+
+ if not constructor.caller_owns_return:
+- print >> out, " g_object_ref(self->obj);\n"
++ print(" g_object_ref(self->obj);\n", file=out)
+
+ out.write(
+ ' return 0;\n'
+@@ -1177,7 +1177,7 @@
+ self.fp.write(buf.flush())
+ proxies.append((fixname(meth.name), '_wrap_' + method_name))
+ iproxies_coverage.declare_wrapped()
+- except argtypes.ArgTypeError, ex:
++ except argtypes.ArgTypeError as ex:
+ iproxies_coverage.declare_not_wrapped()
+ proxies.append((fixname(meth.name), None))
+ sys.stderr.write('Could not write interface proxy %s.%s: %s\n'
+@@ -1620,10 +1620,10 @@
+ indent_str + 'pyg_set_object_has_new_constructor(%s);\n' %
+ obj.typecode)
+ else:
+- print >> sys.stderr, (
++ print((
+ "Warning: Constructor for %s needs to be updated to new API\n"
+ " See http://live.gnome.org/PyGTK_2fWhatsNew28"
+- "#update-constructors") % obj.c_name
++ "#update-constructors") % obj.c_name, file=sys.stderr)
+
+ if obj.class_init_func is not None:
+ self.fp.write(
+@@ -1686,7 +1686,7 @@
+ errorfilename = arg
+ elif opt in ('-t', '--load-types'):
+ globals = {}
+- execfile(arg, globals)
++ exec(compile(open(arg, "rb").read(), arg, 'exec'), globals)
+ elif opt == '-D':
+ nameval = arg.split('=')
+ try:
+@@ -1698,7 +1698,7 @@
+ elif opt == '--py_ssize_t-clean':
+ py_ssize_t_clean = True
+ if len(args) < 1:
+- print >> sys.stderr, usage
++ print(usage, file=sys.stderr)
+ return 1
+ if errorfilename:
+ sys.stderr = open(errorfilename, "w")
+Index: gwyddion/modules/pygwy/pygtk-embed/codegen/definitions.py
+===================================================================
+--- gwyddion.orig/modules/pygwy/pygtk-embed/codegen/definitions.py 2019-09-28 08:03:02.934097799 +0100
++++ gwyddion/modules/pygwy/pygtk-embed/codegen/definitions.py 2019-09-28 08:03:02.926097707 +0100
+@@ -210,7 +210,7 @@
+
+ class FlagsDef(EnumDef):
+ def __init__(self, *args):
+- apply(EnumDef.__init__, (self,) + args)
++ EnumDef.__init__(*(self,) + args)
+ self.deftype = 'flags'
+
+ class BoxedDef(Definition):
+@@ -463,8 +463,8 @@
+ self.params.append(Parameter(ptype, pname, pdflt, pnull))
+ elif arg[0] == 'properties':
+ if self.is_constructor_of is None:
+- print >> sys.stderr, "Warning: (properties ...) "\
+- "is only valid for constructors"
++ print("Warning: (properties ...) "\
++ "is only valid for constructors", file=sys.stderr)
+ for prop in arg[1:]:
+ pname = prop[0]
+ optional = False
+@@ -516,7 +516,7 @@
+ raise RuntimeError("could not find %s in old_parameters %r" % (
+ param.pname, [p.pname for p in old.params]))
+ try:
+- self.params = map(merge_param, self.params)
++ self.params = list(map(merge_param, self.params))
+ except RuntimeError:
+ # parameter names changed and we can't find a match; it's
+ # safer to keep the old parameter list untouched.
+Index: gwyddion/modules/pygwy/pygtk-embed/codegen/defsparser.py
+===================================================================
+--- gwyddion.orig/modules/pygwy/pygtk-embed/codegen/defsparser.py 2019-09-28 08:03:02.934097799 +0100
++++ gwyddion/modules/pygwy/pygtk-embed/codegen/defsparser.py 2019-09-28 08:03:02.926097707 +0100
+@@ -1,7 +1,7 @@
+ # -*- Mode: Python; py-indent-offset: 4 -*-
+ import os, sys
+-import scmexpr
+-from definitions import BoxedDef, EnumDef, FlagsDef, FunctionDef, \
++from . import scmexpr
++from .definitions import BoxedDef, EnumDef, FlagsDef, FunctionDef, \
+ InterfaceDef, MethodDef, ObjectDef, PointerDef, VirtualDef
+
+ include_path = ['.']
+@@ -47,54 +47,54 @@
+ self.defines = defines # -Dfoo=bar options, as dictionary
+
+ def define_object(self, *args):
+- odef = apply(ObjectDef, args)
++ odef = ObjectDef(*args)
+ self.objects.append(odef)
+ self.c_name[odef.c_name] = odef
+ def define_interface(self, *args):
+- idef = apply(InterfaceDef, args)
++ idef = InterfaceDef(*args)
+ self.interfaces.append(idef)
+ self.c_name[idef.c_name] = idef
+ def define_enum(self, *args):
+- edef = apply(EnumDef, args)
++ edef = EnumDef(*args)
+ self.enums.append(edef)
+ self.c_name[edef.c_name] = edef
+ def define_flags(self, *args):
+- fdef = apply(FlagsDef, args)
++ fdef = FlagsDef(*args)
+ self.enums.append(fdef)
+ self.c_name[fdef.c_name] = fdef
+ def define_boxed(self, *args):
+- bdef = apply(BoxedDef, args)
++ bdef = BoxedDef(*args)
+ self.boxes.append(bdef)
+ self.c_name[bdef.c_name] = bdef
+ def define_pointer(self, *args):
+- pdef = apply(PointerDef, args)
++ pdef = PointerDef(*args)
+ self.pointers.append(pdef)
+ self.c_name[pdef.c_name] = pdef
+ def define_function(self, *args):
+- fdef = apply(FunctionDef, args)
++ fdef = FunctionDef(*args)
+ self.functions.append(fdef)
+ self.c_name[fdef.c_name] = fdef
+ def define_method(self, *args):
+- mdef = apply(MethodDef, args)
++ mdef = MethodDef(*args)
+ self.functions.append(mdef)
+ self.c_name[mdef.c_name] = mdef
+ def define_virtual(self, *args):
+- vdef = apply(VirtualDef, args)
++ vdef = VirtualDef(*args)
+ self.virtuals.append(vdef)
+ def merge(self, old, parmerge):
+ for obj in self.objects:
+- if old.c_name.has_key(obj.c_name):
++ if obj.c_name in old.c_name:
+ obj.merge(old.c_name[obj.c_name])
+ for f in self.functions:
+- if old.c_name.has_key(f.c_name):
++ if f.c_name in old.c_name:
+ f.merge(old.c_name[f.c_name], parmerge)
+
+ def printMissing(self, old):
+ for obj in self.objects:
+- if not old.c_name.has_key(obj.c_name):
++ if obj.c_name not in old.c_name:
+ obj.write_defs()
+ for f in self.functions:
+- if not old.c_name.has_key(f.c_name):
++ if f.c_name not in old.c_name:
+ f.write_defs()
+
+ def write_defs(self, fp=sys.stdout):
+@@ -125,18 +125,18 @@
+
+ def find_methods(self, obj):
+ objname = obj.c_name
+- return filter(lambda func, on=objname: isinstance(func, MethodDef) and
+- func.of_object == on, self.functions)
++ return list(filter(lambda func, on=objname: isinstance(func, MethodDef) and
++ func.of_object == on, self.functions))
+
+ def find_virtuals(self, obj):
+ objname = obj.c_name
+- retval = filter(lambda func, on=objname: isinstance(func, VirtualDef) and
+- func.of_object == on, self.virtuals)
++ retval = list(filter(lambda func, on=objname: isinstance(func, VirtualDef) and
++ func.of_object == on, self.virtuals))
+ return retval
+
+ def find_functions(self):
+- return filter(lambda func: isinstance(func, FunctionDef) and
+- not func.is_constructor_of, self.functions)
++ return [func for func in self.functions if isinstance(func, FunctionDef) and
++ not func.is_constructor_of]
+
+ def ifdef(self, *args):
+ if args[0] in self.defines:
+Index: gwyddion/modules/pygwy/pygtk-embed/codegen/h2def.py
+===================================================================
+--- gwyddion.orig/modules/pygwy/pygtk-embed/codegen/h2def.py 2019-09-28 08:03:02.934097799 +0100
++++ gwyddion/modules/pygwy/pygtk-embed/codegen/h2def.py 2019-09-28 08:03:02.926097707 +0100
+@@ -71,7 +71,7 @@
+ import string
+ import sys
+
+-import defsparser
++from . import defsparser
+
+ # ------------------ Create typecodes from typenames ---------
+
+@@ -361,7 +361,7 @@
+ if defsfilter:
+ filter = defsparser.DefsParser(defsfilter)
+ filter.startParsing()
+- for func in filter.functions + filter.methods.values():
++ for func in filter.functions + list(filter.methods.values()):
+ self._functions[func.c_name] = func
+ for obj in filter.objects + filter.boxes + filter.interfaces:
+ self._objects[obj.c_name] = obj
+@@ -518,7 +518,7 @@
+ self._write_arguments(args)
+
+ def _write_method(self, obj, name, ret, args):
+- regex = string.join(map(lambda x: x+'_?', string.lower(obj)),'')
++ regex = string.join([x+'_?' for x in string.lower(obj)],'')
+ mname = re.sub(regex, '', name, 1)
+ if self.prefix:
+ l = len(self.prefix) + 1
+@@ -587,7 +587,7 @@
+ defsfilter = v
+
+ if not args[0:1]:
+- print 'Must specify at least one input file name'
++ print('Must specify at least one input file name')
+ return -1
+
+ # read all the object definitions in
+@@ -607,11 +607,11 @@
+ verbose=verbose, defsfilter=defsfilter)
+ dw.write_obj_defs(objdefs, types)
+ dw.write_enum_defs(enums, types)
+- print "Wrote %s-types.defs" % separate
++ print("Wrote %s-types.defs" % separate)
+
+ for filename in args:
+ dw.write_def(filename)
+- print "Wrote %s.defs" % separate
++ print("Wrote %s.defs" % separate)
+ else:
+ dw = DefsWriter(prefix=modulename, ns=namespace,
+ verbose=verbose, defsfilter=defsfilter)
+Index: gwyddion/modules/pygwy/pygtk-embed/codegen/override.py
+===================================================================
+--- gwyddion.orig/modules/pygwy/pygtk-embed/codegen/override.py 2019-09-28 08:03:02.934097799 +0100
++++ gwyddion/modules/pygwy/pygtk-embed/codegen/override.py 2019-09-28 08:03:02.926097707 +0100
+@@ -179,7 +179,7 @@
+ if func.find('.') != -1:
+ klass, func = func.split('.', 1)
+
+- if not self.defines.has_key(klass):
++ if klass not in self.defines:
+ self.defines[klass] = {}
+ self.defines[klass][func] = rest
+ else:
+@@ -209,7 +209,7 @@
+ self.dynamicnamespace = True
+
+ def is_ignored(self, name):
+- if self.ignores.has_key(name):
++ if name in self.ignores:
+ return 1
+ for glob in self.glob_ignores:
+ if fnmatch.fnmatchcase(name, glob):
+@@ -220,10 +220,10 @@
+ return name in self.type_ignores
+
+ def is_overriden(self, name):
+- return self.overrides.has_key(name)
++ return name in self.overrides
+
+ def is_already_included(self, name):
+- return self.overridden.has_key(name)
++ return name in self.overridden
+
+ def override(self, name):
+ self.overridden[name] = 1
+@@ -240,28 +240,28 @@
+ return self.startlines[name]
+
+ def wants_kwargs(self, name):
+- return self.kwargs.has_key(name)
++ return name in self.kwargs
+
+ def wants_noargs(self, name):
+- return self.noargs.has_key(name)
++ return name in self.noargs
+
+ def wants_onearg(self, name):
+- return self.onearg.has_key(name)
++ return name in self.onearg
+
+ def is_staticmethod(self, name):
+- return self.staticmethod.has_key(name)
++ return name in self.staticmethod
+
+ def is_classmethod(self, name):
+- return self.classmethod.has_key(name)
++ return name in self.classmethod
+
+ def attr_is_overriden(self, attr):
+- return self.override_attrs.has_key(attr)
++ return attr in self.override_attrs
+
+ def attr_override(self, attr):
+ return self.override_attrs[attr]
+
+ def slot_is_overriden(self, slot):
+- return self.override_slots.has_key(slot)
++ return slot in self.override_slots
+
+ def slot_override(self, slot):
+ return self.override_slots[slot]
+Index: gwyddion/modules/pygwy/pygtk-embed/codegen/reversewrapper.py
+===================================================================
+--- gwyddion.orig/modules/pygwy/pygtk-embed/codegen/reversewrapper.py 2019-09-28 08:03:02.934097799 +0100
++++ gwyddion/modules/pygwy/pygtk-embed/codegen/reversewrapper.py 2019-09-28 08:03:02.926097707 +0100
+@@ -1,7 +1,7 @@
+ ### -*- python -*-
+ ### Code to generate "Reverse Wrappers", i.e. C->Python wrappers
+ ### (C) 2004 Gustavo Carneiro <gjc at gnome.org>
+-import argtypes
++from . import argtypes
+ import os
+
+ DEBUG_MODE = ('PYGTK_CODEGEN_DEBUG' in os.environ)
+@@ -215,7 +215,7 @@
+ sink.writeln('static %s' % self.return_type.get_c_type())
+ else:
+ sink.writeln(self.return_type.get_c_type())
+- c_proto_params = map(Parameter.format_for_c_proto, self.parameters)
++ c_proto_params = list(map(Parameter.format_for_c_proto, self.parameters))
+ sink.writeln("%s(%s)\n{" % (self.cname, ", ".join(c_proto_params)))
+
+ self.return_type.write_decl()
+Index: gwyddion/modules/pygwy/pygtk-embed/codegen/scmexpr.py
+===================================================================
+--- gwyddion.orig/modules/pygwy/pygtk-embed/codegen/scmexpr.py 2019-09-28 08:03:02.934097799 +0100
++++ gwyddion/modules/pygwy/pygtk-embed/codegen/scmexpr.py 2019-09-28 08:03:02.926097707 +0100
+@@ -1,9 +1,9 @@
+ #!/usr/bin/python2
+ # -*- Mode: Python; py-indent-offset: 4 -*-
+-from __future__ import generators
++
+
+ import string
+-from cStringIO import StringIO
++from io import StringIO
+
+ class error(Exception):
+ def __init__(self, filename, lineno, msg):
+@@ -140,4 +140,4 @@
+ fp = StringIO(_testString)
+ statements = parse(fp)
+ for s in statements:
+- print `s`
++ print(repr(s))
+Index: gwyddion/modules/pygwy/pygwy-fix-defs-2.py
+===================================================================
+--- gwyddion.orig/modules/pygwy/pygwy-fix-defs-2.py 2019-09-28 08:03:02.934097799 +0100
++++ gwyddion/modules/pygwy/pygwy-fix-defs-2.py 2019-09-28 08:03:02.926097707 +0100
+@@ -510,11 +510,11 @@
+ del fix_function_args[c_name]
+
+ # Unused fix items mean potential errors.
+-for f in fix_function_args.items():
++for f in list(fix_function_args.items()):
+ sys.stderr.write('Warning: unused fixarg %s: %s\n' % (f[0], str(f[1])))
+-for f in fix_function_props.items():
++for f in list(fix_function_props.items()):
+ sys.stderr.write('Warning: unused fixfunc %s: %s\n' % (f[0], str(f[1])))
+-for f, i in wrapped_funcs.items():
++for f, i in list(wrapped_funcs.items()):
+ if f in added_functions_in_wrap_calls:
+ continue
+ if i is None:
+Index: gwyddion/modules/pygwy/pygwy-generate-doc.py
+===================================================================
+--- gwyddion.orig/modules/pygwy/pygwy-generate-doc.py 2019-09-28 08:03:02.934097799 +0100
++++ gwyddion/modules/pygwy/pygwy-generate-doc.py 2019-09-28 08:03:02.926097707 +0100
+@@ -72,7 +72,7 @@
+ 'cdline': 'CDLine', 'nl_fit_preset': 'NLFitPreset',
+ }
+ py_name = c_name.capitalize()
+- for c, p in pymap.items():
++ for c, p in list(pymap.items()):
+ if c_name == 'gwy_' + c:
+ py_name = 'Gwy' + p
+ break
+@@ -131,13 +131,13 @@
+ return 'I{(' + datatypes.get(ptype, ptype) + ')}'
+
+ def printdoc(s):
+- print replace_special(re.sub(r'\A\s+', r'', s))
++ print(replace_special(re.sub(r'\A\s+', r'', s)))
+
+ def printcode(s='', level=0):
+ if s:
+- print indent*level + s
++ print(indent*level + s)
+ else:
+- print
++ print()
+
+ def print_function(level, method, docs, enumvals, isconstr=False):
+ # Gather all out-arguments and exclude them from the normal parameter list.
+@@ -233,7 +233,7 @@
+ def print_class(obj, docs, sectionmap):
+ printcode()
+ printcode('class %s:' % obj.name)
+- if docs.has_key(obj.c_name):
++ if obj.c_name in docs:
+ printcode('"""', 1)
+ if obj.c_name in sectionmap:
+ name = sectionmap[obj.c_name]
+@@ -287,7 +287,7 @@
+ docextract.skip_to_identifier = skip_to_identifier
+
+ docs = docextract.extract(doc_dirs)
+-sectionmap = [s for s in docs.keys() if s.startswith('SECTION:')]
++sectionmap = [s for s in list(docs.keys()) if s.startswith('SECTION:')]
+ for i, s in enumerate(sectionmap):
+ param = [x[1] for x in docs[s].params if x[0] == 'title']
+ if len(param) == 1 and param[0].strip():
+@@ -326,8 +326,8 @@
+ override = override.Overrides()
+
+ # Keep GENERATED seprarated so that this file is not marked generated.
+-print '# vim: set fileencoding=utf-8 :'
+-print '# This is dummy %s file used for generation of documentation' % 'GENERATED'
++print('# vim: set fileencoding=utf-8 :')
++print('# This is dummy %s file used for generation of documentation' % 'GENERATED')
+
+ # Objects/classes
+ for obj in parser.objects + parser.boxes:
+@@ -386,7 +386,7 @@
+ printcode()
+ printcode('class %s:' % enum.name)
+ printcode('"""', 1)
+- if docs.has_key(enum.c_name):
++ if enum.c_name in docs:
+ printdoc(docs[enum.c_name].description)
+ params = docs[enum.c_name].params
+ printdoc('''\
+Index: gwyddion/plugins/process/invert_python.py
+===================================================================
+--- gwyddion.orig/plugins/process/invert_python.py 2019-09-28 08:03:02.934097799 +0100
++++ gwyddion/plugins/process/invert_python.py 2019-09-28 08:03:02.926097707 +0100
+@@ -4,7 +4,7 @@
+ # Written by Yeti <yeti at gwyddion.net>. Public domain.
+ import sys, os
+ errmsg = "Plug-in has to be called from Gwyddion plugin-proxy."
+-if os.environ.has_key('GWYPLUGINLIB'):
++if 'GWYPLUGINLIB' in os.environ:
+ sys.path.append(os.path.join(os.environ['GWYPLUGINLIB'], 'python'))
+ try:
+ import Gwyddion
+@@ -21,7 +21,7 @@
+ """ + ' '.join(run_modes)
+
+ def register(args):
+- print plugin_info
++ print(plugin_info)
+
+ def run(args):
+ run_mode = args.pop(0)
+Index: gwyddion/python/Gwyddion/dump.py
+===================================================================
+--- gwyddion.orig/python/Gwyddion/dump.py 2019-09-28 08:03:02.934097799 +0100
++++ gwyddion/python/Gwyddion/dump.py 2019-09-28 08:03:02.926097707 +0100
+@@ -14,7 +14,7 @@
+ elif _struct.unpack('>i', _struct.pack('@i', 12345))[0] == 12345:
+ _byte_order = 'Big-endian, need swap'
+ else:
+- raise NotImplementedError, "Uknown or silly byte order"
++ raise NotImplementedError("Uknown or silly byte order")
+
+ def _dmove(d1, k1, d2, k2, typ=None):
+ try:
+@@ -87,12 +87,12 @@
+ if m:
+ data[m.group('key')] = m.group('val')
+ continue
+- raise ValueError, 'Malformed header'
++ raise ValueError('Malformed header')
+ fh.close()
+ return data
+
+ def _dwrite(fh, dfield, base, key, fmt):
+- if dfield.has_key(key):
++ if key in dfield:
+ fh.write(('%s/%s=' + fmt + '\n') % (base, key, dfield[key]))
+
+ def _write_dfield(fh, dfield, base):
+@@ -120,11 +120,11 @@
+ Exceptions, caused by fatal errors, are not handled -- it is up to
+ caller to eventually handle them."""
+ fh = file(filename, 'wb')
+- for k, v in data.items():
++ for k, v in list(data.items()):
+ if type(v) == _types.DictType:
+ continue
+ fh.write('%s=%s\n' % (k, v))
+- for k, v in data.items():
++ for k, v in list(data.items()):
+ if type(v) != _types.DictType:
+ continue
+ _write_dfield(fh, v, k)
+Index: gwyddion/utils/extract-file-magic.py
+===================================================================
+--- gwyddion.orig/utils/extract-file-magic.py 2019-09-28 08:03:02.934097799 +0100
++++ gwyddion/utils/extract-file-magic.py 2019-09-28 08:03:02.926097707 +0100
+@@ -8,7 +8,7 @@
+ footnotes = {}
+
+ def format_userguide(module, body):
+- DESCRIPTION, EXTENSIONS, SUPPORTS, NOTES = range(4)
++ DESCRIPTION, EXTENSIONS, SUPPORTS, NOTES = list(range(4))
+ parsesupport = re.compile(r'(?P<name>\w+)'
+ r'(?::(?P<alias>\w+))?'
+ r'(?:\[(?P<note>\w+)\])?').match
+@@ -19,7 +19,7 @@
+ # in source code and the text that should go to the user guide).
+ def register_note(footnotes, note):
+ key, text = note.group('note'), note.group('text').strip()
+- for fnkey, entry in footnotes.items():
++ for fnkey, entry in list(footnotes.items()):
+ fntext, label = entry
+ if text == fntext:
+ fmttext = '<footnoteref linkend="%s" label="%s"/>' \
+@@ -111,8 +111,8 @@
+ sys.stderr.write('Unknown magic class %s\n' % sys.argv[1])
+ sys.exit(1)
+ except IndexError:
+- print 'Usage: %s CLASS [FILES...]' % sys.argv[0]
+- print 'Available classes: %s' % ' '.join(mclasses.keys())
++ print('Usage: %s CLASS [FILES...]' % sys.argv[0])
++ print('Available classes: %s' % ' '.join(list(mclasses.keys())))
+ sys.exit(0)
+
+ magic_block_re = re.compile(r'(?m)^/\*\*\n \* '
+@@ -120,7 +120,7 @@
+ + r'(?P<body>(?: \* .*\n)+) \*\*/$')
+ output = []
+
+-if magic.has_key('header'):
++if 'header' in magic:
+ output.append(magic['header'])
+
+ # Keep the `GENERATED' string split to prevent match here
+@@ -147,7 +147,7 @@
+ sys.stderr.write('Cannot read %s\n' % filename)
+ sys.exit(1)
+
+-if magic.has_key('footer'):
++if 'footer' in magic:
+ output.append(magic['footer'])
+
+-print '\n'.join(output)
++print('\n'.join(output))
+Index: gwyddion/utils/gen-gwyddion-msvc-sln.py
+===================================================================
+--- gwyddion.orig/utils/gen-gwyddion-msvc-sln.py 2019-09-28 08:03:02.934097799 +0100
++++ gwyddion/utils/gen-gwyddion-msvc-sln.py 2019-09-28 08:03:02.930097753 +0100
+@@ -5,7 +5,7 @@
+ # Created for Visual Studio 2015
+ # Copyright (C) 2015 Petr Grolich
+
+-from __future__ import division
++
+ import sys, glob, os, time, xml.dom.minidom, subprocess, platform, uuid, shutil, string, argparse
+ from xml.etree.ElementTree import Element, SubElement
+
+@@ -568,7 +568,7 @@
+
+ for line in content.split('\n'):
+ if line.startswith('#'): continue
+- for k in makefile_variables.keys():
++ for k in list(makefile_variables.keys()):
+ #print 'key: ', k
+ # generate projs !!!
+ for v in makefile_variables[k][0]:
+@@ -604,7 +604,7 @@
+ ################################################################################
+ # Get project unique id
+ def get_project_uuid(project_name):
+- for k in projs.keys():
++ for k in list(projs.keys()):
+ if(k[1] == project_name):
+ return k[2]
+ return False
+@@ -728,7 +728,7 @@
+ writer.write(indent+"<" + self.tagName)
+
+ attrs = self._get_attributes()
+- a_names = attrs.keys()
++ a_names = list(attrs.keys())
+ a_names.sort()
+
+ for a_name in a_names:
+@@ -776,7 +776,7 @@
+ pass
+ else:
+ # There was an error on creation, so make sure we know about it
+- print "Error: Unable to create folder '" + dirname + "'"
++ print("Error: Unable to create folder '" + dirname + "'")
+ raise
+
+
+@@ -1119,7 +1119,7 @@
+ save_xml(Project, filename)
+
+ # TODO: uncomment next line!!!
+- print filename
++ print(filename)
+
+ # for name, files in proj_files.iteritems():
+ # print name, files
+@@ -1180,7 +1180,7 @@
+ filename = os.path.abspath(filename)
+ save_xml(Project, filename)
+ #TODO: uncomment next line
+- print filename
++ print(filename)
+
+
+ ################################################################################
+@@ -1199,8 +1199,8 @@
+ for v in definitions:
+ path = os.path.abspath(path) # normalize path, i.e. 'dir1/./dir2'
+ cmd = ('make', '-C', path, v)
+- print "path=", path
+- print "v=", v
++ print("path=", path)
++ print("v=", v)
+ subprocess.call(cmd)
+
+
+@@ -1229,12 +1229,12 @@
+ proj_count = proj_count + 1
+
+ if(len(excluded_projects_win32) > 0):
+- print "Excluded projects from build Win32:"
+- print excluded_projects_win32
++ print("Excluded projects from build Win32:")
++ print(excluded_projects_win32)
+ if(len(excluded_projects_x64) > 0):
+- print "Excluded projects from build x64:"
+- print excluded_projects_x64
+- print "Total number of created projects:", proj_count
++ print("Excluded projects from build x64:")
++ print(excluded_projects_x64)
++ print("Total number of created projects:", proj_count)
+
+
+ ################################################################################
+@@ -1255,10 +1255,10 @@
+ n = n + len(definitions)
+ create_def_file(k[0], k[1], definitions)
+
+- print "Total number of created files:", n
++ print("Total number of created files:", n)
+ else:
+- print "Error: Creating definition files failed"
+- print "Note: Definition files can be generated on Linux machine only!"
++ print("Error: Creating definition files failed")
++ print("Note: Definition files can be generated on Linux machine only!")
+
+
+ ################################################################################
+@@ -1292,12 +1292,12 @@
+
+ n = n + 1
+ create_path(dst_filename2)
+- print "from:", src_filename
++ print("from:", src_filename)
+ #print "to: ", dst_filename1
+- print "to: ", dst_filename2
++ print("to: ", dst_filename2)
+ shutil.copy(src_filename, dst_filename2)
+
+- print "Total number of copied files:", n
++ print("Total number of copied files:", n)
+
+ ################################################################################
+ # Copy Files Generated by './autogen.sh' and 'make' command on Linux machine
+@@ -1312,13 +1312,13 @@
+ filename_config_h = os.path.join(dst_dir, 'config.h')
+ create_path(filename_config_h)
+ file(filename_config_h, 'w').write(config_h)
+- print "from: gen-gwyddion-msvc-sln.py"
+- print "to :", filename_config_h
++ print("from: gen-gwyddion-msvc-sln.py")
++ print("to :", filename_config_h)
+
+ gwyfilename_config_h = os.path.join(dst_dir, 'gwyconfig.h')
+ file(gwyfilename_config_h, 'w').write(gwyconfig_h)
+- print "from: gen-gwyddion-msvc-sln.py"
+- print "to :", gwyfilename_config_h
++ print("from: gen-gwyddion-msvc-sln.py")
++ print("to :", gwyfilename_config_h)
+
+ #for root, dirs, files in os.walk('gwyddion'):
+ for root, dirs, files in os.walk('.'):
+@@ -1341,10 +1341,10 @@
+ create_path(dst_filename)
+ shutil.copy(src_filename, dst_filename)
+
+- print "from:", src_filename
+- print "to :", dst_filename
++ print("from:", src_filename)
++ print("to :", dst_filename)
+
+- print "Total number of copied files:", n+2
++ print("Total number of copied files:", n+2)
+
+ ################################################################################
+ # Create Solution file (.sln)
+@@ -1367,12 +1367,12 @@
+
+ #####
+ if(0):
+- keys = projs.keys()
++ keys = list(projs.keys())
+ keys = [x[0] for x in keys]
+ keys.sort()
+- print keys
++ print(keys)
+ for k in keys:
+- print k
++ print(k)
+ raise SystemExit
+ #####
+
+@@ -1409,7 +1409,7 @@
+ id_sp = 0
+ solution_folders_local = {}
+ n = len(path_simple.split(os.path.sep))
+- for i in reversed(range(n)):
++ for i in reversed(list(range(n))):
+ sub_path_len = 0
+ path_simple = filename_rel.rsplit(os.path.sep, n-i-1)[0]
+ parent_path = filename_rel.rsplit(os.path.sep, n-i)[0]
+@@ -1610,7 +1610,7 @@
+ fh.close()
+
+ # TODO: uncomment next line!!!
+- print filename
++ print(filename)
+
+
+ ################################################################################
+@@ -1635,23 +1635,23 @@
+
+ parse_makefiles()
+
+-print "Step 1 of 5"
+-print "Creating project (.vcxproj) and filters (.vcxproj.filters) files:"
++print("Step 1 of 5")
++print("Creating project (.vcxproj) and filters (.vcxproj.filters) files:")
+ create_project_and_filters_files()
+
+-print "\nStep 2 of 5"
+-print "Creating solution (.sln):"
++print("\nStep 2 of 5")
++print("Creating solution (.sln):")
+ create_sln()
+
+-print "\nStep 3 of 5"
+-print "Creating definition (.def) files:"
++print("\nStep 3 of 5")
++print("Creating definition (.def) files:")
+ create_def_files()
+
+-print "\nStep 4 of 5"
+-print "Copying definition (.def) files:"
++print("\nStep 4 of 5")
++print("Copying definition (.def) files:")
+ copy_def_files()
+
+-print "\nStep 5 of 5"
+-print "Copying generated (.c, .h) files:"
+-print "Note: compile 'gwyddion' to create .c, .h files (run './autogen.sh' and 'make')"
++print("\nStep 5 of 5")
++print("Copying generated (.c, .h) files:")
++print("Note: compile 'gwyddion' to create .c, .h files (run './autogen.sh' and 'make')")
+ copy_gen_files()
+Index: gwyddion/utils/generate-gwyddion-nsi.py
+===================================================================
+--- gwyddion.orig/utils/generate-gwyddion-nsi.py 2019-09-28 08:03:02.934097799 +0100
++++ gwyddion/utils/generate-gwyddion-nsi.py 2019-09-28 08:03:02.930097753 +0100
+@@ -19,14 +19,14 @@
+ if l.startswith("#define PACKAGE_VERSION"):
+ return l.split('"')[1]
+ l = config_file.readline()
+- print "Warning: Cannot determine version."
++ print("Warning: Cannot determine version.")
+ return ""
+
+ ignore_dirs = ['devel-docs', 'gone'] # in lowercase
+ ignore_files = ['pygwy.dll'] # in lowercase
+
+ def list_of_files(arg, dirname, fnames):
+- print dirname
++ print(dirname)
+ for c in dirname.split('\\'):
+ if c.lower() in ignore_dirs:
+ return
+Index: gwyddion/utils/vim-syn-gen.py
+===================================================================
+--- gwyddion.orig/utils/vim-syn-gen.py 2019-09-28 08:03:02.934097799 +0100
++++ gwyddion/utils/vim-syn-gen.py 2019-09-28 08:03:02.930097753 +0100
+@@ -11,8 +11,8 @@
+ 'filter_regexp': r'^_',
+ }
+
+-if len(sys.argv) not in range(2, 4):
+- print """\
++if len(sys.argv) not in list(range(2, 4)):
++ print("""\
+ Usage: %s config-file.py [OUTPUT.vim]
+ If output is unspecified, dumps the vim syntax file to the standard output.
+
+@@ -34,20 +34,20 @@
+ Define (parameterless macro)
+
+ Version: $Id: vim-syn-gen.py 21284 2018-07-31 19:14:38Z yeti-dn $\
+-""" % sys.argv[0]
++""" % sys.argv[0])
+ sys.exit(0)
+
+ xoptions = {}
+-execfile(sys.argv[1], xoptions)
++exec(compile(open(sys.argv[1], "rb").read(), sys.argv[1], 'exec'), xoptions)
+ options.update(xoptions)
+-assert options.has_key('syntax_name') and options.has_key('file_glob')
++assert 'syntax_name' in options and 'file_glob' in options
+ syntax_name = options['syntax_name']
+-if not options.has_key('maintainer'):
++if 'maintainer' not in options:
+ options['maintainer'] = '@'.join(pwd.getpwuid(os.getuid())[0], os.uname())
+-if not options.has_key('description'):
++if 'description' not in options:
+ options['description'] = 'C %s extension' % syntax_name
+
+-if options.has_key('url'):
++if 'url' in options:
+ url_line = '" URL: %s\n' % options['url']
+ else:
+ url_line = ''
+@@ -74,8 +74,8 @@
+ 'USER_FUNCTION': 'Type'
+ }
+
+-if options.has_key('types'):
+- types.update(dict([(k.upper(), v) for k, v in options['types'].items()]))
++if 'types' in options:
++ types.update(dict([(k.upper(), v) for k, v in list(options['types'].items())]))
+
+ header_template = """\
+ " Vim syntax file
+@@ -113,7 +113,7 @@
+ hi_link_template = 'hi def link %s%s %s'
+ hi_link_template_v = ' hi def link %s%s%s %s'
+
+-re_decl = re.compile(r'<(?P<type>' + r'|'.join(types.keys()) + r')>\n'
++re_decl = re.compile(r'<(?P<type>' + r'|'.join(list(types.keys())) + r')>\n'
+ + r'<NAME>(?P<ident>\w+)</NAME>\n'
+ + r'(?P<body>.*?)'
+ + r'</(?P=type)>\n',
+@@ -130,8 +130,8 @@
+ outputfile.write('\n')
+
+ def types_present(decldict, value=''):
+- pt = [t for t, d in decldict.items()
+- if [k for k, v in d.items() if v == value]]
++ pt = [t for t, d in list(decldict.items())
++ if [k for k, v in list(d.items()) if v == value]]
+ return dict([(x, types[x]) for x in pt])
+
+ def deprecated_from_devhelp2(filename):
+@@ -156,8 +156,8 @@
+ return deprecated
+
+ def output_decls(decldict, value=''):
+- for t, d in decldict.items():
+- d = [k for k, v in d.items() if v == value]
++ for t, d in list(decldict.items()):
++ d = [k for k, v in list(d.items()) if v == value]
+ if not d:
+ continue
+ d.sort()
+@@ -165,12 +165,12 @@
+ normalize(t), ' '.join(d)))
+
+ def override(decldict, overrides, create_new):
+- for o, v in overrides.items():
++ for o, v in list(overrides.items()):
+ if v:
+ v = v.upper()
+ has_it = False
+- for k, d in decldict.items():
+- if d.has_key(o):
++ for k, d in list(decldict.items()):
++ if o in d:
+ if create_new:
+ sys.stderr.write("%s already exists in %s" % (o, k))
+ else:
+@@ -217,8 +217,8 @@
+ # Kill macros if the same symbol also exists as a regular function
+ # (this fixes things like g_file_test()).
+ todelete = []
+-for macro in identdefs.keys():
+- if decls['FUNCTION'].has_key(macro):
++for macro in list(identdefs.keys()):
++ if macro in decls['FUNCTION']:
+ todelete.append(macro)
+
+ for macro in todelete:
+@@ -229,9 +229,9 @@
+ # Change macros defined to functions back to macros
+ # FIXME: this is not recursive, and also doesn't catch defines to symbols
+ # from other libraries -- how to handle that?
+-for macro, body in identdefs.items():
+- for k, d in decls.items():
+- if not d.has_key(body):
++for macro, body in list(identdefs.items()):
++ for k, d in list(decls.items()):
++ if body not in d:
+ continue
+ #sys.stderr.write('%s -> %s (%s)\n' % (macro, body, k))
+ if k == 'FUNCTION' or k == 'MACRO':
+@@ -241,7 +241,7 @@
+ # Kill types that are named FooPrivate where Foo is also a type. This keeps
+ # symbols such as GPrivate and GStaticPrivate but gets rid of various rubbish.
+ todelete = []
+-for symbol in decls['STRUCT'].keys():
++for symbol in list(decls['STRUCT'].keys()):
+ privsymbol = symbol + 'Private'
+ if privsymbol in decls['STRUCT']:
+ todelete.append(privsymbol)
+@@ -250,10 +250,10 @@
+ del decls['STRUCT'][symbol]
+ del todelete
+
+-if options.has_key('supplement'):
++if 'supplement' in options:
+ override(decls, options['supplement'], True)
+
+-if options.has_key('override'):
++if 'override' in options:
+ override(decls, options['override'], False)
+
+ # Find types that are really present
+@@ -261,13 +261,13 @@
+ deprecated_types = types_present(decls, 'Deprecated')
+
+ hi_links = '\n'.join([hi_link_template % (syntax_name, normalize(k), v)
+- for k, v in normal_types.items()])
++ for k, v in list(normal_types.items())])
+ hi_links_depA = '\n'.join([hi_link_template_v
+ % (syntax_name, 'Deprecated', normalize(k), v)
+- for k, v in deprecated_types.items()])
++ for k, v in list(deprecated_types.items())])
+ hi_links_depE = '\n'.join([hi_link_template_v
+ % (syntax_name, 'Deprecated', normalize(k), 'Error')
+- for k, v in deprecated_types.items()])
++ for k, v in list(deprecated_types.items())])
+
+ # Header
+ header = header_template % (options['description'], options['maintainer'],
=====================================
debian/patches/series
=====================================
@@ -1,2 +1,3 @@
+2to3.patch
fix-manpage-section-for-debian.diff
fix-rpath-issue.patch
View it on GitLab: https://salsa.debian.org/med-team/gwyddion/commit/11e5ec41c3044dd1cb31fb00d0dbc74d1caca975
--
View it on GitLab: https://salsa.debian.org/med-team/gwyddion/commit/11e5ec41c3044dd1cb31fb00d0dbc74d1caca975
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20190928/837d549c/attachment-0001.html>
More information about the debian-med-commit
mailing list