libo26 / feedparser

Automatically exported from code.google.com/p/feedparser
Other
0 stars 0 forks source link

non-terminating while loop in date parser #246

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. feedparser._parse_date("1941504")
2.
3.

What is the expected output? What do you see instead?

I'm not sure what the output should be, but none is returned; it hangs in the 
"while jday != julian" loop.

What version of the product are you using? On what operating system?

Python 2.6.6 on Ubuntu 10.10

Please provide any additional information below.

I observed that the while loop terminates only for 1941* values <= 1941362.  
But that number seems arbitrary enough as a julian day to suggest that a patch 
is to change "if julian" to "if julian and julian <= 362".

Original issue reported on code.google.com by mark%coa...@gtempaccount.com on 3 Jan 2011 at 8:14

GoogleCodeExporter commented 9 years ago
@Ade: Please close this bug report as invalid.

Tested using svn trunk (r354) and the sample date given by reporter. Output is:
    >>> feedparser._parse_date("1941504")
    (1941, 1, 1, 0, 0, 0, 2, 1, 0)

@distobj: Please try downloading the latest code available in subversion and 
see if that resolves the issue for you:
    https://feedparser.googlecode.com/svn/trunk/feedparser/feedparser.py

It may be that you're using feedparser 4.1, which is very old. Ade is going to 
be packaging a new release in the next week or two to push many, many bug fixes 
that have accumulated from the past three and a half years. You can track the 
status of the new release by starring issue 233.

If you're still seeing the issue after downloading the latest available code 
linked above, I'll work with you to figure out why you're seeing this issue and 
I'm not. :)

Original comment by kurtmckee on 3 Jan 2011 at 8:43

GoogleCodeExporter commented 9 years ago
Thanks all. Yes, I was using v4.1, and the problem does not exist with trunk.

Original comment by mark%coa...@gtempaccount.com on 4 Jan 2011 at 1:29

GoogleCodeExporter commented 9 years ago

Original comment by adewale on 4 Jan 2011 at 2:46