BeautifulSoup compatibility against trunk

Bug #1289324 reported by 王嘉楠 on 2014-03-07
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Hi, it's my first time to report bug.
Sorry if i'm wrong.

from ,
It seems that beautifulsoup dev team modify the namespace and API of module ,
so it should be like that "from bs4 import BeautifulSoup".

However, in lxml/html/ , there is "from BeautifulSoup import XXX",
so when I import the package in my script, it raised ImportError: No module named BeautifulSoup


Development Environment:
mac osx 10.9.1
Python : (2, 7, 5)
lxml : (3, 3, 3, 0)
libxml used : (2, 9, 0)
libxml complied : (2, 9, 0)
libxslt used : (1, 1, 28)
libxslt compiled : (1, 1, 28)

scoder (scoder) wrote :

Yes, there is a new(er) version 4.x of BS that should get supported, in addition to the current BS 3.x support. If it can be done with a conditional import (prefering the newer version), that would be nice. I'd accept a pull request that implements that. Note that the tests in should then also test both versions if both are installed. That might be the tricky part of it.

Changed in lxml:
importance: Undecided → Low
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers