[Slackbuilds-users] BeautifulSoup4 not building

Dave Woodfall dave at slackbuilds.org
Sat Apr 11 16:57:20 UTC 2020


On 2020-04-10 08:43,
Luveh Keraph <1.41421 at gmail.com> put forth the proposition:
>  PYTHON_3_PRE_3_2 = (sys.version_info[0] == 3 and sys.version_info < (3,2))
> @@ -40,17 +40,17 @@
>  class TestConstructor(SoupTest):
>
>      def test_short_unicode_input(self):
> --- py3k/bs4/tests/test_tree.py (originalWARNING: couldn't encode
> py3k/bs4/tests/test_tree.py's diff for your terminal
> RefactoringTool: Files that were modified:
> RefactoringTool: py3k/bs4/__init__.py
> RefactoringTool: py3k/bs4/dammit.py
> RefactoringTool: py3k/bs4/diagnose.py
> RefactoringTool: py3k/bs4/element.py
> RefactoringTool: py3k/bs4/testing.py
> RefactoringTool: py3k/bs4/builder/__init__.py
> RefactoringTool: py3k/bs4/builder/_html5lib.py
> RefactoringTool: py3k/bs4/builder/_htmlparser.py
> RefactoringTool: py3k/bs4/builder/_lxml.py
> RefactoringTool: py3k/bs4/tests/__init__.py
> RefactoringTool: py3k/bs4/tests/test_builder_registry.py
> RefactoringTool: py3k/bs4/tests/test_docs.py
> RefactoringTool: py3k/bs4/tests/test_html5lib.py
> RefactoringTool: py3k/bs4/tests/test_htmlparser.py
> RefactoringTool: py3k/bs4/tests/test_lxml.py
> RefactoringTool: py3k/bs4/tests/test_soup.py
> RefactoringTool: py3k/bs4/tests/test_tree.py
> )
> +++ py3k/bs4/tests/test_tree.py (refactored)
> @@ -71,13 +71,13 @@
>          self.assertEqual(soup.find("b").string, "2")
>
>      def test_unicode_text_find(self):
>
> OK, conversion is done.
> Now running the unit tests.
> .................................................................................................................................../tmp/SBo/beautifulsoup4-4.6.1/py3k/bs4/builder/_htmlparser.py:78:
> UserWarning: don't crash
>   warnings.warn(msg)
> ..................................................................F...F..................................................................................................................................................................................................................................................................................
> ======================================================================
> FAIL: test_nested_namespaces (tests.test_lxml.LXMLXMLTreeBuilderSmokeTest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/tmp/SBo/beautifulsoup4-4.6.1/py3k/bs4/testing.py", line 665, in
> test_nested_namespaces
>     self.assertEqual(doc, soup.encode())
> AssertionError: b'<?x[144 chars]xmlns="http://ns1/">\n<child xmlns="
> http://ns2[96 chars]ent>' != b'<?x[144 chars]xmlns:="http://ns1/">\n<child
> xmlns:="http://n[99 chars]ent>'
>
> ======================================================================
> FAIL: test_real_xhtml_document (tests.test_lxml.LXMLXMLTreeBuilderSmokeTest)
> A real XHTML document should come out *exactly* the same as it went in.
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/tmp/SBo/beautifulsoup4-4.6.1/py3k/bs4/testing.py", line 654, in
> test_real_xhtml_document
>     soup.encode("utf-8"), markup)
> AssertionError: b'<?x[108
> chars]xmlns:="http://www.w3.org/1999/xhtml">\n<head>[56
> chars]tml>' != b'<?x[108
> chars]xmlns="http://www.w3.org/1999/xhtml">\n<head><[55
> chars]tml>'
>
> ----------------------------------------------------------------------
> Ran 476 tests in 0.522s
>
> FAILED (failures=2)

Did you find a solution to this?

I get the same error when building in a chroot, but it builds fine on
the host machine.  It doesn't seem to matter it bs4 is already
installed or not.

--
Dave

The antibloat squad!
For those interested in no bloat, minimal desktop Linux
gopher://tty1.uk/1/?minimal-linux
http://tty1.uk/minimal-linux
#minimallinux @ chat.freenode.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.slackbuilds.org/pipermail/slackbuilds-users/attachments/20200411/fe6d0719/attachment.asc>


More information about the SlackBuilds-users mailing list