1
0
python-beautifulsoup4/beautifulsoup4-lxml-fixes.patch
Tomáš Chvátal 77790c427c Accepting request 627521 from home:adrianSuSE:home-assistant
- update to 4.6.1:
  * Stop data loss when encountering an empty numeric entity, and
    possibly in other cases.  Thanks to tos.kamiya for the fix. [bug=1698503]
  
  * Preserve XML namespaces introduced inside an XML document, not just
     the ones introduced at the top level. [bug=1718787]
  
  * Added a new formatter, "html5", which represents void elements
     as "<element>" rather than "<element/>".  [bug=1716272]
  
  * Fixed a problem where the html.parser tree builder interpreted
    a string like "&foo " as the character entity "&foo;"  [bug=1728706]
  
  * Correctly handle invalid HTML numeric character entities like &#147;
    which reference code points that are not Unicode code points. Note
    that this is only fixed when Beautiful Soup is used with the
    html.parser parser -- html5lib already worked and I couldn't fix it
    with lxml.  [bug=1782933]
  
  * Improved the warning given when no parser is specified. [bug=1780571]
  
  * When markup contains duplicate elements, a select() call that
    includes multiple match clauses will match all relevant
    elements. [bug=1770596]
  
  * Fixed code that was causing deprecation warnings in recent Python 3
    versions. Includes a patch from Ville Skyttä. [bug=1778909] [bug=1689496]
  
  * Fixed a Windows crash in diagnose() when checking whether a long
    markup string is a filename. [bug=1737121]

OBS-URL: https://build.opensuse.org/request/show/627521
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-beautifulsoup4?expand=0&rev=62
2018-08-05 12:32:47 +00:00

26 lines
1.3 KiB
Diff

Index: beautifulsoup4-4.6.1/bs4/testing.py
===================================================================
--- beautifulsoup4-4.6.1.orig/bs4/testing.py
+++ beautifulsoup4-4.6.1/bs4/testing.py
@@ -677,7 +677,7 @@ class XMLTreeBuilderSmokeTest(object):
self.assertTrue(b"&lt; &lt; hey &gt; &gt;" in encoded)
def test_can_parse_unicode_document(self):
- markup = u'<?xml version="1.0" encoding="euc-jp"><root>Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!</root>'
+ markup = u'<?xml version="1.0""><root>Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!</root>'
soup = self.soup(markup)
self.assertEqual(u'Sacr\xe9 bleu!', soup.root.string)
Index: beautifulsoup4-4.6.1/bs4/tests/test_lxml.py
===================================================================
--- beautifulsoup4-4.6.1.orig/bs4/tests/test_lxml.py
+++ beautifulsoup4-4.6.1/bs4/tests/test_lxml.py
@@ -67,6 +67,7 @@ class LXMLTreeBuilderSmokeTest(SoupTest,
# Make sure that the deprecated BSS class uses an xml builder
# if one is installed.
with warnings.catch_warnings(record=True) as w:
+ warnings.simplefilter("always")
soup = BeautifulStoneSoup("<b />")
self.assertEqual(u"<b/>", unicode(soup.b))
self.assertTrue("BeautifulStoneSoup class is deprecated" in str(w[0].message))