From: Reilly Grant <reillyeon@qotw.net>
To: git@vger.kernel.org, gitster@pobox.com
Cc: Reilly Grant <reillyeon@qotw.net>
Subject: [PATCH v2] git-p4: Avoid modules deprecated in Python 2.6.
Date: Thu, 10 Sep 2009 00:02:38 -0700 [thread overview]
Message-ID: <1252566158-13305-1-git-send-email-reillyeon@qotw.net> (raw)
The popen2, sha and sets modules are deprecated in Python 2.6 (sha in
Python 2.5). Both popen2 and sha are not actually used in git-p4.
Replace usage of sets.Set with the builtin set object.
The built-in set object was added in Python 2.4 and is already used in
other parts of this script, so this dependency is nothing new.
Signed-off-by: Reilly Grant <reillyeon@qotw.net>
---
contrib/fast-import/git-p4 | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index 38438f3..e710219 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -8,12 +8,10 @@
# License: MIT <http://www.opensource.org/licenses/mit-license.php>
#
-import optparse, sys, os, marshal, popen2, subprocess, shelve
-import tempfile, getopt, sha, os.path, time, platform
+import optparse, sys, os, marshal, subprocess, shelve
+import tempfile, getopt, os.path, time, platform
import re
-from sets import Set;
-
verbose = False
@@ -864,8 +862,8 @@ class P4Sync(Command):
self.usage += " //depot/path[@revRange]"
self.silent = False
- self.createdBranches = Set()
- self.committedChanges = Set()
+ self.createdBranches = set()
+ self.committedChanges = set()
self.branch = ""
self.detectBranches = False
self.detectLabels = False
@@ -1662,7 +1660,7 @@ class P4Sync(Command):
if len(self.changesFile) > 0:
output = open(self.changesFile).readlines()
- changeSet = Set()
+ changeSet = set()
for line in output:
changeSet.add(int(line))
--
1.6.3.3
next reply other threads:[~2009-09-10 7:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-10 7:02 Reilly Grant [this message]
2009-09-10 18:22 ` [PATCH v2] git-p4: Avoid modules deprecated in Python 2.6 Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1252566158-13305-1-git-send-email-reillyeon@qotw.net \
--to=reillyeon@qotw.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).