jsumners / feedparser

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

Syntax error when importing in Python 3.3 #387

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Try to import feedparser in Python 3.3.

What is the expected output? What do you see instead?
Python version: 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.1600 
32 bit (Intel)]
Traceback (most recent call last):
  File "test.py", line 7, in <module>
    import feedparser
  File "c:\temp\feedparser.py", line 335
    raise KeyError, "object doesn't have key 'category'"
                  ^
SyntaxError: invalid syntax

What version of the product are you using? On what operating system?
Version 5.1.3 (rev r20a32910f4a5). Python 3.3.0 on Windows XP.

Please provide any additional information below.
No problems with Python 2.7.2 on same computer.

Original issue reported on code.google.com by fbe...@gmail.com on 10 Jan 2013 at 11:38

Attachments:

GoogleCodeExporter commented 9 years ago
I have confidence that this is because you haven't run feedparser.py through 
the 2to3 conversion program. feedparser isn't yet compatible with Python 2 and 
Python 3 without conversion. I hope that that will be possible some day, but it 
isn't yet.

If this turns out to not be the case please leave another comment with more 
information. However, I test feedparser on Python 3.3 so I expect that the 
problem is just that it needs to be run through the 2to3 tool.

Original comment by kurtmckee on 12 Jan 2013 at 4:09