]> git.pld-linux.org Git - packages/python-bs4.git/commitdiff
- added smart_quotes patch (give some encoding hint in test, it failed on python3)
authorJakub Bogusz <qboosh@pld-linux.org>
Mon, 21 Mar 2022 18:08:09 +0000 (19:08 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Mon, 21 Mar 2022 18:08:09 +0000 (19:08 +0100)
python-bs4-smart_quotes.patch [new file with mode: 0644]
python-bs4.spec

diff --git a/python-bs4-smart_quotes.patch b/python-bs4-smart_quotes.patch
new file mode 100644 (file)
index 0000000..e1399f5
--- /dev/null
@@ -0,0 +1,11 @@
+--- beautifulsoup4-4.6.3/bs4/tests/test_soup.py.orig   2016-07-27 03:27:42.000000000 +0200
++++ beautifulsoup4-4.6.3/bs4/tests/test_soup.py        2022-03-21 18:20:50.490829014 +0100
+@@ -171,7 +171,7 @@ class TestEntitySubstitution(unittest.Te
+         # MS smart quotes are a common source of frustration, so we
+         # give them a special test.
+         quotes = b"\x91\x92foo\x93\x94"
+-        dammit = UnicodeDammit(quotes)
++        dammit = UnicodeDammit(quotes, override_encodings=["windows-1252"])
+         self.assertEqual(self.sub.substitute_html(dammit.markup),
+                           "&lsquo;&rsquo;foo&ldquo;&rdquo;")
index 201568555554229130cd9564d62b95dbd9409107..f0d014be439d006c83e06a477139a62201c5c295 100644 (file)
@@ -18,6 +18,7 @@ Source0:      https://files.pythonhosted.org/packages/source/b/beautifulsoup4/beautif
 # Source0-md5: c17714d0f91a23b708a592cb3c697728
 Patch0:                test_suite.patch
 Patch1:                %{name}-lxml.patch
+Patch2:                %{name}-smart_quotes.patch
 URL:           https://www.crummy.com/software/BeautifulSoup/
 BuildRequires: rpmbuild(macros) >= 1.714
 BuildRequires: rpm-pythonprov
@@ -75,6 +76,7 @@ Dokumentacja API moduĊ‚u Pythona beautifulsoup4.
 %setup -q -n beautifulsoup4-%{version}
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 %if %{with python2}
This page took 0.163036 seconds and 4 git commands to generate.