leonardr
unread,Apr 5, 2023, 10:56:03 AM4/5/23Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to beautifulsoup
= 4.12.1 (20230405)
NOTE: the following things are likely to be dropped in the next
release of Beautiful Soup:
Official support for Python 3.6.
Inclusion of unit tests and test data in the wheel file.
Two scripts: demonstrate_parser_differences.py and test-all-versions.
Changes:
* This version of Beautiful Soup replaces setup.py and setup.cfg
with pyproject.toml. Beautiful Soup now uses tox as its test backend
and hatch to do builds.
* The main functional improvement in this version is a nonrecursive technique
for regenerating a tree. This technique is used to avoid situations where,
in previous versions, doing something to a very deeply nested tree
would overflow the Python interpreter stack:
1. Outputting a tree as a string, e.g. with
BeautifulSoup.encode() [bug=1471755]
2. Making copies of trees (copy.copy() and
copy.deepcopy() from the Python standard library). [bug=1709837]
3. Pickling a BeautifulSoup object. (Note that pickling a Tag
object can still cause an overflow.)
* Making a copy of a BeautifulSoup object no longer parses the
document again, which should improve performance significantly.
* When a BeautifulSoup object is unpickled, Beautiful Soup now
tries to associate an appropriate TreeBuilder object with it.
* Tag.prettify() will now consistently end prettified markup with
a newline.
* Added unit tests for fuzz test cases created by third
parties. Some of these tests are skipped since they point
to problems outside of Beautiful Soup, but this change
puts them all in one convenient place.
* PageElement now implements the known_xml attribute. (This was technically
a bug, but it shouldn't be an issue in normal use.) [bug=2007895]
* The demonstrate_parser_differences.py script was still written in
Python 2. I've converted it to Python 3, but since no one has
mentioned this over the years, it's a sign that no one uses this
script and it's not serving its purpose.