Gentoo Archives: gentoo-commits

From: "Ian Delaney (idella4)" <idella4@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-python/beautifulsoup/files: beautifulsoup-3.1.0.1-python-3.patch bfs-4.2.0-no-lxml.patch
Date: Wed, 22 May 2013 15:30:07
Message-Id: 20130522152959.7014E2171D@flycatcher.gentoo.org
1 idella4 13/05/22 15:29:59
2
3 Added: bfs-4.2.0-no-lxml.patch
4 Removed: beautifulsoup-3.1.0.1-python-3.patch
5 Log:
6 Add lxml to IUSE being an optional rdep, switch lxml to RDEP, add use lxml to metadata, optional rdep html5lib blocked by Bug 471002, re-add pypy2 support to 4.2.0, patch to fix tests for 4.2.0
7
8 Revision Changes Path
9 1.1 dev-python/beautifulsoup/files/bfs-4.2.0-no-lxml.patch
10
11 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/beautifulsoup/files/bfs-4.2.0-no-lxml.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/beautifulsoup/files/bfs-4.2.0-no-lxml.patch?rev=1.1&content-type=text/plain
13
14 Index: bfs-4.2.0-no-lxml.patch
15 ===================================================================
16 === modified file 'bs4/testing.py'
17 --- bs4/testing.py 2013-05-07 12:19:02 +0000
18 +++ bs4/testing.py 2013-05-20 13:19:16 +0000
19 @@ -464,6 +464,18 @@
20 self.assertEqual(
21 soup.encode("utf-8"), markup)
22
23 + def test_formatter_processes_script_tag_for_xml_documents(self):
24 + doc = """
25 + <script type="text/javascript">
26 + </script>
27 +"""
28 + soup = BeautifulSoup(doc, "xml")
29 + # lxml would have stripped this while parsing, but we can add
30 + # it later.
31 + soup.script.string = 'console.log("< < hey > > ");'
32 + encoded = soup.encode()
33 + self.assertTrue(b"&lt; &lt; hey &gt; &gt;" in encoded)
34 +
35 def test_popping_namespaced_tag(self):
36 markup = '<rss xmlns:dc="foo"><dc:creator>b</dc:creator><dc:date>2012-07-02T20:33:42Z</dc:date><dc:rights>c</dc:rights><image>d</image></rss>'
37 soup = self.soup(markup)
38
39 === modified file 'bs4/tests/test_lxml.py'
40 --- bs4/tests/test_lxml.py 2013-05-09 19:36:30 +0000
41 +++ bs4/tests/test_lxml.py 2013-05-20 13:19:16 +0000
42 @@ -10,6 +10,7 @@
43 LXML_VERSION = lxml.etree.LXML_VERSION
44 except ImportError, e:
45 LXML_PRESENT = False
46 + LXML_VERSION = (0,)
47
48 from bs4 import (
49 BeautifulSoup,
50 @@ -47,7 +48,7 @@
51 # test if an old version of lxml is installed.
52
53 @skipIf(
54 - LXML_VERSION < (2,3,5,0),
55 + not LXML_PRESENT or LXML_VERSION < (2,3,5,0),
56 "Skipping doctype test for old version of lxml to avoid segfault.")
57 def test_empty_doctype(self):
58 soup = self.soup("<!DOCTYPE>")
59
60 === modified file 'bs4/tests/test_tree.py'
61 --- bs4/tests/test_tree.py 2013-05-14 12:39:16 +0000
62 +++ bs4/tests/test_tree.py 2013-05-20 13:19:16 +0000
63 @@ -1344,18 +1344,6 @@
64 encoded = BeautifulSoup(doc).encode()
65 self.assertTrue(b"< < hey > >" in encoded)
66
67 - def test_formatter_processes_script_tag_for_xml_documents(self):
68 - doc = """
69 - <script type="text/javascript">
70 - </script>
71 -"""
72 - soup = BeautifulSoup(doc, "xml")
73 - # lxml would have stripped this while parsing, but we can add
74 - # it later.
75 - soup.script.string = 'console.log("< < hey > > ");'
76 - encoded = soup.encode()
77 - self.assertTrue(b"&lt; &lt; hey &gt; &gt;" in encoded)
78 -
79 def test_prettify_leaves_preformatted_text_alone(self):
80 soup = self.soup("<div> foo <pre> \tbar\n \n </pre> baz ")
81 # Everything outside the <pre> tag is reformatted, but everything