BeautifulSoup and lxml ¶ Friday, July 4, 2025 When you build a BeautifulSoup from a plain text, that text was getting wrapped into a <p> tag when the installed lxml version is earlier than 6, but isn’t any more with the new version of lxml. >>> from bs4 import BeautifulSoup >>> soup = BeautifulSoup ( "Foo" , "lxml" ) The following snippet passes with lxml before 6 … >>> print ( soup ) # lxml<6…