Title: Python feedparser module (version 5.1.3)
Type: behaviour Severity: normal
Components: Library Versions: Jython 2.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: samkramer, zyasoft
Priority: Keywords:

Created on 2013-07-26.14:53:54 by samkramer, last changed 2014-10-05.16:34:06 by zyasoft.

File name Uploaded Description Edit Remove samkramer, 2013-07-26.14:53:53 Sample script that parses RSS feed from Google News
msg8076 (view) Author: Sam Kramer (samkramer) Date: 2013-07-26.14:53:53
This is a regression error of the Python feedparser library []. The same version of feedparser (5.1.3) works correctly in Jython 2.5.3.

The error message from the attached sample [] is as follows:
Traceback (most recent call last):
File "", line 2, in <module>
  import feedparser
File "C:\jython\2.7b1\Lib\site-packages\feedparser-5.1.3-py2.7.egg\", line 1867, in <module>
  class _BaseHTMLProcessor(sgmllib.SGMLParser):
File "C:\jython\2.7b1\Lib\site-packages\feedparser-5.1.3-py2.7.egg\", line 1899, in _BaseHTMLProcessor
  goahead.func_code = sgmllib.SGMLParser.goahead.func_code
RuntimeError: maximum recursion depth exceeded
msg8492 (view) Author: Jim Baker (zyasoft) Date: 2014-05-21.22:58:00
So I installed feedparser by cloning the repo, then running Sam's code:

$ jython27
Traceback (most recent call last):
  File "", line 1, in <module>
    import feedparser
  File "/Users/jbaker/jythondev/jython27/dist/Lib/site-packages/feedparser-5.1.3-py2.7.egg/", line 2019, in <module>
    class _BaseHTMLProcessor(sgmllib.SGMLParser):
  File "/Users/jbaker/jythondev/jython27/dist/Lib/site-packages/feedparser-5.1.3-py2.7.egg/", line 2051, in _BaseHTMLProcessor
    goahead.func_code = sgmllib.SGMLParser.goahead.func_code
RuntimeError: maximum recursion depth exceeded

Interestingly, when I install it via pip (using it builds extremely strangely with indentation errors. Not certain what's going on here.
msg9032 (view) Author: Jim Baker (zyasoft) Date: 2014-09-26.04:47:28
Now works fine on trunk, using pip to install feedparser. I believe the indentation problem might be because of this fixed issue, where we were seeing corrupted reads for bz2 compressed tarfiles:

$ jython27
Eric H. Holder Jr., US attorney general, is stepping down - Los Angeles Times
FBI knows the identity of ISIS 'Jihadi John' executioner who beheaded James ... - New York Daily News
Derek Jeter's unbelievable closing act at Yankee Stadium - USA TODAY
Ray Rice video was sent to NFL security chief, sources say - Fox News
Iraqi PM says Islamic State plans subway attacks in US and Paris - Reuters
Why Was the Trooper Charged with Assault and Battery? -
3 NYC firefighters die on same day of 9/11-linked cancers -
Apple responds to claims of bending iPhones, calling cases 'rare' - Los Angeles Times
UAE's first female fighter pilot led airstrike against ISIS - CNN International
Kirk Cousins has five turnovers, Eli Manning has five TDs, and Giants top ... - Washington Post
Date User Action Args
2014-10-05 16:34:06zyasoftsetstatus: pending -> closed
2014-09-26 04:47:28zyasoftsetstatus: open -> pending
resolution: accepted -> fixed
messages: + msg9032
2014-05-21 22:58:01zyasoftsetresolution: accepted
messages: + msg8492
nosy: + zyasoft
2013-07-26 14:53:54samkramercreate