Title Ubuntu 9.04: SQLObject gives Python deprecation warnings
Priority bug Status resolved
Superseder Nosy List poeml
Assigned To poeml Keywords Packaging

Created on 2009-10-06.22:00:46 by poeml, last changed by poeml.

msg16 (view) Author: poeml Date: 2009-10-06.22:00:46
When running the "mb" tool on Ubuntu 9.04, the SQLObject Python module spits out a 
deprecation warning each time it is run:

> /usr/lib/python2.6/dist-packages/sqlobject/
> DeprecationWarning: the sets module is deprecated
>   from sets import Set, ImmutableSet

The depracation warning is in the sqlobject module and is issued when Python 2.6 is 
used, which is the default Python on Ubuntu 9.04. We might get rid of it by filing a bug 
for the python-sqlobject package, or by using Python 2.5 instead.
msg23 (view) Author: poeml Date: 2009-10-08.08:07:23
I have fixed this in the following way:

* build the python-mb package for Python 2.4 and 2.5 only, and not for 2.6
* changing the hash-bang line in the mirrorprobe and mirrordoctor script to #!/usr/bin/python2.5


A fixed package should become available in the build system later today at
msg27 (view) Author: poeml Date: 2009-10-08.10:56:23
I'm closing the bug because I believe it's fixed!

The fixed package should automatically pull in the python2.5 package.
msg207 (view) Author: poeml Date: 2010-09-02.21:19:04
Problem: In Ubuntu 10.04, there is no Python 2.5 anymore. Thus, we need to get rid 
of this dependency, or make it work in both cases...
msg208 (view) Author: poeml Date: 2010-09-02.22:18:23
Links to the python-sqlobject packages on different Ubuntu versions.
msg211 (view) Author: poeml Date: 2010-09-02.23:28:23
Unfortunately, the the python-sqlobject package still generates the depracation 
warning on 10.04...
msg221 (view) Author: poeml Date: 2010-09-05.23:59:19
Found a workaround.

The hack in debian/rules which fixed the Python scripts on the 2.5 interpreter version is now applied 
only on Debian/Ubuntu platforms _other_ than Ubuntu 10.04.

The amateurish "line" of code that achieves this is:

        case 10.04 in $(shell cut -d" " -f 2 /etc/issue) ) echo not patching;; *) echo patching Python 
scripts to force Python 2.5 being used; sed -i 's/^#!\/usr\/bin\/python$$/&2.5/' mb/; sed -i 
's/^#!\/usr\/bin\/python$$/&2.5/' mirrorprobe/;; esac

Ugly but works.
I'm closing the issue again.
msg236 (view) Author: poeml Date: 2010-09-08.00:00:29
The workaround^Whack wasn't complete I think. Due to the fact that on older Ubuntu 
versions the Python module was built twice, both for Python 2.5 and 2.6, only the 
last installed script was patched. It is also necessary to patch the script that 
temporarily resides in mb/build/scripts-2.6/ That's done now.
Date User Action Args
2010-09-08 00:00:38poemlsetstatus: chatting -> resolved
2010-09-08 00:00:30poemlsetstatus: resolved -> chatting
messages: + msg236
2010-09-05 23:59:20poemlsetstatus: chatting -> resolved
messages: + msg221
2010-09-02 23:28:23poemlsetmessages: + msg211
2010-09-02 22:18:23poemlsetmessages: + msg208
2010-09-02 21:19:05poemlsetstatus: resolved -> chatting
messages: + msg207
2009-10-08 10:56:23poemlsetstatus: testing -> resolved
messages: + msg27
2009-10-08 08:07:24poemlsetstatus: in-progress -> testing
messages: + msg23
2009-10-08 07:59:53poemlsetstatus: unread -> in-progress
assignedto: poeml
2009-10-06 22:00:46poemlcreate