From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Dec 9 03:30:22 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 81CC116A4CE for ; Thu, 9 Dec 2004 03:30:22 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 30B4543D66 for ; Thu, 9 Dec 2004 03:30:22 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iB93UMk1059313 for ; Thu, 9 Dec 2004 03:30:22 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iB93UMAR059312; Thu, 9 Dec 2004 03:30:22 GMT (envelope-from gnats) Resent-Date: Thu, 9 Dec 2004 03:30:22 GMT Resent-Message-Id: <200412090330.iB93UMAR059312@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jonathan Lennox Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BFD8916A4CE for ; Thu, 9 Dec 2004 03:28:51 +0000 (GMT) Received: from cnr.cs.columbia.edu (cnr.cs.columbia.edu [128.59.19.133]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5472E43D39 for ; Thu, 9 Dec 2004 03:28:51 +0000 (GMT) (envelope-from lennox@cnr.cs.columbia.edu) Received: from cnr.cs.columbia.edu (localhost [127.0.0.1]) by cnr.cs.columbia.edu (8.13.1/8.13.1) with ESMTP id iB93Sokg029758 for ; Wed, 8 Dec 2004 22:28:50 -0500 (EST) (envelope-from lennox@cnr.cs.columbia.edu) Received: (from lennox@localhost) by cnr.cs.columbia.edu (8.13.1/8.13.1/Submit) id iB93SoqH029757; Wed, 8 Dec 2004 22:28:50 -0500 (EST) (envelope-from lennox) Message-Id: <200412090328.iB93SoqH029757@cnr.cs.columbia.edu> Date: Wed, 8 Dec 2004 22:28:50 -0500 (EST) From: Jonathan Lennox To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/74883: Python 2.4 upgrade breaks port net/py-bittorrent [fix included] X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Jonathan Lennox List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Dec 2004 03:30:22 -0000 >Number: 74883 >Category: ports >Synopsis: Python 2.4 upgrade breaks port net/py-bittorrent [fix included] >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Dec 09 03:30:21 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Jonathan Lennox >Release: FreeBSD 5.3-RELEASE-p2 i386 >Organization: Columbia University >Environment: System: FreeBSD cnr.cs.columbia.edu 5.3-RELEASE-p2 FreeBSD 5.3-RELEASE-p2 #9: Sat Dec 4 12:36:03 EST 2004 lennox@cnr.cs.columbia.edu:/usr/obj/usr/src/sys/CNR i386 >Description: After upgrading the port lang/python to version 2.4, the port net/py-bittorrent is broken. This appears to be an incompatibility in bittorrent's zurllib.py file; the patch below has also been sent to the bittorrent development list. This problem, and the same solution, appears to also apply to the port net/bittornado. >How-To-Repeat: $ btdownloadheadless.py 'http://people.freebsd.org/~scottl/5.3-torrent/5.3-RELEASE-i386-all.torrent' Traceback (most recent call last): File "/usr/local/bin/btdownloadheadless.py", line 163, in ? run(argv[1:]) File "/usr/local/bin/btdownloadheadless.py", line 158, in run download(params, h.chooseFile, h.display, h.finished, h.error, Event(), cols, h.newpath) File "/usr/local/lib/python2.4/site-packages/BitTorrent/download.py", line 120, in download h = urlopen(config['url']) File "/usr/local/lib/python2.4/urllib2.py", line 130, in urlopen return _opener.open(url, data) File "/usr/local/lib/python2.4/urllib2.py", line 364, in open response = meth(req, response) File "/usr/local/lib/python2.4/urllib2.py", line 468, in http_response code, msg, hdrs = response.code, response.msg, response.info() AttributeError: addinfourldecompress instance has no attribute 'code' >Fix: Apply the following patch to net/py-bittorrent: --- Makefile~ Mon Nov 8 16:08:56 2004 +++ Makefile Wed Dec 8 22:23:42 2004 @@ -7,7 +7,7 @@ PORTNAME= BitTorrent PORTVERSION= 3.4.2 -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 1 CATEGORIES?= net python MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED} --- /dev/null Wed Dec 8 22:22:00 2004 +++ files/patch-BitTorrent::zurllib.py Wed Dec 8 22:23:26 2004 @@ -0,0 +1,18 @@ +--- BitTorrent/zurllib.py.bak Thu Jun 26 20:40:21 2003 ++++ BitTorrent/zurllib.py Wed Dec 8 22:21:26 2004 +@@ -35,7 +35,14 @@ + if DEBUG: + pprint.pprint(headers.dict) + url = fp.url +- return addinfourldecompress(fp, headers, url) ++ resp = addinfourldecompress(fp, headers, url) ++ # As of Python 2.4 http_open response also has 'code' and 'msg' ++ # members, and HTTPErrorProcessor breaks if they don't exist. ++ if 'code' in dir(fp): ++ resp.code = fp.code ++ if 'msg' in dir(fp): ++ resp.msg = fp.msg ++ return resp + + + class addinfourldecompress(addinfourl): >Release-Note: >Audit-Trail: >Unformatted: