lsb-test-python failed the latest python?

Posted to the lsb-discuss mailing list by: Hao Liu

Hey, guys,
  i'm testing lsb-test-python-3.2.0-1.noarch, there're 3 failures occured:
  • /usr/bin/python 5 FAIL
  • /usr/bin/python 24 FAIL
  • /usr/bin/python 46 FAIL
I looked into the source test_codecs.py:
from test import test_support
import unittest
import codecs
import sys, StringIO, _testcapi
 ...
 ...
it tries to import _testcapi module, but I can't find the module on my testing machine. I tried to find tt module with 'find . -name "_testcapi.so"' in the / directory, but I found tt the module was located in:
./media/_/opt/lsb/appbat/lib/python2.4/lib-dynload/_testcapi.so
./opt/lsb/appbat/lib/python2.4/lib-dynload/_testcapi.so
while I'm using is python-2.5.1.

Additional info:
#uname -a
Linux dhcp-65-86.nay.redhat.com 2.6.25-14.fc9.i686 #1 SMP Thu May 1 06:28:41 EDT 2008 i686 athlon i386 GNU/Linux
#rpm -q python
python-2.5.1-30.fc10.i386

All the best,
Hao Liu
lsb-test-python failed the latest python? - Submitted by Stew Benedict on Wed, 08/27/2008 - 12:00.

On Wed, 27 Aug 2008, Hao Liu wrote:

> Hey, guys,
> i'm testing lsb-test-python-3.2.0-1.noarch, there're 3 failures occured:
>
> * /usr/bin/python 5 FAIL
> * /usr/bin/python 24 FAIL
> * /usr/bin/python 46 FAIL
>
> I looked into the source test_codecs.py:
> from test import test_support
>
> import unittest
> import codecs
> import sys, StringIO, _testcapi
> ...
> ...
>
> it tries to import _testcapi module, but I can't find the module on my
> testing machine. I tried to find tt module with 'find . -name
> "_testcapi.so"' in the / directory, but I found tt the module was
> located in:
>
> ./media/_/opt/lsb/appbat/lib/python2.4/lib-dynload/_testcapi.so
> ./opt/lsb/appbat/lib/python2.4/lib-dynload/_testcapi.so
>

Hmm,

On another distribution with 2.5.1, I do see the module:

/usr/lib/python2.5/lib-dynload/_testcapi.so
[stew@norris ~]$ rpm -qf /usr/lib/python2.5/lib-dynload/_testcapi.so
python-2.5.1-5mdv2008.0

I'll have to do some research on whats going on, whether the python folks
dropped this or what.

--
Stew Benedict
The Linux Foundation

lsb-test-python failed the latest python? - Submitted by LSB List on Thu, 08/28/2008 - 03:00.

Posted to the lsb-discuss mailing list by: Hao Liu


Stew Benedict wrote:
> On Wed, 27 Aug 2008, Hao Liu wrote:
>
>
>> Hey, guys,
>> i'm testing lsb-test-python-3.2.0-1.noarch, there're 3 failures occured:
>>
>> * /usr/bin/python 5 FAIL
>> * /usr/bin/python 24 FAIL
>> * /usr/bin/python 46 FAIL
>>
>> I looked into the source test_codecs.py:
>> from test import test_support
>>
>> import unittest
>> import codecs
>> import sys, StringIO, _testcapi
>> ...
>> ...
>>
>> it tries to import _testcapi module, but I can't find the module on my
>> testing machine. I tried to find tt module with 'find . -name
>> "_testcapi.so"' in the / directory, but I found tt the module was
>> located in:
>>
>> ./media/_/opt/lsb/appbat/lib/python2.4/lib-dynload/_testcapi.so
>> ./opt/lsb/appbat/lib/python2.4/lib-dynload/_testcapi.so
>>
>>
>
> Hmm,
>
> On another distribution with 2.5.1, I do see the module:
>
> /usr/lib/python2.5/lib-dynload/_testcapi.so
> [stew@norris ~]$ rpm -qf /usr/lib/python2.5/lib-dynload/_testcapi.so
> python-2.5.1-5mdv2008.0
>
> I'll have to do some research on whats going on, whether the python folks
> dropped this or what.
>
>
Thank you, Stew.

All the best,
Hao Liu

lsb-test-python failed the latest python? - Submitted by Stew Benedict on Tue, 09/02/2008 - 13:00.

On Thu, 28 Aug 2008, Hao Liu wrote:

> Stew Benedict wrote:
> > On Wed, 27 Aug 2008, Hao Liu wrote:
> >
> >
> >> Hey, guys,
> >> i'm testing lsb-test-python-3.2.0-1.noarch, there're 3 failures occured:
> >>
> >> * /usr/bin/python 5 FAIL
> >> * /usr/bin/python 24 FAIL
> >> * /usr/bin/python 46 FAIL
> >>
> >> I looked into the source test_codecs.py:
> >> from test import test_support
> >>
> >> import unittest
> >> import codecs
> >> import sys, StringIO, _testcapi
> >> ...
> >> ...
> >>
> >> it tries to import _testcapi module, but I can't find the module on my
> >> testing machine. I tried to find tt module with 'find . -name
> >> "_testcapi.so"' in the / directory, but I found tt the module was
> >> located in:
> >>
> >> ./media/_/opt/lsb/appbat/lib/python2.4/lib-dynload/_testcapi.so
> >> ./opt/lsb/appbat/lib/python2.4/lib-dynload/_testcapi.so
> >>
> >>
> >
> > Hmm,
> >
> > On another distribution with 2.5.1, I do see the module:
> >
> > /usr/lib/python2.5/lib-dynload/_testcapi.so
> > [stew@norris ~]$ rpm -qf /usr/lib/python2.5/lib-dynload/_testcapi.so
> > python-2.5.1-5mdv2008.0
> >
> > I'll have to do some research on whats going on, whether the python folks
> > dropped this or what.
> >

Looks like Fedora has split this off into python-test? But the module is
now named _testcapimodule.so?

ref:
http://rpmfind.net/linux/RPM/fedora/9/ppc/python-test-2.5.1-25.fc9.ppc.h...

--
Stew Benedict
The Linux Foundation

lsb-test-python failed the latest python? - Submitted by LSB List on Wed, 09/03/2008 - 01:45.

Posted to the lsb-discuss mailing list by: Hao Liu


Stew Benedict wrote:
> On Thu, 28 Aug 2008, Hao Liu wrote:
>
>
>> Stew Benedict wrote:
>>
>>> On Wed, 27 Aug 2008, Hao Liu wrote:
>>>
>>>
>>>
>>>> Hey, guys,
>>>> i'm testing lsb-test-python-3.2.0-1.noarch, there're 3 failures occured:
>>>>
>>>> * /usr/bin/python 5 FAIL
>>>> * /usr/bin/python 24 FAIL
>>>> * /usr/bin/python 46 FAIL
>>>>
>>>> I looked into the source test_codecs.py:
>>>> from test import test_support
>>>>
>>>> import unittest
>>>> import codecs
>>>> import sys, StringIO, _testcapi
>>>> ...
>>>> ...
>>>>
>>>> it tries to import _testcapi module, but I can't find the module on my
>>>> testing machine. I tried to find tt module with 'find . -name
>>>> "_testcapi.so"' in the / directory, but I found tt the module was
>>>> located in:
>>>>
>>>> ./media/_/opt/lsb/appbat/lib/python2.4/lib-dynload/_testcapi.so
>>>> ./opt/lsb/appbat/lib/python2.4/lib-dynload/_testcapi.so
>>>>
>>>>
>>>>
>>> Hmm,
>>>
>>> On another distribution with 2.5.1, I do see the module:
>>>
>>> /usr/lib/python2.5/lib-dynload/_testcapi.so
>>> [stew@norris ~]$ rpm -qf /usr/lib/python2.5/lib-dynload/_testcapi.so
>>> python-2.5.1-5mdv2008.0
>>>
>>> I'll have to do some research on whats going on, whether the python folks
>>> dropped this or what.
>>>
>>>
>
> Looks like Fedora has split this off into python-test? But the module is
> now named _testcapimodule.so?
>
> ref:
> http://rpmfind.net/linux/RPM/fedora/9/ppc/python-test-2.5.1-25.fc9.ppc.h...
>
>
Should i file a bug against this problem and create a PR?

All the best,
Hao Liu

lsb-test-python failed the latest python? - Submitted by Wichmann Mats D on Wed, 09/03/2008 - 04:30.

Hao Liu wrote:

>> Looks like Fedora has split this off into python-test? But the
>> module is now named _testcapimodule.so?
>>
>> ref:
>> http://rpmfind.net/linux/RPM/fedora/9/ppc/python-test-2.5.1-25.fc9.ppc.h...
>>
>>
> Should i file a bug against this problem and create a PR?

It's worth a bugzilla entry but we'll need to figure out who
was responsible for the change noted.

lsb-test-python failed the latest python? - Submitted by Stew Benedict on Thu, 09/11/2008 - 20:30.

On Tue, 2 Sep 2008, Wichmann, Mats D wrote:

> Hao Liu wrote:
>
> >> Looks like Fedora has split this off into python-test? But the
> >> module is now named _testcapimodule.so?
> >>
> >> ref:
> >> http://rpmfind.net/linux/RPM/fedora/9/ppc/python-test-2.5.1-25.fc9.ppc.h...
> >>
> >>
> > Should i file a bug against this problem and create a PR?
>
> It's worth a bugzilla entry but we'll need to figure out who
> was responsible for the change noted.
>
>

Bugzilla:

http://bugs.linuxbase.org/show_bug.cgi?id=2282

(think Hao Liu opened another about the same time and we marked it a
dupe).

Building a plain tarball build of 2.5 or 2.5.1 with no special configure
options yields _testcapi.so, not _testcapimodule.so, so this seems
distribution specific.

As suggested in the conference call a couple of weeks ago, I'm trying to
bundle our own _testcapi.so (2.4 and 2.5 version) in the test suite and
have patched the 3 tests in question to look under
/opt/lsb/test/python/lib{24,25} to find the module. this seems to work on
a couple of distributions, but when I go to FC9, I get:

ImportError: /opt/lsb/test/python/lib25/_testcapi.so: undefined symbol:
PyUnicodeUCS2_Decode

Tried building with --disable-unicode, which then fails for the 2.5
build.

Looking at the specfile from the fedora build listed above, I see they
build with --enable-unicode=ucs. Did a build this way, and it *seems* to
solve the undefined symbol issue on FC9 and still works on another distro,
but it makes me wonder how sensitive this is all going to be to Python
build variations between distributions. I suppose we won't be any worse
off, as it still only impacts 3 tests.

I'm by no means a Python expert. Any comments from the group?

Thanks,
--
Stew Benedict
The Linux Foundation

Copyright © 2008 Linux Foundation. All rights reserved.
LSB is a trademark of the Linux Foundation. Linux is a registered trademark of Linus Torvalds