archrelease: copy trunk to extra-x86_64
[arch-packages.git] / telepathy-salut / trunk / telepathy-salut-0.8.1-python3.patch
blob6498ddbac6d0254b80378ea8a5f79dba67a072c5
1 diff -up telepathy-salut-0.8.1/tools/glib-client-marshaller-gen.py.py3 telepathy-salut-0.8.1/tools/glib-client-marshaller-gen.py
2 --- telepathy-salut-0.8.1/tools/glib-client-marshaller-gen.py.py3 2011-08-16 07:04:41.000000000 -0400
3 +++ telepathy-salut-0.8.1/tools/glib-client-marshaller-gen.py 2019-12-20 11:19:32.682996743 -0500
4 @@ -31,22 +31,22 @@ class Generator(object):
5 for signal in signals:
6 self.do_signal(signal)
8 - print 'void'
9 - print '%s_register_dbus_glib_marshallers (void)' % self.prefix
10 - print '{'
11 + print('void')
12 + print('%s_register_dbus_glib_marshallers (void)' % self.prefix)
13 + print('{')
15 - all = self.marshallers.keys()
16 - all.sort()
17 + all = list(self.marshallers.keys())
18 + sorted(all)
19 for marshaller in all:
20 rhs = self.marshallers[marshaller]
22 - print ' dbus_g_object_register_marshaller (%s,' % marshaller
23 - print ' G_TYPE_NONE, /* return */'
24 + print(' dbus_g_object_register_marshaller (%s,' % marshaller)
25 + print(' G_TYPE_NONE, /* return */')
26 for type in rhs:
27 - print ' G_TYPE_%s,' % type.replace('VOID', 'NONE')
28 - print ' G_TYPE_INVALID);'
29 + print(' G_TYPE_%s,' % type.replace('VOID', 'NONE'))
30 + print(' G_TYPE_INVALID);')
32 - print '}'
33 + print('}')
36 def types_to_gtypes(types):
37 diff -up telepathy-salut-0.8.1/tools/glib-ginterface-gen.py.py3 telepathy-salut-0.8.1/tools/glib-ginterface-gen.py
38 --- telepathy-salut-0.8.1/tools/glib-ginterface-gen.py.py3 2011-08-16 07:04:41.000000000 -0400
39 +++ telepathy-salut-0.8.1/tools/glib-ginterface-gen.py 2019-12-20 11:19:32.683996724 -0500
40 @@ -26,7 +26,7 @@ import sys
41 import os.path
42 import xml.dom.minidom
44 -from libglibcodegen import Signature, type_to_gtype, cmp_by_name, \
45 +from libglibcodegen import Signature, type_to_gtype, \
46 camelcase_to_lower, NS_TP, dbus_gutils_wincaps_to_uscore, \
47 signal_to_marshal_name, method_to_glue_marshal_name
49 @@ -620,7 +620,7 @@ class Generator(object):
50 self.b('')
52 nodes = self.dom.getElementsByTagName('node')
53 - nodes.sort(cmp_by_name)
54 + nodes.sort(key=lambda node : node.getAttributeNode('name').nodeValue)
56 for node in nodes:
57 self.do_node(node)
58 @@ -639,7 +639,7 @@ class Generator(object):
61 def cmdline_error():
62 - print """\
63 + print("""\
64 usage:
65 gen-ginterface [OPTIONS] xmlfile Prefix_
66 options:
67 @@ -659,7 +659,7 @@ options:
68 void symbol (DBusGMethodInvocation *context)
69 and return some sort of "not implemented" error via
70 dbus_g_method_return_error (context, ...)
71 -"""
72 +""")
73 sys.exit(1)
76 diff -up telepathy-salut-0.8.1/tools/glib-signals-marshal-gen.py.py3 telepathy-salut-0.8.1/tools/glib-signals-marshal-gen.py
77 --- telepathy-salut-0.8.1/tools/glib-signals-marshal-gen.py.py3 2011-08-16 07:04:41.000000000 -0400
78 +++ telepathy-salut-0.8.1/tools/glib-signals-marshal-gen.py 2019-12-20 11:19:32.683996724 -0500
79 @@ -42,11 +42,11 @@ class Generator(object):
80 self.do_signal(signal)
82 all = self.marshallers.keys()
83 - all.sort()
84 + sorted(all)
85 for marshaller in all:
86 rhs = self.marshallers[marshaller]
87 if not marshaller.startswith('g_cclosure'):
88 - print 'VOID:' + ','.join(rhs)
89 + print('VOID:' + ','.join(rhs))
91 if __name__ == '__main__':
92 argv = sys.argv[1:]
93 diff -up telepathy-salut-0.8.1/tools/libglibcodegen.py.py3 telepathy-salut-0.8.1/tools/libglibcodegen.py
94 --- telepathy-salut-0.8.1/tools/libglibcodegen.py.py3 2011-07-07 11:24:48.000000000 -0400
95 +++ telepathy-salut-0.8.1/tools/libglibcodegen.py 2019-12-20 11:22:38.687463535 -0500
96 @@ -191,7 +191,10 @@ class _SignatureIter:
97 def __init__(self, string):
98 self.remaining = string
100 - def next(self):
101 + def __iter__(self):
102 + self
104 + def __next__(self):
105 if self.remaining == '':
106 raise StopIteration
108 @@ -297,7 +300,7 @@ def type_to_gtype(s):
109 return ("GHashTable *", "DBUS_TYPE_G_STRING_STRING_HASHTABLE", "BOXED", False)
110 elif s[:2] == 'a{': #some arbitrary hash tables
111 if s[2] not in ('y', 'b', 'n', 'q', 'i', 'u', 's', 'o', 'g'):
112 - raise Exception, "can't index a hashtable off non-basic type " + s
113 + raise Exception("can't index a hashtable off non-basic type " + s)
114 first = type_to_gtype(s[2])
115 second = type_to_gtype(s[3:-1])
116 return ("GHashTable *", "(dbus_g_type_get_map (\"GHashTable\", " + first[1] + ", " + second[1] + "))", "BOXED", False)
117 @@ -312,7 +315,7 @@ def type_to_gtype(s):
118 return ("GValueArray *", gtype, "BOXED", True)
120 # we just don't know ..
121 - raise Exception, "don't know the GType for " + s
122 + raise Exception("don't know the GType for " + s)
125 def xml_escape(s):
126 diff -up telepathy-salut-0.8.1/tools/make-release-mail.py.py3 telepathy-salut-0.8.1/tools/make-release-mail.py
127 --- telepathy-salut-0.8.1/tools/make-release-mail.py.py3 2012-11-12 09:13:18.000000000 -0500
128 +++ telepathy-salut-0.8.1/tools/make-release-mail.py 2019-12-20 11:19:32.684996705 -0500
129 @@ -50,14 +50,14 @@ GIT_URL = 'http://cgit.freedesktop.org/t
130 def main(package, version, news_path):
131 release_name, details = extract_description(package, version, news_path)
133 - print """
134 + print("""
135 %(release_name)s
137 tarball: %(base_url)s/%(package)s/%(package)s-%(version)s.tar.gz
138 signature: %(base_url)s/%(package)s/%(package)s-%(version)s.tar.gz.asc
139 git: %(git_url)s/%(package)s
141 -%(details)s""".strip().rstrip() % {
142 +%(details)s""").strip().rstrip() % {
143 'base_url': BASE_URL,
144 'git_url': GIT_URL,
145 'package': package,