Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 197293

Summary: dev-python/beautifulsoup-3.0.5 version bump fixes sgmllib ascii char issue
Product: Gentoo Linux Reporter: Matteo Azzali (RETIRED) <mattepiu>
Component: [OLD] DevelopmentAssignee: Python Gentoo Team <python>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: python-2.5.1-r3-ebuild-changes.patch

Description Matteo Azzali (RETIRED) gentoo-dev 2007-10-28 12:48:43 UTC
The bus is that sgmlib checks for ascii characters looking for 256 of them
into sgmlib.py (while ascii chars are 128).
The issue is described even at: http://my.opera.com/knuthy/blog/index.dml/tag/beautifulsoup

and can be fixed with a simple sed line in the ebuild (patch will follow)

Reproducible: Always

Actual Results:  
Non-ascii chars generate the error:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)


Expected Results:  
Non-ascii chars do not give errors.
Comment 1 Matteo Azzali (RETIRED) gentoo-dev 2007-10-28 12:50:22 UTC
Created attachment 134528 [details, diff]
python-2.5.1-r3-ebuild-changes.patch
Comment 2 Matteo Azzali (RETIRED) gentoo-dev 2008-01-03 11:08:58 UTC
It seems that this is intended in sgmllib.py of python-2.5,
so beautifulsoup (maybe the only package having this issue after python-2.5
update) has been updated (3.0.5) to be compatible with python-2.5.

So beautifulsoup-3.0.4 should depend on <dev-lang/python-2.5 ,
while 3.0.5 bump should be needed to run under python-2.5 or newers.
Comment 3 Tiziano Müller (RETIRED) gentoo-dev 2008-02-23 18:07:20 UTC
Version bump done. Tested with python-2.4 and 2.5. No need to restrict to python-2.5

Thanks, cheers.