srilatha44 / threepress

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

Documentation: bookworm is no longer compatible with Python 2.5 #156

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. try to start bookworm with Python 2.5, and DEBUG=True in locals.py

Result: Nice exception pointing at

 .../threepress/bookworm/../bookworm/library/templatetags/bookworm.py in feedbooks

        resp = urllib2.urlopen(settings.FEEDBOOKS_OPDS_FEED, None, 5) ...

Why?

Python 2.5s urllib2.urlopen does not define the timeout parameter ("5").
But README in trunk states that bookworm is still Python 2.5-compatible

Original issue reported on code.google.com by jens.quade on 23 Aug 2009 at 8:45

GoogleCodeExporter commented 9 years ago
Bookworm now relies on the 2.6 zipfile interface (for efficiency), so the README
needs to be updated.

Original comment by abdela...@gmail.com on 24 Aug 2009 at 2:54

GoogleCodeExporter commented 9 years ago
The zipfile change should be backwards-compatible. In Python < 2.6, it will 
read the
whole file into memory; in 2.6 it will stream from disk.

The urlopen issue should be handled by trying the new method and then catching 
the
exception and re-issuing it without a timeout parameter.

Original comment by liza31337@gmail.com on 24 Aug 2009 at 5:22

GoogleCodeExporter commented 9 years ago
I've patched my bookworm instance for python2.5 compatibility
patch attached.

Original comment by jens.quade on 24 Aug 2009 at 11:14

Attachments:

GoogleCodeExporter commented 9 years ago
Looks good, committed to trunk. Thank you!

Original comment by liza31337@gmail.com on 24 Aug 2009 at 11:50