* [PR PATCH] GConf: patch to use python3
@ 2023-09-27 21:46 classabbyamp
2023-09-29 22:28 ` CameronNemo
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: classabbyamp @ 2023-09-27 21:46 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 550 bytes --]
There is a new pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages py3/gconf
https://github.com/void-linux/void-packages/pull/46300
GConf: patch to use python3
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly** (script is valid python 3, not sure how to test and I don't use GConf)
A patch file from https://github.com/void-linux/void-packages/pull/46300.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-py3/gconf-46300.patch --]
[-- Type: text/x-diff, Size: 5570 bytes --]
From 085ed5ca855de0b0d61e69f7573199faf085a7c4 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Wed, 27 Sep 2023 17:45:00 -0400
Subject: [PATCH] GConf: patch to use python3
---
srcpkgs/GConf/patches/python3.patch | 102 ++++++++++++++++++++++++++++
srcpkgs/GConf/template | 2 +-
2 files changed, 103 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/GConf/patches/python3.patch
diff --git a/srcpkgs/GConf/patches/python3.patch b/srcpkgs/GConf/patches/python3.patch
new file mode 100644
index 0000000000000..21d398a2fcc0f
--- /dev/null
+++ b/srcpkgs/GConf/patches/python3.patch
@@ -0,0 +1,102 @@
+--- a/gsettings/gsettings-schema-convert
++++ b/gsettings/gsettings-schema-convert
+@@ -603,7 +603,7 @@
+ for line in lines:
+ current_line_nb += 1
+ self.parse_line(line)
+- except GSettingsSchemaConvertException, e:
++ except GSettingsSchemaConvertException as e:
+ raise GSettingsSchemaConvertException('%s:%s: %s' % (os.path.basename(self.file), current_line_nb, e))
+
+ return self.root
+@@ -711,7 +711,7 @@
+ schema = self._parse_schema(schema_node)
+
+ for (child_schema, child_name) in schema._children:
+- if parent.has_key(child_schema):
++ if child_schema in parent.keys():
+ raise GSettingsSchemaConvertException('Child \'%s\' is declared by two different schemas: \'%s\' and \'%s\'.' % (child_schema, parent[child_schema], schema.id))
+ parent[child_schema] = schema
+
+@@ -719,7 +719,7 @@
+
+ # now let's move all schemas where they should leave
+ for schema in schemas:
+- if parent.has_key(schema.id):
++ if schema.id in parent.keys():
+ parent_schema = parent[schema.id]
+
+ # check that the paths of parent and child are supported by
+@@ -1054,31 +1054,31 @@
+ (options, args) = parser.parse_args()
+
+ if len(args) < 1:
+- print >> sys.stderr, 'Need a filename to work on.'
++ print('Need a filename to work on.', file=sys.stderr)
+ return 1
+ elif len(args) > 1:
+- print >> sys.stderr, 'Too many arguments.'
++ print('Too many arguments.', file=sys.stderr)
+ return 1
+
+ if options.simple and options.xml:
+- print >> sys.stderr, 'Too many output formats requested.'
++ print('Too many output formats requested.', file=sys.stderr)
+ return 1
+
+ if not options.gconf and options.gettext_domain:
+- print >> sys.stderr, 'Default gettext domain can only be specified when converting a gconf schema.'
++ print('Default gettext domain can only be specified when converting a gconf schema.', file=sys.stderr)
+ return 1
+
+ if not options.gconf and options.schema_id:
+- print >> sys.stderr, 'Default schema ID can only be specified when converting a gconf schema.'
++ print('Default schema ID can only be specified when converting a gconf schema.', file=sys.stderr)
+ return 1
+
+ if not options.gconf and options.keep_underscores:
+- print >> sys.stderr, 'The --keep-underscores option can only be specified when converting a gconf schema.'
++ print('The --keep-underscores option can only be specified when converting a gconf schema.', file=sys.stderr)
+ return 1
+
+ argfile = os.path.expanduser(args[0])
+ if not os.path.exists(argfile):
+- print >> sys.stderr, '\'%s\' does not exist.' % argfile
++ print('\'%s\' does not exist.' % argfile, file=sys.stderr)
+ return 1
+
+ if options.output:
+@@ -1095,7 +1095,7 @@
+ try:
+ parser = GConfSchemaParser(argfile, options.gettext_domain, options.schema_id, options.keep_underscores)
+ schema_root = parser.parse()
+- except SyntaxError, e:
++ except SyntaxError as e:
+ raise GSettingsSchemaConvertException('\'%s\' does not look like a valid gconf schema file: %s' % (argfile, e))
+ else:
+ # autodetect if file is XML or not
+@@ -1104,7 +1104,7 @@
+ schema_root = parser.parse()
+ if not options.simple and not options.xml:
+ options.simple = True
+- except SyntaxError, e:
++ except SyntaxError as e:
+ parser = SimpleSchemaParser(argfile)
+ schema_root = parser.parse()
+ if not options.simple and not options.xml:
+@@ -1127,13 +1127,13 @@
+ fout = open(options.output, 'w')
+ fout.write(output)
+ fout.close()
+- except GSettingsSchemaConvertException, e:
++ except GSettingsSchemaConvertException as e:
+ fout.close()
+ if os.path.exists(options.output):
+ os.unlink(options.output)
+ raise e
+
+- except GSettingsSchemaConvertException, e:
++ except GSettingsSchemaConvertException as e:
+ print >> sys.stderr, '%s' % e
+ return 1
+
diff --git a/srcpkgs/GConf/template b/srcpkgs/GConf/template
index 4365c11e58448..87e0f068f4e4d 100644
--- a/srcpkgs/GConf/template
+++ b/srcpkgs/GConf/template
@@ -1,7 +1,7 @@
# Template file for 'GConf'
pkgname=GConf
version=3.2.6
-revision=11
+revision=12
build_style=gnu-configure
build_helper="gir"
configure_args="--without-openldap --enable-gtk --enable-defaults-service
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: GConf: patch to use python3
2023-09-27 21:46 [PR PATCH] GConf: patch to use python3 classabbyamp
@ 2023-09-29 22:28 ` CameronNemo
2023-09-29 22:39 ` classabbyamp
2023-09-30 10:43 ` [PR PATCH] [Closed]: " sgn
2 siblings, 0 replies; 4+ messages in thread
From: CameronNemo @ 2023-09-29 22:28 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 202 bytes --]
New comment by CameronNemo on void-packages repository
https://github.com/void-linux/void-packages/pull/46300#issuecomment-1741549034
Comment:
https://github.com/void-linux/void-packages/issues/17254
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: GConf: patch to use python3
2023-09-27 21:46 [PR PATCH] GConf: patch to use python3 classabbyamp
2023-09-29 22:28 ` CameronNemo
@ 2023-09-29 22:39 ` classabbyamp
2023-09-30 10:43 ` [PR PATCH] [Closed]: " sgn
2 siblings, 0 replies; 4+ messages in thread
From: classabbyamp @ 2023-09-29 22:39 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 174 bytes --]
New comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/46300#issuecomment-1741555251
Comment:
yeah that's probably better
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PR PATCH] [Closed]: GConf: patch to use python3
2023-09-27 21:46 [PR PATCH] GConf: patch to use python3 classabbyamp
2023-09-29 22:28 ` CameronNemo
2023-09-29 22:39 ` classabbyamp
@ 2023-09-30 10:43 ` sgn
2 siblings, 0 replies; 4+ messages in thread
From: sgn @ 2023-09-30 10:43 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There's a closed pull request on the void-packages repository
GConf: patch to use python3
https://github.com/void-linux/void-packages/pull/46300
Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly** (script is valid python 3, not sure how to test and I don't use GConf)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-09-30 10:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-27 21:46 [PR PATCH] GConf: patch to use python3 classabbyamp
2023-09-29 22:28 ` CameronNemo
2023-09-29 22:39 ` classabbyamp
2023-09-30 10:43 ` [PR PATCH] [Closed]: " sgn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).