All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] list-workarounds: Convert to python3
@ 2013-05-10 22:28 Ben Widawsky
  2013-05-10 22:33 ` Kenneth Graunke
  2013-05-11 16:38 ` Damien Lespiau
  0 siblings, 2 replies; 4+ messages in thread
From: Ben Widawsky @ 2013-05-10 22:28 UTC (permalink / raw)
  To: intel-gfx; +Cc: Ben Widawsky

The rest of the tool suite that uses python already uses python3.
The tool configure requires python >= 3 (which is confusing because of
the no backward compat problem).

The world is slowly moving to python3.

Converted with 2to3.

CC: Damien Lespiau <damien.lespiau@intel.com>
CC: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
 scripts/list-workarounds | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/list-workarounds b/scripts/list-workarounds
index 6c8c636..b874fd8 100755
--- a/scripts/list-workarounds
+++ b/scripts/list-workarounds
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import os,sys
 import optparse
@@ -29,7 +29,7 @@ wa_re = re.compile('(?P<name>Wa[A-Z0-9][a-zA-Z0-9_]+):(?P<platforms>[a-z,]+)')
 waname_re = re.compile('(?P<name>Wa[A-Z0-9][a-zA-Z0-9_]+)')
 def parse(me):
 	for line in me.splitlines():
-		match = wa_re.search(line)
+		match = wa_re.search(str(line))
 		if not match:
 			if not verbose:
 				continue
@@ -103,8 +103,8 @@ if __name__ == '__main__':
 		sys.exit(1)
 
 	parse(work_arounds)
-	for wa in sorted(workarounds.iterkeys()):
+	for wa in sorted(workarounds.keys()):
 		if not options.platform:
-			print("%s: %s" % (wa, ', '.join(workarounds[wa])))
+			print(("%s: %s" % (wa, ', '.join(workarounds[wa]))))
 		elif options.platform in workarounds[wa]:
 			print(wa)
-- 
1.8.2.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] list-workarounds: Convert to python3
  2013-05-10 22:28 [PATCH] list-workarounds: Convert to python3 Ben Widawsky
@ 2013-05-10 22:33 ` Kenneth Graunke
  2013-05-11 16:38 ` Damien Lespiau
  1 sibling, 0 replies; 4+ messages in thread
From: Kenneth Graunke @ 2013-05-10 22:33 UTC (permalink / raw)
  To: Ben Widawsky; +Cc: intel-gfx

On 05/10/2013 03:28 PM, Ben Widawsky wrote:
> The rest of the tool suite that uses python already uses python3.
> The tool configure requires python >= 3 (which is confusing because of
> the no backward compat problem).
>
> The world is slowly moving to python3.
>
> Converted with 2to3.
>
> CC: Damien Lespiau <damien.lespiau@intel.com>
> CC: Kenneth Graunke <kenneth@whitecape.org>
> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] list-workarounds: Convert to python3
  2013-05-10 22:28 [PATCH] list-workarounds: Convert to python3 Ben Widawsky
  2013-05-10 22:33 ` Kenneth Graunke
@ 2013-05-11 16:38 ` Damien Lespiau
  2013-05-11 22:57   ` Ben Widawsky
  1 sibling, 1 reply; 4+ messages in thread
From: Damien Lespiau @ 2013-05-11 16:38 UTC (permalink / raw)
  To: Ben Widawsky; +Cc: intel-gfx

On Fri, May 10, 2013 at 03:28:29PM -0700, Ben Widawsky wrote:
> -			print("%s: %s" % (wa, ', '.join(workarounds[wa])))
> +			print(("%s: %s" % (wa, ', '.join(workarounds[wa]))))

This one adds extra () that are not necessary. Other than that, ship it!

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>

-- 
Damien

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] list-workarounds: Convert to python3
  2013-05-11 16:38 ` Damien Lespiau
@ 2013-05-11 22:57   ` Ben Widawsky
  0 siblings, 0 replies; 4+ messages in thread
From: Ben Widawsky @ 2013-05-11 22:57 UTC (permalink / raw)
  To: Damien Lespiau; +Cc: intel-gfx

On Sat, May 11, 2013 at 05:38:03PM +0100, Damien Lespiau wrote:
> On Fri, May 10, 2013 at 03:28:29PM -0700, Ben Widawsky wrote:
> > -			print("%s: %s" % (wa, ', '.join(workarounds[wa])))
> > +			print(("%s: %s" % (wa, ', '.join(workarounds[wa]))))
> 
> This one adds extra () that are not necessary. Other than that, ship it!
> 
> Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
> 
> -- 
> Damien

Yeah, weird, not sure why 2to3 did that... Removed, and pushed. Thanks.

-- 
Ben Widawsky, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-05-11 22:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-10 22:28 [PATCH] list-workarounds: Convert to python3 Ben Widawsky
2013-05-10 22:33 ` Kenneth Graunke
2013-05-11 16:38 ` Damien Lespiau
2013-05-11 22:57   ` Ben Widawsky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.