[CentOS] Python/sqlite date time problems.

Tue Oct 10 16:12:23 UTC 2006
Will McDonald <wmcdonald at gmail.com>

On 10/10/06, Bryan Cardillo <dillo at pcbi.upenn.edu> wrote:
> On Tue, Oct 10, 2006 at 03:59:42PM +0100, Will McDonald wrote:
> > Bear with me, this is CentOS related. :)
>
>        [...]
>
> > As far as I can tell, python, sqlite and python-sqlite are all identical.
> >
> > Obviously there some date/time issues but I can't pinpoint exactly
> > what. Can anyone shed any light or prod me in the right direction? The
> > Whitebox systems *do* still have a smattering of Whitebox related
> > RPMs...
>
>        what about mx?  this rpm provides python modules which do
>        date/time type conversion (and more), yet you haven't listed
>        it above.  perhaps its installed on one machine, but not the
>        other?
>
>        on my centos 4 machine:
>        $ rpm -q mx
>        mx-2.0.5-3

Bingo! Cheers dude.

I was just trawling through strace output. On the functioning machine
(or at least, the one on which the code behaves as I expected) mx
isn't installed, on the others it is.

"Working" system:

[root at willspc python]# strace ./testcase.py 2>&1 | wc -l
1033
[root at willspc python]# rpm -q mx
package mx is not installed

"Broken" system:

[root at devmon1 python]# strace ./testcase.py 2>&1 | wc -l
1475
[root at devmon1 python]# rpm -q mx
mx-2.0.5-3
[root at devmon1 python]#

And a lot of those divergences appeared to be mx related though I
hadn't put 2 & 2 together until now.

On another previously "broken" system, after the removal of mx and python-MySQL

[root at stella python]# rpm -e mx MySQL-python
[root at stella python]# ./testcase.py
[('2006-10-10',), ('2006-10-11',)]

I guess it's upstream but it might be useful if that package was named
python-mx, though it could equally be argued that I should've just
done

$ rpm -q --whatrequires python

Anyway, that lets me know what the differences are, and I can either
code to take it into account, or just require/remove mx as necessary.
Thanks Bryan.

Will.