From 3ce5ed1908a53eb2551d579d54f1b5535134b2775ead36f59505d83546e80a39 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Wed, 3 Jun 2020 11:11:22 +0000 Subject: [PATCH] =?UTF-8?q?-=20update=20to=204.9.1:=20=20=20*=20Added=20a?= =?UTF-8?q?=20keyword=20argument=20'on=5Fduplicate=5Fattribute'=20to=20the?= =?UTF-8?q?=20=20=20=20=20BeautifulSoupHTMLParser=20constructor=20(used=20?= =?UTF-8?q?by=20the=20html.parser=20tree=20=20=20=20=20builder)=20which=20?= =?UTF-8?q?lets=20you=20customize=20the=20handling=20of=20markup=20that=20?= =?UTF-8?q?=20=20=20=20contains=20the=20same=20attribute=20more=20than=20o?= =?UTF-8?q?nce,=20as=20in:=20=20=20=20=20=20[bug=3D1878209]=20=20=20*=20Added=20a=20distinct=20subclas?= =?UTF-8?q?s,=20GuessedAtParserWarning,=20for=20the=20warning=20=20=20=20?= =?UTF-8?q?=20issued=20when=20BeautifulSoup=20is=20instantiated=20without?= =?UTF-8?q?=20a=20parser=20being=20=20=20=20=20specified.=20[bug=3D1873787?= =?UTF-8?q?]=20=20=20*=20Added=20a=20distinct=20subclass,=20MarkupResemble?= =?UTF-8?q?sLocatorWarning,=20for=20the=20=20=20=20=20warning=20issued=20w?= =?UTF-8?q?hen=20BeautifulSoup=20is=20instantiated=20with=20'markup'=20tha?= =?UTF-8?q?t=20=20=20=20=20actually=20seems=20to=20be=20a=20URL=20or=20the?= =?UTF-8?q?=20path=20to=20a=20file=20on=20=20=20=20=20disk.=20[bug=3D18737?= =?UTF-8?q?87]=20=20=20*=20The=20new=20NavigableString=20subclasses=20(Sty?= =?UTF-8?q?lesheet,=20Script,=20and=20=20=20=20=20TemplateString)=20can=20?= =?UTF-8?q?now=20be=20imported=20directly=20from=20the=20bs4=20package.=20?= =?UTF-8?q?=20=20*=20If=20you=20encode=20a=20document=20with=20a=20Python-?= =?UTF-8?q?specific=20encoding=20like=20=20=20=20=20'unicode=5Fescape',=20?= =?UTF-8?q?that=20encoding=20is=20no=20longer=20mentioned=20in=20the=20fin?= =?UTF-8?q?al=20=20=20=20=20XML=20or=20HTML=20document.=20Instead,=20encod?= =?UTF-8?q?ing=20information=20is=20omitted=20or=20=20=20=20=20left=20blan?= =?UTF-8?q?k.=20[bug=3D1874955]=20=20=20*=20Fixed=20test=20failures=20when?= =?UTF-8?q?=20run=20against=20soupselect=202.0.=20Patch=20by=20Tom=C3=A1?= =?UTF-8?q?=C5=A1=20=20=20=20=20Chv=C3=A1tal.=20[bug=3D1872279]=20-=20remo?= =?UTF-8?q?ve=20soupsieve2-tests.patch:=20upstreamed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-beautifulsoup4?expand=0&rev=77 --- beautifulsoup4-4.9.0.tar.gz | 3 --- beautifulsoup4-4.9.1.tar.gz | 3 +++ python-beautifulsoup4.changes | 26 ++++++++++++++++++ python-beautifulsoup4.spec | 4 +-- soupsieve2-tests.patch | 50 ----------------------------------- 5 files changed, 30 insertions(+), 56 deletions(-) delete mode 100644 beautifulsoup4-4.9.0.tar.gz create mode 100644 beautifulsoup4-4.9.1.tar.gz delete mode 100644 soupsieve2-tests.patch diff --git a/beautifulsoup4-4.9.0.tar.gz b/beautifulsoup4-4.9.0.tar.gz deleted file mode 100644 index 241daf8..0000000 --- a/beautifulsoup4-4.9.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:594ca51a10d2b3443cbac41214e12dbb2a1cd57e1a7344659849e2e20ba6a8d8 -size 368809 diff --git a/beautifulsoup4-4.9.1.tar.gz b/beautifulsoup4-4.9.1.tar.gz new file mode 100644 index 0000000..05e3b9c --- /dev/null +++ b/beautifulsoup4-4.9.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:73cc4d115b96f79c7d77c1c7f7a0a8d4c57860d1041df407dd1aae7f07a77fd7 +size 374759 diff --git a/python-beautifulsoup4.changes b/python-beautifulsoup4.changes index 56b1109..45f9f7f 100644 --- a/python-beautifulsoup4.changes +++ b/python-beautifulsoup4.changes @@ -1,3 +1,29 @@ +------------------------------------------------------------------- +Wed Jun 3 11:10:03 UTC 2020 - Dirk Mueller + +- 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: + [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 + ------------------------------------------------------------------- Sun Apr 12 08:31:00 UTC 2020 - Tomáš Chvátal diff --git a/python-beautifulsoup4.spec b/python-beautifulsoup4.spec index f249628..23b769c 100644 --- a/python-beautifulsoup4.spec +++ b/python-beautifulsoup4.spec @@ -18,13 +18,12 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-beautifulsoup4 -Version: 4.9.0 +Version: 4.9.1 Release: 0 Summary: HTML/XML Parser for Quick-Turnaround Applications Like Screen-Scraping License: MIT URL: https://www.crummy.com/software/BeautifulSoup/ Source: https://files.pythonhosted.org/packages/source/b/beautifulsoup4/beautifulsoup4-%{version}.tar.gz -Patch0: soupsieve2-tests.patch BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module soupsieve >= 1.2} @@ -75,7 +74,6 @@ Documentation and help files for %{name} %prep %setup -q -n beautifulsoup4-%{version} -%patch0 -p1 %build %python_build diff --git a/soupsieve2-tests.patch b/soupsieve2-tests.patch deleted file mode 100644 index cccce03..0000000 --- a/soupsieve2-tests.patch +++ /dev/null @@ -1,50 +0,0 @@ -Index: beautifulsoup4-4.9.0/bs4/tests/test_tree.py -=================================================================== ---- beautifulsoup4-4.9.0.orig/bs4/tests/test_tree.py -+++ beautifulsoup4-4.9.0/bs4/tests/test_tree.py -@@ -37,6 +37,7 @@ from bs4.testing import ( - SoupTest, - skipIf, - ) -+from soupsieve import SelectorSyntaxError - - XML_BUILDER_PRESENT = (builder_registry.lookup("xml") is not None) - LXML_PRESENT = (builder_registry.lookup("lxml") is not None) -@@ -2018,7 +2019,7 @@ class TestSoupSelector(TreeTest): - self.assertEqual(len(self.soup.select('del')), 0) - - def test_invalid_tag(self): -- self.assertRaises(SyntaxError, self.soup.select, 'tag%t') -+ self.assertRaises(SelectorSyntaxError, self.soup.select, 'tag%t') - - def test_select_dashed_tag_ids(self): - self.assertSelects('custom-dashed-tag', ['dash1', 'dash2']) -@@ -2209,7 +2210,7 @@ class TestSoupSelector(TreeTest): - NotImplementedError, self.soup.select, "a:no-such-pseudoclass") - - self.assertRaises( -- SyntaxError, self.soup.select, "a:nth-of-type(a)") -+ SelectorSyntaxError, self.soup.select, "a:nth-of-type(a)") - - def test_nth_of_type(self): - # Try to select first paragraph -@@ -2265,7 +2266,7 @@ class TestSoupSelector(TreeTest): - self.assertEqual([], self.soup.select('#inner ~ h2')) - - def test_dangling_combinator(self): -- self.assertRaises(SyntaxError, self.soup.select, 'h1 >') -+ self.assertRaises(SelectorSyntaxError, self.soup.select, 'h1 >') - - def test_sibling_combinator_wont_select_same_tag_twice(self): - self.assertSelects('p[lang] ~ p', ['lang-en-gb', 'lang-en-us', 'lang-fr']) -@@ -2296,8 +2297,8 @@ class TestSoupSelector(TreeTest): - self.assertSelects('div x,y, z', ['xid', 'yid', 'zida', 'zidb', 'zidab', 'zidac']) - - def test_invalid_multiple_select(self): -- self.assertRaises(SyntaxError, self.soup.select, ',x, y') -- self.assertRaises(SyntaxError, self.soup.select, 'x,,y') -+ self.assertRaises(SelectorSyntaxError, self.soup.select, ',x, y') -+ self.assertRaises(SelectorSyntaxError, self.soup.select, 'x,,y') - - def test_multiple_select_attrs(self): - self.assertSelects('p[lang=en], p[lang=en-gb]', ['lang-en', 'lang-en-gb'])