From c5e2995b6e327f5c013c6d723d8a8c433c5bb5ff Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Sun, 1 Nov 2015 08:15:05 -0800 Subject: [PATCH] Apply Python 3 futurize transform libmodernize.fixes.fix_xrange_six. --- bots/zephyr_mirror_backend.py | 3 ++- integrations/hg/zulip-changegroup.py | 4 +++- integrations/perforce/git_p4.py | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bots/zephyr_mirror_backend.py b/bots/zephyr_mirror_backend.py index 89e921b..5ba52c6 100755 --- a/bots/zephyr_mirror_backend.py +++ b/bots/zephyr_mirror_backend.py @@ -24,6 +24,7 @@ from __future__ import absolute_import import sys from six.moves import map +from six.moves import range try: import simplejson except ImportError: @@ -44,7 +45,7 @@ import select DEFAULT_SITE = "https://api.zulip.com" class States: - Startup, ZulipToZephyr, ZephyrToZulip, ChildSending = range(4) + Startup, ZulipToZephyr, ZephyrToZulip, ChildSending = list(range(4)) CURRENT_STATE = States.Startup def to_zulip_username(zephyr_username): diff --git a/integrations/hg/zulip-changegroup.py b/integrations/hg/zulip-changegroup.py index 427702c..4ab3509 100755 --- a/integrations/hg/zulip-changegroup.py +++ b/integrations/hg/zulip-changegroup.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # # Zulip hook for Mercurial changeset pushes. -# Copyright © 2012-2014 Zulip, Inc. +# Copyright © 2012-2014 Zulip, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -25,8 +25,10 @@ # # This hook is called when changesets are pushed to the master repository (ie # `hg push`). See https://zulip.com/integrations for installation instructions. +from __future__ import absolute_import import zulip +from six.moves import range VERSION = "0.9" diff --git a/integrations/perforce/git_p4.py b/integrations/perforce/git_p4.py index a13e77e..f9a09ed 100644 --- a/integrations/perforce/git_p4.py +++ b/integrations/perforce/git_p4.py @@ -12,6 +12,7 @@ from __future__ import absolute_import import sys import six from six.moves import input +from six.moves import range if sys.hexversion < 0x02040000: # The limiter is the subprocess module sys.stderr.write("git-p4: requires Python 2.4 or later.\n")