Page 1 of 1

[0.7.0b2] incompatible with python 2.5?

Posted: April 10th, 2012, 3:44 am
by jcfp
Trying beta 2 on ubuntu ancient hardy/8.04 results in a traceback on startup:
ubuntu@ubuntu-desktop:/tmp/t/SABnzbd-0.7.0Beta2$ python -V
Python 2.5.2

ubuntu@ubuntu-desktop:/tmp/t/SABnzbd-0.7.0Beta2$ python SABnzbd.py
Traceback (most recent call last):
File "SABnzbd.py", line 65, in <module>
import sabnzbd
File "/tmp/t/SABnzbd-0.7.0Beta2/sabnzbd/__init__.py", line 65, in <module>
from sabnzbd.nzbqueue import NzbQueue
File "/tmp/t/SABnzbd-0.7.0Beta2/sabnzbd/nzbqueue.py", line 29, in <module>
from sabnzbd.nzbstuff import NzbObject
File "/tmp/t/SABnzbd-0.7.0Beta2/sabnzbd/nzbstuff.py", line 41, in <module>
from sabnzbd.misc import to_units, cat_to_opts, cat_convert, sanitize_foldername, \
File "/tmp/t/SABnzbd-0.7.0Beta2/sabnzbd/misc.py", line 46, in <module>
import sabnzbd.growler as growler
File "/tmp/t/SABnzbd-0.7.0Beta2/sabnzbd/growler.py", line 42, in <module>
with warnings.catch_warnings():
AttributeError: 'module' object has no attribute 'catch_warnings'

ubuntu@ubuntu-desktop:/tmp/t/SABnzbd-0.7.0Beta2$ uname -a
Linux ubuntu-desktop 2.6.24-31-generic #1 SMP Wed Mar 7 00:16:24 UTC 2012 i686 GNU/Linux

ubuntu@ubuntu-desktop:/tmp/t/SABnzbd-0.7.0Beta2$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 8.04.4 LTS
Release: 8.04
Codename: hardy
ubuntu@ubuntu-desktop:/tmp/t/SABnzbd-0.7.0Beta2$

Re: [0.7.0b2] incompatible with python 2.5?

Posted: April 10th, 2012, 4:43 am
by shypike
I'm not even sure what this piece of code is needed for, since I got it from an usage example.
I'll see if there's a work-around, assuming that pynotify itself supports Python 2.5.

Python 2.5 support is becoming a burden and I expect that we need to drop it soon.
Especially as I'm now working on making SABnzbd a full Unicode-compliant app
and I've seen in the past that the OS support functions in 2.5 have inconsistent Unicode behavior.

Re: [0.7.0b2] incompatible with python 2.5?

Posted: April 10th, 2012, 4:58 am
by sander
Ah, finally a good formal reason to drop Python 2.5 support for (newer versions of) SABnzbd! Great! ;-)

If there is moment to drop python 2.5, I would say it's now with the introduction of 0.7.x. It will make the requirements overview quite simple:

SAB up to 0.6.x: Python 2.5 - 2.7
SAB 0.7.x: Python 2.6 - 2.7


Here's Python's version history:

Python 2.5 - September 19, 2006
Python 2.6 - October 1, 2008
Python 2.7 - July 3, 2010

So Python 2.6 has been there since 2008 ... which is almost 6 years ago.

Re: [0.7.0b2] incompatible with python 2.5?

Posted: April 10th, 2012, 5:00 am
by shypike
sander wrote: So Python 2.6 has been there since 2008 ... which is almost 6 years ago.
6 years? ;)

Re: [0.7.0b2] incompatible with python 2.5?

Posted: April 10th, 2012, 5:18 am
by jcfp
shypike wrote:I'll see if there's a work-around, assuming that pynotify itself supports Python 2.5.
Python-notify is available and I think even installed by default on the old ubuntu desktop release I used for testing, so that should work with 2.5. No new version of notify has been released since.

Obviously support for 2.5 will have to go at some point or another though, if only for useful improvements like the one you mentioned.

Re: [0.7.0b2] incompatible with python 2.5?

Posted: April 10th, 2012, 5:40 am
by sander
shypike wrote:
sander wrote: So Python 2.6 has been there since 2008 ... which is almost 6 years ago.
6 years? ;)
Ouch. :o

Re: [0.7.0b2] incompatible with python 2.5?

Posted: April 10th, 2012, 9:42 am
by shypike
jcfp wrote: Python-notify is available and I think even installed by default on the old ubuntu desktop release I used for testing, so that should work with 2.5. No new version of notify has been released since.

Obviously support for 2.5 will have to go at some point or another though, if only for useful improvements like the one you mentioned.
I'll patch up the code for 0.7.0.
But 0.7.x will be the last line supporting Python 2.5