Issue2072

classification
Title: Python feedparser module (version 5.1.3)
Type: behaviour Severity: normal
Components: Library Versions: Jython 2.7
Milestone:
process
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.

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

The error message from the attached sample [rss.py] is as follows:
Traceback (most recent call last):
File "rss.py", line 2, in <module>
  import feedparser
File "C:\jython\2.7b1\Lib\site-packages\feedparser-5.1.3-py2.7.egg\feedparser.py", line 1867, in <module>
  class _BaseHTMLProcessor(sgmllib.SGMLParser):
File "C:\jython\2.7b1\Lib\site-packages\feedparser-5.1.3-py2.7.egg\feedparser.py", 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 test_fp.py
Traceback (most recent call last):
  File "test_fp.py", line 1, in <module>
    import feedparser
  File "/Users/jbaker/jythondev/jython27/dist/Lib/site-packages/feedparser-5.1.3-py2.7.egg/feedparser.py", line 2019, in <module>
    class _BaseHTMLProcessor(sgmllib.SGMLParser):
  File "/Users/jbaker/jythondev/jython27/dist/Lib/site-packages/feedparser-5.1.3-py2.7.egg/feedparser.py", 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 https://github.com/jimbaker/pip) 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: https://hg.python.org/jython/rev/91b39451dc89

$ jython27 rss.py
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? - WLTX.com
3 NYC firefighters die on same day of 9/11-linked cancers - UPI.com
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
History
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