3731c35787
- update to 4.14.2: * Making ResultSet inherit from MutableSequence still resulted in too many breaking changes in users of the library, so I reverted the ResultSet code back to where it was in 4.13.5 and added tests of all known breaking behavior. [bug=2125906] * Made ResultSet inherit from MutableSequence instead of Sequence, since lots of existing code treats ResultSet as a mutable list. * This version adds function overloading to the find_* methods to make it easier to write type-safe Python. * The typing for find_parent() and find_parents() was improved without any overloading. Casts should never be necessary, since those methods only ever return Tag and ResultSet[Tag], respectively. * ResultSet now inherits from Sequence. This should make it easier to incorporate ResultSet objects into your type system without needing to handle ResultSet specially. * Fixed an unhandled exception when creating the string representation of a decomposed element. * The default value for the 'attrs' attribute in find* methods is now None, not the empty dictionary. This should have no visible effect on anything. this release through its long beta process.
Dirk Mueller2025-10-13 09:12:53 +00:00
c9e0e1d3dc
Accepting request 1303567 from devel:languages:python
Ana Guerrero2025-09-11 12:38:08 +00:00
0714f2f341
Accepting request 1303519 from home:glaubitz:branches:devel:languages:python
Dirk Mueller2025-09-10 09:11:16 +00:00
9de8b228fd
Accepting request 1293080 from devel:languages:python
Ana Guerrero2025-07-15 14:43:04 +00:00
55f4440491
Accepting request 1292520 from home:bnavigator:branches:devel:languages:python:numeric
Markéta Machová2025-07-14 09:20:38 +00:00
c1206d6037
Accepting request 1286540 from devel:languages:python
Ana Guerrero2025-06-18 20:28:40 +00:00
e0fde13fec
- Skip failing test test_rejected_input, it is known to be flaky and dependent on the various changes in Python (which there will be more coming in few days).
Matej Cepl2025-06-18 07:07:05 +00:00
5bdea00083
Accepting request 1286539 from home:mcepl:branches:devel:languages:python
Matej Cepl2025-06-18 07:07:05 +00:00
89dfc2f1db
Accepting request 1220019 from devel:languages:python
Ana Guerrero2024-11-06 15:49:29 +00:00
a3deec689c
Accepting request 1220019 from devel:languages:python
Ana Guerrero2024-11-06 15:49:29 +00:00
9b0a4c4b8c
- Add soupsieve26-compat.patch to make tests more tolerant with various versions of soupsieve (better solution for lp#2086199).
Matej Cepl2024-11-01 07:23:51 +00:00
33aa5b3522
- Add soupsieve26-compat.patch to make tests more tolerant with various versions of soupsieve (better solution for lp#2086199).
Matej Cepl2024-11-01 07:23:51 +00:00
1c3cfc65ef
- Skip the test test_unsupported_pseudoclass (lp#2086199).
Matej Cepl2024-10-31 14:24:28 +00:00
51befa0112
- Skip the test test_unsupported_pseudoclass (lp#2086199).
Matej Cepl2024-10-31 14:24:28 +00:00
55c51aaf4a
Accepting request 1140116 from devel:languages:python
Ana Guerrero2024-01-21 22:07:12 +00:00
55f77e3d39
Accepting request 1140116 from devel:languages:python
Ana Guerrero2024-01-21 22:07:12 +00:00
1611f8c551
- update to 4.12.3: * Fixed a regression such that if you set .hidden on a tag, the tag becomes invisible but its contents are still visible. User manipulation of .hidden is not a documented or supported feature, so don't do this, but it wasn't too difficult to keep the old behavior working. * Fixed a case found by Mengyuhan where html.parser giving up on markup would result in an AssertionError instead of a ParserRejectedMarkup exception. * Added the correct stacklevel to instances of the XMLParsedAsHTMLWarning. * Corrected the syntax of the license definition in pyproject.toml. * Corrected a typo in a test that was causing test failures when run against libxml2 2.12.1. - Require cchardet explicitly to avoid charset-normalizer braindamage. - disable tests on SLE_11, fail due to too old python-lxml - remove lxml support (fails unit test) - Use recommended lxml parser instead of native one
Dirk Mueller2024-01-20 13:12:27 +00:00
96ac51f9a9
- update to 4.12.3: * Fixed a regression such that if you set .hidden on a tag, the tag becomes invisible but its contents are still visible. User manipulation of .hidden is not a documented or supported feature, so don't do this, but it wasn't too difficult to keep the old behavior working. * Fixed a case found by Mengyuhan where html.parser giving up on markup would result in an AssertionError instead of a ParserRejectedMarkup exception. * Added the correct stacklevel to instances of the XMLParsedAsHTMLWarning. * Corrected the syntax of the license definition in pyproject.toml. * Corrected a typo in a test that was causing test failures when run against libxml2 2.12.1. - Require cchardet explicitly to avoid charset-normalizer braindamage. - disable tests on SLE_11, fail due to too old python-lxml - remove lxml support (fails unit test) - Use recommended lxml parser instead of native one
Dirk Mueller2024-01-20 13:12:27 +00:00
30a5816851
- Update to 4.12.2: * Fixed an unhandled exception in BeautifulSoup.decode_contents and methods that call it. [bug=2015545] - 4.12.1: * 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
Daniel Garcia2023-05-08 11:44:27 +00:00
f86c498a6b
- Update to 4.12.2: * Fixed an unhandled exception in BeautifulSoup.decode_contents and methods that call it. [bug=2015545] - 4.12.1: * 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
Daniel Garcia2023-05-08 11:44:27 +00:00
884ed4c8e0
- Update to 4.10.0: * This is the first release of Beautiful Soup to only support Python 3. * The behavior of methods like .get_text() and .strings now differs depending on the type of tag. * NavigableString and its subclasses now implement the get_text() method, as well as the properties .strings and .stripped_strings. * The 'html5' formatter now treats attributes whose values are the empty string as HTML boolean attributes. * The 'replace_with()' method now takes a variable number of arguments, and can be used to replace a single element with a sequence of elements. * Corrected output when the namespace prefix associated with a namespaced attribute is the empty string, as opposed to None. * Performance improvement when processing tags that speeds up overall tree construction by 2%. Patch by Morotti. [bug=1899358] * Corrected the use of special string container classes in cases when a single tag may contain strings with different containers; such as the <template> tag, which may contain both TemplateString objects and Comment objects. * The html.parser tree builder can now handle named entities found in the HTML5 spec in much the same way that the html5lib tree builder does. * Added a second way to pass specify encodings to UnicodeDammit and EncodingDetector, based on the order of precedence defined in the HTML5 spec. * Improve the warning issued when a directory name (as opposed to the name of a regular file) is passed as markup into the BeautifulSoup constructor. - Do not pass the directory to pytest.
Steve Kowalik2022-02-09 10:19:16 +00:00
d721f41e64
- Update to 4.10.0: * This is the first release of Beautiful Soup to only support Python 3. * The behavior of methods like .get_text() and .strings now differs depending on the type of tag. * NavigableString and its subclasses now implement the get_text() method, as well as the properties .strings and .stripped_strings. * The 'html5' formatter now treats attributes whose values are the empty string as HTML boolean attributes. * The 'replace_with()' method now takes a variable number of arguments, and can be used to replace a single element with a sequence of elements. * Corrected output when the namespace prefix associated with a namespaced attribute is the empty string, as opposed to None. * Performance improvement when processing tags that speeds up overall tree construction by 2%. Patch by Morotti. [bug=1899358] * Corrected the use of special string container classes in cases when a single tag may contain strings with different containers; such as the <template> tag, which may contain both TemplateString objects and Comment objects. * The html.parser tree builder can now handle named entities found in the HTML5 spec in much the same way that the html5lib tree builder does. * Added a second way to pass specify encodings to UnicodeDammit and EncodingDetector, based on the order of precedence defined in the HTML5 spec. * Improve the warning issued when a directory name (as opposed to the name of a regular file) is passed as markup into the BeautifulSoup constructor. - Do not pass the directory to pytest.
Steve Kowalik2022-02-09 10:19:16 +00:00
0ee353a80f
Accepting request 840885 from home:apersaud:branches:devel:languages:python
Tomáš Chvátal
2020-10-12 06:55:28 +00:00
9b08d66913
Accepting request 840885 from home:apersaud:branches:devel:languages:python
Tomáš Chvátal
2020-10-12 06:55:28 +00:00
387bfaf83c
- update to 4.9.2: * Fixed a bug that caused too many tags to be popped from the tag stack during tree building, when encountering a closing tag that had no matching opening tag. [bug=1880420] * Fixed a bug that inconsistently moved elements over when passing a Tag, rather than a list, into Tag.extend(). [bug=1885710] * Specify the soupsieve dependency in a way that complies with PEP 508. Patch by Mike Nerone. [bug=1893696] * Change the signatures for BeautifulSoup.insert_before and insert_after (which are not implemented) to match PageElement.insert_before and insert_after, quieting warnings in some IDEs. [bug=1897120]
Dirk Mueller2020-09-28 11:41:50 +00:00
d9f15842e1
- update to 4.9.2: * Fixed a bug that caused too many tags to be popped from the tag stack during tree building, when encountering a closing tag that had no matching opening tag. [bug=1880420] * Fixed a bug that inconsistently moved elements over when passing a Tag, rather than a list, into Tag.extend(). [bug=1885710] * Specify the soupsieve dependency in a way that complies with PEP 508. Patch by Mike Nerone. [bug=1893696] * Change the signatures for BeautifulSoup.insert_before and insert_after (which are not implemented) to match PageElement.insert_before and insert_after, quieting warnings in some IDEs. [bug=1897120]
Dirk Mueller2020-09-28 11:41:50 +00:00
3ce5ed1908
- update to 4.9.1: * Added a keyword argument 'on_duplicate_attribute' to the BeautifulSoupHTMLParser constructor (used by the html.parser tree builder) which lets you customize the handling of markup that contains the same attribute more than once, as in: <a href="url1" href="url2"> [bug=1878209] * Added a distinct subclass, GuessedAtParserWarning, for the warning issued when BeautifulSoup is instantiated without a parser being specified. [bug=1873787] * Added a distinct subclass, MarkupResemblesLocatorWarning, for the warning issued when BeautifulSoup is instantiated with 'markup' that actually seems to be a URL or the path to a file on disk. [bug=1873787] * The new NavigableString subclasses (Stylesheet, Script, and TemplateString) can now be imported directly from the bs4 package. * If you encode a document with a Python-specific encoding like 'unicode_escape', that encoding is no longer mentioned in the final XML or HTML document. Instead, encoding information is omitted or left blank. [bug=1874955] * Fixed test failures when run against soupselect 2.0. Patch by Tomáš Chvátal. [bug=1872279] - remove soupsieve2-tests.patch: upstreamed
Dirk Mueller2020-06-03 11:11:22 +00:00
8117c3a7d4
- update to 4.9.1: * Added a keyword argument 'on_duplicate_attribute' to the BeautifulSoupHTMLParser constructor (used by the html.parser tree builder) which lets you customize the handling of markup that contains the same attribute more than once, as in: <a href="url1" href="url2"> [bug=1878209] * Added a distinct subclass, GuessedAtParserWarning, for the warning issued when BeautifulSoup is instantiated without a parser being specified. [bug=1873787] * Added a distinct subclass, MarkupResemblesLocatorWarning, for the warning issued when BeautifulSoup is instantiated with 'markup' that actually seems to be a URL or the path to a file on disk. [bug=1873787] * The new NavigableString subclasses (Stylesheet, Script, and TemplateString) can now be imported directly from the bs4 package. * If you encode a document with a Python-specific encoding like 'unicode_escape', that encoding is no longer mentioned in the final XML or HTML document. Instead, encoding information is omitted or left blank. [bug=1874955] * Fixed test failures when run against soupselect 2.0. Patch by Tomáš Chvátal. [bug=1872279] - remove soupsieve2-tests.patch: upstreamed
Dirk Mueller2020-06-03 11:11:22 +00:00
fa95f50136
- Add patch to fix the tests to pass with new soupsieve too: * soupsieve2-tests.patch * The assert name changed
Tomáš Chvátal
2020-04-12 08:32:03 +00:00
51032dfb53
- Add patch to fix the tests to pass with new soupsieve too: * soupsieve2-tests.patch * The assert name changed
Tomáš Chvátal
2020-04-12 08:32:03 +00:00
952fbe9438
- Update to 4.8.1: * When the html.parser or html5lib parsers are in use, Beautiful Soup will, by default, record the position in the original document where each tag was encountered. * Fixed the definition of the default XML namespace when using lxml 4.4. * Avoid a crash when unpickling certain parse trees generated using html5lib on Python 3. * Avoid a crash when trying to detect the declared encoding of a Unicode document. - Drop patch beautifulsoup4-lxml-fixes.patch as it seems not needed
Tomáš Chvátal
2019-11-01 09:03:11 +00:00
102d333c06
- Update to 4.8.1: * When the html.parser or html5lib parsers are in use, Beautiful Soup will, by default, record the position in the original document where each tag was encountered. * Fixed the definition of the default XML namespace when using lxml 4.4. * Avoid a crash when unpickling certain parse trees generated using html5lib on Python 3. * Avoid a crash when trying to detect the declared encoding of a Unicode document. - Drop patch beautifulsoup4-lxml-fixes.patch as it seems not needed
Tomáš Chvátal
2019-11-01 09:03:11 +00:00
7b384a9de6
- Replace %fdupes -s with plain %fdupes; hardlinks are better.
Matej Cepl2019-10-14 11:42:36 +00:00
5ea53ad9d5
- Replace %fdupes -s with plain %fdupes; hardlinks are better.
Matej Cepl2019-10-14 11:42:36 +00:00
77ec295bda
- Do not generate doc for py2 and py3 variant they are the same so keep just one around - Update to 4.7.1: * Fixed a significant performance problem introduced in 4.7.0. [bug=1810617] * Fixed an incorrectly raised exception when inserting a tag before or after an identical tag. [bug=1810692] * Beautiful Soup will no longer try to keep track of namespaces that are not defined with a prefix; this can confuse soupselect. [bug=1810680] * Tried even harder to avoid the deprecation warning originally fixed in 4.6.1. [bug=1778909] * Beautiful Soup's CSS Selector implementation has been replaced by a dependency on Isaac Muse's SoupSieve project (the soupsieve package on PyPI). The good news is that SoupSieve has a much more robust and complete implementation of CSS selectors, resolving a large number of longstanding issues. The bad news is that from this point onward, SoupSieve must be installed if you want to use the select() method. * Added the PageElement.extend() method, which works like list.append(). [bug=1514970] * PageElement.insert_before() and insert_after() now take a variable number of arguments. [bug=1514970] * Fix a number of problems with the tree builder that caused trees that were superficially okay, but which fell apart when bits were extracted. Patch by Isaac Muse. [bug=1782928,1809910] * Fixed a problem with the tree builder in which elements that contained no content (such as empty comments and all-whitespace elements) were not being treated as part of the tree. Patch by Isaac Muse. [bug=1798699] * Fixed a problem with multi-valued attributes where the value contained whitespace. Thanks to Jens Svalgaard for the fix. [bug=1787453]
Tomáš Chvátal
2019-03-01 11:53:37 +00:00
74de08b63f
- Do not generate doc for py2 and py3 variant they are the same so keep just one around - Update to 4.7.1: * Fixed a significant performance problem introduced in 4.7.0. [bug=1810617] * Fixed an incorrectly raised exception when inserting a tag before or after an identical tag. [bug=1810692] * Beautiful Soup will no longer try to keep track of namespaces that are not defined with a prefix; this can confuse soupselect. [bug=1810680] * Tried even harder to avoid the deprecation warning originally fixed in 4.6.1. [bug=1778909] * Beautiful Soup's CSS Selector implementation has been replaced by a dependency on Isaac Muse's SoupSieve project (the soupsieve package on PyPI). The good news is that SoupSieve has a much more robust and complete implementation of CSS selectors, resolving a large number of longstanding issues. The bad news is that from this point onward, SoupSieve must be installed if you want to use the select() method. * Added the PageElement.extend() method, which works like list.append(). [bug=1514970] * PageElement.insert_before() and insert_after() now take a variable number of arguments. [bug=1514970] * Fix a number of problems with the tree builder that caused trees that were superficially okay, but which fell apart when bits were extracted. Patch by Isaac Muse. [bug=1782928,1809910] * Fixed a problem with the tree builder in which elements that contained no content (such as empty comments and all-whitespace elements) were not being treated as part of the tree. Patch by Isaac Muse. [bug=1798699] * Fixed a problem with multi-valued attributes where the value contained whitespace. Thanks to Jens Svalgaard for the fix. [bug=1787453]
Tomáš Chvátal
2019-03-01 11:53:37 +00:00