[meld] Support Python 3 range() as a generator
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] Support Python 3 range() as a generator
- Date: Fri, 30 Nov 2012 19:28:56 +0000 (UTC)
commit 25a07dde2d6d07a801d9342d3cfa93049d80bcbc
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sat Oct 27 07:29:45 2012 +1000
Support Python 3 range() as a generator
meld/dirdiff.py | 3 ++-
meld/filediff.py | 2 +-
meld/tree.py | 2 +-
meld/vc/_vc.py | 2 +-
meld/vcview.py | 3 ++-
5 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/meld/dirdiff.py b/meld/dirdiff.py
index 1b96ae3..f360196 100644
--- a/meld/dirdiff.py
+++ b/meld/dirdiff.py
@@ -61,7 +61,8 @@ CacheResult = namedtuple('CacheResult', 'stats result')
_cache = {}
-Same, SameFiltered, DodgySame, DodgyDifferent, Different, FileError = range(6)
+Same, SameFiltered, DodgySame, DodgyDifferent, Different, FileError = \
+ list(range(6))
# TODO: Get the block size from os.stat
CHUNK_SIZE = 4096
diff --git a/meld/filediff.py b/meld/filediff.py
index 69bc512..4e2c61f 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -144,7 +144,7 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
gtk.keysyms.Control_R : MASK_CTRL}
# Identifiers for MsgArea messages
- (MSG_SAME,) = range(1)
+ (MSG_SAME,) = list(range(1))
__gsignals__ = {
'next-conflict-changed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, (bool, bool)),
diff --git a/meld/tree.py b/meld/tree.py
index f757173..349e0d9 100644
--- a/meld/tree.py
+++ b/meld/tree.py
@@ -21,7 +21,7 @@ import gtk
import pango
COL_PATH, COL_STATE, COL_TEXT, COL_ICON, COL_TINT, COL_FG, COL_STYLE, \
- COL_WEIGHT, COL_STRIKE, COL_END = range(10)
+ COL_WEIGHT, COL_STRIKE, COL_END = list(range(10))
COL_TYPES = (str, str, str, str, str, gtk.gdk.Color, pango.Style,
pango.Weight, bool)
diff --git a/meld/vc/_vc.py b/meld/vc/_vc.py
index 669cfa7..3efc0d0 100644
--- a/meld/vc/_vc.py
+++ b/meld/vc/_vc.py
@@ -33,7 +33,7 @@ from gettext import gettext as _
STATE_IGNORED, STATE_NONE, STATE_NORMAL, STATE_NOCHANGE, \
STATE_ERROR, STATE_EMPTY, STATE_NEW, \
STATE_MODIFIED, STATE_CONFLICT, STATE_REMOVED, \
-STATE_MISSING, STATE_NONEXIST, STATE_MAX = range(13)
+STATE_MISSING, STATE_NONEXIST, STATE_MAX = list(range(13))
class Entry(object):
# These are the possible states of files. Be sure to get the colons correct.
diff --git a/meld/vcview.py b/meld/vcview.py
index e89057c..2169cd9 100644
--- a/meld/vcview.py
+++ b/meld/vcview.py
@@ -79,7 +79,8 @@ class CommitDialog(gnomeglade.Component):
buf = self.textview.get_buffer()
buf.set_text( gentry.child.get_text() )
-COL_LOCATION, COL_STATUS, COL_REVISION, COL_TAG, COL_OPTIONS, COL_END = range(tree.COL_END, tree.COL_END+6)
+COL_LOCATION, COL_STATUS, COL_REVISION, COL_TAG, COL_OPTIONS, COL_END = \
+ list(range(tree.COL_END, tree.COL_END+6))
class VcTreeStore(tree.DiffTreeStore):
def __init__(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]