{"thread":{"id":"2547","subject":"[PATCH] Give python a chance to find \"backported\" modules","startedAt":"2005-11-16T02:33:44Z","lastAt":"2005-11-18T13:18:36Z","messageCount":4,"participants":["Johannes Schindelin","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"11982","messageId":"Pine.LNX.4.63.0511160331150.15130@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"2547","inReplyTo":null,"subject":"[PATCH] Give python a chance to find \"backported\" modules","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2005-11-16T02:33:44Z","receivedAt":"2005-11-16T02:33:44Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\npython 2.2.1 is perfectly capable of executing git-merge-recursive,\nprovided that it finds heapq and sets. All you have to do is to steal\nheapq.py and sets.py from python 2.3 or newer, and drop them in your\nGIT_PYTHON_PATH. \n\nSigned-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n\n---\n\n\tI noted that the python modules are installed uncompiled,\n\ti.e. *.py but not *.pyc. Is this intended?\n\n git-merge-recursive.py |    6 ++++--\n 1 files changed, 4 insertions(+), 2 deletions(-)\n\napplies-to: 2a67ad9e41fc614c7848ceff43f4b60b99cf932d\ndfd75a554e84139ddce7b62ec82ef94254da1573\ndiff --git a/git-merge-recursive.py b/git-merge-recursive.py\nindex 1bf73f3..d7d36aa 100755\n--- a/git-merge-recursive.py\n+++ b/git-merge-recursive.py\n@@ -3,11 +3,13 @@\n # Copyright (C) 2005 Fredrik Kuivinen\n #\n \n-import sys, math, random, os, re, signal, tempfile, stat, errno, traceback\n+import sys\n+sys.path.append('''@@GIT_PYTHON_PATH@@''')\n+\n+import math, random, os, re, signal, tempfile, stat, errno, traceback\n from heapq import heappush, heappop\n from sets import Set\n \n-sys.path.append('''@@GIT_PYTHON_PATH@@''')\n from gitMergeCommon import *\n \n outputIndent = 0\n---\n0.99.9.GIT\n"},{"id":"11986","messageId":"7vveytcmus.fsf@assigned-by-dhcp.cox.net","threadId":"2547","inReplyTo":"Pine.LNX.4.63.0511160331150.15130@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH] Give python a chance to find \"backported\" modules","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-11-16T03:06:51Z","receivedAt":"2005-11-16T03:06:51Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> python 2.2.1 is perfectly capable of executing git-merge-recursive,\n> provided that it finds heapq and sets. All you have to do is to steal\n> heapq.py and sets.py from python 2.3 or newer, and drop them in your\n> GIT_PYTHON_PATH. \n\nFair enough.  But I do not think we would want to go further\nthan this.  Especially, shipping a copy of heapq and sets like\nwe did for subprocess.\n\nThanks anyway.\n"},{"id":"12000","messageId":"Pine.LNX.4.63.0511160901470.16063@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"2547","inReplyTo":"7vveytcmus.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Give python a chance to find \"backported\" modules","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2005-11-16T08:02:49Z","receivedAt":"2005-11-16T08:02:49Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 15 Nov 2005, Junio C Hamano wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n> > python 2.2.1 is perfectly capable of executing git-merge-recursive,\n> > provided that it finds heapq and sets. All you have to do is to steal\n> > heapq.py and sets.py from python 2.3 or newer, and drop them in your\n> > GIT_PYTHON_PATH. \n> \n> Fair enough.  But I do not think we would want to go further\n> than this.  Especially, shipping a copy of heapq and sets like\n> we did for subprocess.\n\nYes. That was my intention.\n\nCiao,\nDscho\n"},{"id":"12221","messageId":"Pine.LNX.4.63.0511181415380.28109@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"2547","inReplyTo":"Pine.LNX.4.63.0511160331150.15130@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH] Give python a chance to find \"backported\" modules","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2005-11-18T13:18:36Z","receivedAt":"2005-11-18T13:18:36Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 16 Nov 2005, Johannes Schindelin wrote:\n\n> python 2.2.1 is perfectly capable of executing git-merge-recursive,\n\nWell, no.\n\nActually, my tests ran, but only because they were trivial, or next to it. \nIn line 477 of git-merge-recursive.py, there is a reference to an __iter__ \nmember of a list (the recs object). Python 2.2.1 does not know about that, \nbut rather wants to do the iteration over the collection iter(recs). \nHowever, this does not work, as some of the contained objects have to be \nskipped.\n\nSo I bit the bullet, compiled Python 2.4.2, and it works. Sorry for the \nnoise.\n\nCiao,\nDscho\n"}]}