feedparser ftbfs in quantal, test suite failures

Bug #1056820 reported by Matthias Klose
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
feedparser (Ubuntu)
Fix Released
High
Barry Warsaw
Quantal
Fix Released
High
Barry Warsaw
libxml2 (Ubuntu)
Quantal
Won't Fix
Undecided
Unassigned

Bug Description

see
http://people.ubuntuwire.org/~wgrant/rebuild-ftbfs-test/test-rebuild-20120922-quantal.html

======================================================================
ERROR: test_002205 (__main__.TestEncodings)
./tests/encoding/bozo_double-encoded-html.xml: utf-8 interpreted as iso-8859-1 and re-encoded as utf-8
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./feedparsertest.py", line 587, in <lambda>
    self.failUnlessEval(xmlfile, evalString)
  File "./feedparsertest.py", line 148, in failUnlessEval
    env = feedparser.parse(xmlfile)
  File "/build/buildd/feedparser-5.1/feedparser/feedparser.py", line 3895, in parse
    saxparser.parse(source)
  File "/usr/lib/python2.7/dist-packages/drv_libxml2.py", line 176, in parse
    SAXException("Read failed (no details available)"))
  File "/build/buildd/feedparser-5.1/feedparser/feedparser.py", line 1836, in fatalError
    raise exc
SAXException: Read failed (no details available)

Tags: ftbfs

Related branches

CVE References

Matthias Klose (doko)
Changed in feedparser (Ubuntu):
importance: Undecided → High
milestone: none → ubuntu-12.10-beta-2
status: New → Confirmed
Revision history for this message
Matthias Klose (doko) wrote :

tests pass with libxml2 2.9 from experimental

Barry Warsaw (barry)
Changed in feedparser (Ubuntu Quantal):
assignee: nobody → Barry Warsaw (barry)
Revision history for this message
Barry Warsaw (barry) wrote :

Unfortunately, libxml2-2.9.0+dfsg1-2 from experimental does not build on Quantal (see attached log). Also, libxml2 has a lot of reverse-depends so the new version of that will need an FFe and I'd feel more confident if we did a test rebuild of its rdeps to make sure the new version doesn't break anything.

Alternatively (and I will explore this next), since the 2.8.0 ftbfs is due to a test failure, perhaps we can fix, workaround, or ignore that test for Quantal.

Revision history for this message
Barry Warsaw (barry) wrote :
Revision history for this message
Barry Warsaw (barry) wrote :

Running the feedparser test suite seems like an all-around losing proposition. Even upstream git head doesn't complete its testsuite successfully for me on Python 2.7. :( Even upgrading to sid's 5.1.2 package produces tons of mysterious failures. We've been here before with this package too. I think there's a good reason why the Debian package doesn't run the test suite during the build.

As much as I hate to say it, we may have to do the same. :(

Revision history for this message
Barry Warsaw (barry) wrote :

These test failures seem to be caused by chardet... again. If you install 5.1.2 into a (Python 2) virtualenv without chardet, all but one of the tests passes. Run in an environment with python-chardet and the test suite gets tons of failures. We hit similar problems with Python 3 and removed python3-chardet from the deps. We should revert the earlier Ubuntu delta that added python-chardet as a build-dep. I'll try that and see if the remaining failure can be worked around or disabled.

Revision history for this message
Barry Warsaw (barry) wrote :

Hahahahahahah. This traceback, while annoying does not cause the test suite to fail. So removing python-chardet, python-libxml2, and python-utidylib fixes the FTBFS with 5.1.2.

Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 295, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 321, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.7/SocketServer.py", line 651, in __init__
    self.finish()
  File "/usr/lib/python2.7/SocketServer.py", line 704, in finish
    self.wfile.flush()
  File "/usr/lib/python2.7/socket.py", line 303, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe

Revision history for this message
Barry Warsaw (barry) wrote :

From the NEWS file, differences since 5.1:

5.1.2 - May 3, 2012
    * Minor changes to the documentation
    * Strip potentially dangerous ENTITY declarations in encoded feeds
    * feedparser will now try to continue parsing despite compression errors
    * Fix issue 321 a little more (the initial fix missed a code path)
    * Issue 337 (`_parse_date_rfc822()` returns None on single-digit days)
    * Issue 343 (add magnet links to the ACCEPTABLE_URI_SCHEMES)
    * Issue 344 (handle deflated data with no headers nor checksums)
    * Issue 347 (support `itunes:image` elements with a `url` attribute)

5.1.1 - March 20, 2011
    * Fix mistakes, typos, and bugs in the unit test code
    * Fix crash in Python 2.4 and 2.5 if the feed has a UTF_32 byte order mark
    * Replace the RFC822 date parser for more extensibility
    * Issue 304 (handle RFC822 dates with timezones like GMT+00:00)
    * Issue 309 (itunes:keywords should be split by commas, not whitespace)
    * Issue 310 (pubDate should map to `published`, not `updated`)
    * Issue 313 (include the compression test files in MANIFEST.in)
    * Issue 314 (far-flung RFC822 dates don't throw OverflowError on x64)
    * Issue 315 (HTTP server for unit tests runs on 0.0.0.0)
    * Issue 321 (malformed URIs can cause ValueError to be thrown)
    * Issue 322 (HTTP redirect to HTTP 304 causes SAXParseException)
    * Issue 323 (installing chardet causes 11 unit test failures)
    * Issue 325 (map `description_detail` to `summary_detail`)
    * Issue 326 (Unicode filename causes UnicodeEncodeError if locale is ASCII)
    * Issue 327 (handle RFC822 dates with extraneous commas)
    * Issue 328 (temporarily map `updated` to `published` due to issue 310)
    * Issue 329 (escape backslashes in Windows path in docs/introduction.rst)
    * Issue 331 (don't escape backslashes that are in raw strings in the docs)

Revision history for this message
Barry Warsaw (barry) wrote :

Note that this means we can drop two of our patches, specifically broken-tests.patch and CVE-2012-2921.patch, both of which have been applied upstream by 5.1.2.

http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-2921

Barry Warsaw (barry)
no longer affects: libxml2 (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package feedparser - 5.1.2-1ubuntu1

---------------
feedparser (5.1.2-1ubuntu1) quantal; urgency=low

  * Merge with Debian. Remaining Ubuntu changes:
    + Build for Python 3.
    + debian/rules:
      - Run the test suite during build
    + Convert to dh_python2.
  * Drop debian/patches/broken-tests.patch and d/p/CVE-2012-2921.patch
    since both have been applied upstream by 5.1.2
  * Drop Build-Depends on python-chardet, python-libxml2, and
    python-utidylib as these cause test suite failures. Now the Python 2
    build dependencies match the Python 3 build dependencies. (LP: #1056820)
 -- Barry Warsaw <email address hidden> Thu, 27 Sep 2012 13:59:14 -0400

Changed in feedparser (Ubuntu Quantal):
status: Confirmed → Fix Released
Revision history for this message
Rolf Leggewie (r0lf) wrote :

quantal has seen the end of its life and is no longer receiving any updates. Marking the quantal task for this ticket as "Won't Fix".

Changed in libxml2 (Ubuntu Quantal):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.