This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Python 2.4 causes BitTorrent 3.4.2 failure
Type: Stage:
Components: Library (Lib) Versions: Python 2.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: akuchling, brett.cannon, bsder, jjlee
Priority: normal Keywords:

Created on 2005-03-21 09:37 by bsder, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (5)
msg24735 - (view) Author: Andrew P. Lentvorski, Jr. (bsder) Date: 2005-03-21 09:37
The following failure messages gets dumped out of
BitTorrent 3.4.2 when run against Python 2.4:

Traceback (most recent call last):
  File "/usr/local/lib/python2.4/threading.py", line
442, in __bootstrap
    self.run()
  File "/usr/local/lib/python2.4/threading.py", line
422, in run
    self.__target(*self.__args, **self.__kwargs)
  File
"/home/andrewl/python/lib/python2.4/site-packages/BitTorrent/Rerequester.py",
line 84, in rerequest
    h = urlopen(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'
msg24736 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2005-03-21 14:55
Logged In: YES 
user_id=357491

Does this happen if the exact same files are run in 2.3?  I can't find 
addinfourldecompress in Python; is it a BitTorrent class?
msg24737 - (view) Author: Andrew P. Lentvorski, Jr. (bsder) Date: 2005-03-21 20:44
Logged In: YES 
user_id=752864

The same BitTorrent version works just fine under 2.3.5.

addinfourldecompress is a BitTorrent object which inherits
from Python's addinfourl in urllib.py.

The following comment was found in a patch that attempted to
work around the issue:

# As of Python 2.4 http_open response also has 'code' and 'msg'
# members, and HTTPErrorProcessor breaks if they don't exist.

This problem has been cited in a couple of different
contexts.  I saw it in a bug report for bittornado on
FreeBSD.  I also saw it in a RedHat list concerning breakage
in the yum utility.

Annoyingly, nobody seems to have filed it upstream with the
Python folks.
msg24738 - (view) Author: John J Lee (jjlee) Date: 2005-05-19 19:18
Logged In: YES 
user_id=261020

This is indeed http://python.org/sf/852995 again (the yum
package manager bug).  I don't think this is a Python bug,
though it's possible a patch could insulate users from this
change (even though the change was not to a public API).

My detailed comments on the corresponding yum bug are here:

https://bugzilla.redhat.com/beta/show_bug.cgi?id=138535#c44

Unless it's very new, addinfourldecompress is from
BitTorrent, not Python.
msg62576 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2008-02-19 23:53
The Red Hat bug URL is now
https://bugzilla.redhat.com/show_bug.cgi?id=138535 ; it has a lengthy
discussion.

From that bug's history, the problem now seems to be fixed, though I'm
not sure if it was fixed on the Python or the yum/BitTorrent side. 
Closing this bug, anyway.
History
Date User Action Args
2022-04-11 14:56:10adminsetgithub: 41734
2008-02-19 23:53:26akuchlingsetstatus: open -> closed
nosy: + akuchling
resolution: fixed
messages: + msg62576
2005-03-21 09:37:13bsdercreate