Beautifulsoup4

Latest version: v4.12.3

Safety actively analyzes 628989 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 7 of 12

4.0.0

might treat "4.0.0" as being an earlier version than "4.0.0b10".

* Brought BS up to date with the latest release of soupselect, adding
CSS selector support for direct descendant matches and multiple CSS
class matches.

4.0.0b10

* Added support for simple CSS selectors, taken from the soupselect project.

* Fixed a crash when using html5lib. [bug=943246]

* In HTML5-style <meta charset="foo"> tags, the value of the "charset"
attribute is now replaced with the appropriate encoding on
output. [bug=942714]

* Fixed a bug that caused calling a tag to sometimes call find_all()
with the wrong arguments. [bug=944426]

* For backwards compatibility, brought back the BeautifulStoneSoup
class as a deprecated wrapper around BeautifulSoup.

4.0.0b9

* Fixed the string representation of DOCTYPEs that have both a public
ID and a system ID.

* Fixed the generated XML declaration.

* Renamed Tag.nsprefix to Tag.prefix, for consistency with
NamespacedAttribute.

* Fixed a test failure that occurred on Python 3.x when chardet was
installed.

* Made prettify() return Unicode by default, so it will look nice on
Python 3 when passed into print().

4.0.0b8

* All tree builders now preserve namespace information in the
documents they parse. If you use the html5lib parser or lxml's XML
parser, you can access the namespace URL for a tag as tag.namespace.

However, there is no special support for namespace-oriented
searching or tree manipulation. When you search the tree, you need
to use namespace prefixes exactly as they're used in the original
document.

* The string representation of a DOCTYPE always ends in a newline.

* Issue a warning if the user tries to use a SoupStrainer in
conjunction with the html5lib tree builder, which doesn't support
them.

4.0.0b7

* Upon decoding to string, any characters that can't be represented in
your chosen encoding will be converted into numeric XML entity
references.

* Issue a warning if characters were replaced with REPLACEMENT
CHARACTER during Unicode conversion.

* Restored compatibility with Python 2.6.

* The install process no longer installs docs or auxiliary text files.

* It's now possible to deepcopy a BeautifulSoup object created with
Python's built-in HTML parser.

* About 100 unit tests that "test" the behavior of various parsers on
invalid markup have been removed. Legitimate changes to those
parsers caused these tests to fail, indicating that perhaps
Beautiful Soup should not test the behavior of foreign
libraries.

The problematic unit tests have been reformulated as informational
comparisons generated by the script
scripts/demonstrate_parser_differences.py.

This makes Beautiful Soup compatible with html5lib version 0.95 and
future versions of HTMLParser.

4.0.0b6

* Multi-valued attributes like "class" always have a list of values,
even if there's only one value in the list.

* Added a number of multi-valued attributes defined in HTML5.

* Stopped generating a space before the slash that closes an
empty-element tag. This may come back if I add a special XHTML mode
(http://www.w3.org/TR/xhtml1/#C_2), but right now it's pretty
useless.

* Passing text along with tag-specific arguments to a find* method:

find("a", text="Click here")

will find tags that contain the given text as their
.string. Previously, the tag-specific arguments were ignored and
only strings were searched.

* Fixed a bug that caused the html5lib tree builder to build a
partially disconnected tree. Generally cleaned up the html5lib tree
builder.

* If you restrict a multi-valued attribute like "class" to a string
that contains spaces, Beautiful Soup will only consider it a match
if the values correspond to that specific string.

Page 7 of 12

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.