[SRU, 9.10] libboost-python1.38 issues with __doc__ property in Python >= 2.6.3

Reported by Guy K. Kloss on 2009-10-21
154
This bug affects 27 people
Affects Status Importance Assigned to Milestone
Python
Invalid
Unknown
boost1.38 (Ubuntu)
High
Unassigned
Karmic
High
Unassigned
python-visual (Ubuntu)
Undecided
Unassigned
Karmic
Undecided
Unassigned

Bug Description

Python >= 2.6.3 has changed the way the __doc__ property is implemented. Boost.Python 1.38 does not account for this, yet, leading to many errors executing Python code using the Boost implemented bindings.

An example trying to use a sample from python-visual:

guy@mountpaku:/usr/share/doc/python-visual/examples$ python orbit.py
Traceback (most recent call last):
  File "orbit.py", line 1, in <module>
    from visual import *
  File "/usr/lib/python2.6/dist-packages/visual/__init__.py", line 59, in <module>
    import cvisual
AttributeError: 'Boost.Python.StaticProperty' object attribute '__doc__' is read-only

The current SVN version of Boost seems to have resolved that issue already. But the version of Boost in "universe" (1.40) still does not seem compatible with this, as python-visual does not compile with that one. I do not know whether the issue with __doc__ itself has already been resolved in 1.40.

Tests have been undertaken to compile python-visual 5.11 from Karmic with Boost 1.38 as well as 1.40, as well as python-visual 5.12 (from Debian Sid) with Boost 1.38. No attempt has been made, yet, to try this with the current stable release 5.13, which has not been "debianified" as of now.

Many packages rely on a working libboost-python. Especially python-visual as contained in "main" of Karmic is completely unusable this way. Other projects, like Python Ogre, also do not work with the present version of Boost.

Anyway, some/many/most/all Python packages relying on libboost-python will definitely be *broken* in the upcoming Karmic if this bug is not resolved in some way.

See also here:

 * python-visual bug with quite some info in the last comments:
   https://bugs.launchpad.net/ubuntu/+source/python-visual/+bug/408663

 * Post on Python Ogre and the __doc__ property issue:
   http://groups.google.com/group/python-ogre-developers/browse_thread/thread/130617f8c69f1bcb

 * Discussion of a similar issue from PySide:
   http://ur1.ca/du0m

ProblemType: Bug
Architecture: i386
Date: Thu Oct 22 10:59:00 2009
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: nvidia
Package: libboost-python1.38.0 1.38.0-6ubuntu6
ProcEnviron:
 PATH=(custom, user)
 LANG=en_NZ.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: boost1.38
Uname: Linux 2.6.31-14-generic i686
XsessionErrors: (polkit-gnome-authentication-agent-1:7182): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed

Guy K. Kloss (guy.kloss) wrote :
gs (gs-orst) on 2009-10-21
Changed in boost1.38 (Ubuntu):
status: New → Confirmed
Changed in python:
status: Unknown → New
Guy K. Kloss (guy.kloss) on 2009-10-22
Changed in python-visual (Ubuntu):
status: New → Confirmed
C Anthony Risinger (extofme) wrote :

i can confirm that building the trunk boost libraries solves this issue.

boost 1.40.0rc1 was not sufficient

C Anthony Risinger (extofme) wrote :

additionally, all demos in python-visual 5.11 and 5.13 work fine with boost svn, so this is most definately not a vpython issue.

Scott Howard (showard314) wrote :

This bug is in Karmic release. If we could find the exact commit that fixes this bug, we could get it easily into Karmic. The other option is to see how big the diff is in the lib/python/src section of the code, and see if the svn version fixes it.

@sweetsinse, could you try compiling boost with the Karmic version of the source BUT replace the libs/python directory with the version in the svn trunk? ( $ sudo apt-get source libboost1.38 )

If that works, we could get a small patch that makes boost usable in karmic.

Changed in boost1.38 (Ubuntu):
importance: Undecided → High
Andrew Mitchell (ajmitch) wrote :

https://svn.boost.org/trac/boost/changeset/53731/sandbox-branches/bhy/py3k looks to have a relevant fix which I'll build & test.

Changed in boost1.38 (Ubuntu):
assignee: nobody → Andrew Mitchell (ajmitch)
Andrew Mitchell (ajmitch) wrote :

Packages have been built for testing in my PPA at https://launchpad.net/~ajmitch/+archive/ppa - python-visual examples all Work For Me

moriyoshi (moriyoshi) wrote :

As far as I've been digging into this, I think this is a Python's bug. See Issue #5890 on which I just commented: http://bugs.python.org/issue5890#msg95142

Andrew Mitchell (ajmitch) wrote :

It was caused by a change in python to fix issue 5890, as referenced in http://bugs.python.org/issue7183 linked above. It was decided there that it wasn't really a python regression but a change that had been worked around in Boost. We probably need to clarify with the python developers whether the fix for #5890 should be changed in 2.6.5.

Guy K. Kloss (guy.kloss) wrote :

I have just given the proposed bug fix a spin by using the packages from ppa:ajmitch. At least all the samples from python-visual that I've tried did work properly, now. Well done! I think we've got a go here!

teonghan (teonghan) wrote :

Hi all,

I tried update the boost packages after I install VPython from Ubuntu repository but I still can't get my VPython script working. Do I need to compile the source to get it working?

Dear Scott,

I tried that but still it did not work. Here is the output from the terminal when I run my VPython script:

teonghan@asspire:~/Documents/2009/thesis/code_thesis/vpython$ python y-golay.py

(<unknown>:3073): GdkGLExt-WARNING **: Cannot open \xe8\u0002\xc7\u0008L.so

(<unknown>:3073): GdkGLExt-WARNING **: Cannot open \xe8\u0002\xc7\u0008L.so

glibmm-ERROR **:
unhandled exception (type std::exception) in signal handler:
what: Unable to get extension function: glCreateProgramObjectARB even though the extension is advertised.

aborting...
Aborted

Anyway, I manage to try boost packages from Andrew's PPA in a fresh Karmic installation using VirtualBox and it works. Maybe I messed up with the libraries installations. Still hope I won't need to do fresh installation though.

Philip Sterne (sterne-gmail) wrote :

I have installed the ppa's from Andrew Mitchell and can confirm that it fixes the the issue.

teonghan (teonghan) wrote :

Hi all,

I reformat my HD and do fresh installation of Karmic on it. The first thing I did after I log in for the first time, I straight away install python-visual from the repo which pull all the dependencies, including those boost packages from Andrew's PPA. I restart my comp and still I can't use VPython, got the same problem like my previous post here. This morning, I looked into the VPython source/INSTALL and I just simply install "libgtkglextmm-x11-1.2-dev" which pull in a lot of other libraries using Synaptic. I ran my VPython script and now it is working. Is it happening only to me? Or is it python-visual problem?

Guy K. Kloss (guy.kloss) wrote :

@teonghan: Two things on that:

 * This should be a problem of the python-visual package, rather than the boost packages.
 * python-visual should then probably also depend on libgtkglextmm-x11-1.2-0, it should (AFAIK)
   *never* depend on a "*-dev" package, which should just contain headers for compilation/building,
   which you're not doing.

You should file a new bug for python-visual on this issue.

Seegorkesolot (das-gummiboot) wrote :

Got the bug too, but it was fixed by the updated libboost packages from the mentioned ppa. Thanks!

Ulrich von Zadow (uzadow) wrote :

I can confirm that the ppa fixes the bug for libavg.

Thanks for the PPA, it fixed this issue for me on Ubuntu 9.04.
I think for now, it should be in the standart repository asap!

Václav Šmilauer (eudoxos) wrote :

I don't have this issue any longer even with packaged karmic version of both boost+python. Can someone test the minimal testcase at http://old.nabble.com/Re%3A-AttributeError%3A-%27Boost.Python.StaticProperty%27-object-attribute-%27__doc__%27-is-read-only-p25209437.html ? It works here, although it didn't before (I posted that one myself).

Václav Šmilauer (eudoxos) wrote :

Please ignore my previous comment, I had the ajmitch's ppa enabled without knowing. (The karmic version really doesn't work)

Václav Šmilauer (eudoxos) wrote :

r1991 detects the issue and tells the user what to do.

Václav Šmilauer (eudoxos) wrote :

(Uh, sorry again, different bug. :-| )

Cory Dodt (corydodt) wrote :

Confirmed that this bug
1
. existed as well in PyV8, and
2. Is fixed by 1.38 from Andrew's PPA.

What's the next step on this bug?

Guy K. Kloss (guy.kloss) wrote :

It would be interesting to see whether anybody has tested this bug on libboost1.40.0 from lucid, yet.

Is it still (going to be) an issue, or is it resolved on 1.40.0?

If so, then this bug would just "grow out". If not, then severe action is required in order to prevent another "broken" release on this issue.

Václav Šmilauer (eudoxos) wrote :

I just tested minimal testcase [1] with 1.40.0-4ubuntu2 on lucid (current) and it is still broken.

[1] http://old.nabble.com/Re%3A-AttributeError%3A-%27Boost.Python.StaticProperty%27-object-attribute-%27__doc__%27-is-read-only-p25209437.html

Michele Mattioni (mattions) wrote :

The 1.40.0-2ubuntu2 on karmic is broken as well.

Václav Šmilauer (eudoxos) wrote :

I filed separate bug #539049 for 1.40 so that (hopefully) someone applies the patch in lucid.

I put rebuilt boost packages for both karmic and lucid are in https://launchpad.net/~yade-users/+archive/external PPA, since ajmitch's packages had been obsoleted by mainline.

Scott Howard (showard314) wrote :

SRU request:

A statement explaining the impact of the bug on users and justification for backporting the fix to the stable release:
See description, specifically this causes depending modules to segfault

An explanation of how the bug has been addressed in the development branch, including the relevant version numbers of packages modified in order to implement the fix:
It has been fixed upstream. We are cherry picking the fix from commit (SVN r53731)

A minimal patch applicable to the stable version of the package. If preparing a patch is likely to be time-consuming, it may be preferable to get a general approval from the SRU team first.
See attached debdiff

Detailed instructions how to reproduce the bug. These should allow someone who is not familiar with the affected package to reproduce the bug and verify that the updated package fixes the problem. Please mark this with a line "TEST CASE:".
TEST CASE:

An example trying to use a sample from python-visual:

guy@mountpaku:/usr/share/doc/python-visual/examples$ python orbit.py
Traceback (most recent call last):
  File "orbit.py", line 1, in <module>
    from visual import *
  File "/usr/lib/python2.6/dist-packages/visual/__init__.py", line 59, in <module>
    import cvisual
AttributeError: 'Boost.Python.StaticProperty' object attribute '__doc__' is read-only

A discussion of the regression potential of the patch and how users could get inadvertently affected.:
This has been tested upstream (and through the ppas linked above in ubuntu) and regressions have not been seen.

Changed in boost1.38 (Ubuntu):
assignee: Andrew Mitchell (ajmitch) → nobody
status: Confirmed → New
Václav Šmilauer (eudoxos) wrote :

@Scott: this bug is reported for boost1.38 which is not in lucid (bug #539049 is for lucid version); will SRU request on libboost1.38 will get attention? Also, why is this "new" and not "confirmed" anymore?

Scott Howard (showard314) wrote :

>@Scott: this bug is reported for boost1.38 which is not in lucid (bug #539049 is for lucid version);

Yes - two bugs make sense: one for the SRU in karmic and one for a bug fix upload into lucid

>will SRU request on libboost1.38 will get attention?
The sponsors team is subscribed, they usually do a good job getting back. To get more attention, we should hop onto #ubuntu-devel and try to get someone from the stable release team to look at this bug (and the lucid one). I probably won't be able to do that for a day or two, so feel free to grab someone from irc to take a look at this.

>Also, why is this "new" and not "confirmed" anymore?
the stable release team, archives, and ubuntu-sponsors teams use different importance to track the progress of their inclusion of the patch. Once a team is subscribed, status doesn't matter (they will use it to signal to each other the status of the request). However, I'll make it triaged since that status is not reserved for their workflow. I'll fix the other bug's status as well.

An example:
https://wiki.ubuntu.com/MOTU/Sponsorship/SponsorsQueue
# The Status should be "New" for sync requests
# The Status should be "Incomplete" for freeze exceptions
# The Status should be "Confirmed" for bugs that represent a new candidate revision (e.g. bugfix uploads, merges.) In other words, use Status "Confirmed" when you have uploaded a debdiff that requires attention from a sponsor.

Changed in boost1.38 (Ubuntu):
status: New → Triaged
Changed in boost1.38 (Ubuntu):
status: Triaged → Confirmed
summary: - libboost-python1.38 issues with __doc__ property in Python >= 2.6.3
+ [SRU, 9.10] libboost-python1.38 issues with __doc__ property in Python
+ >= 2.6.3
tags: added: sru
John Dong (jdong) wrote :

ACK from -SRU for the debdiff in comment #28.

Scott Kitterman (kitterman) wrote :

Wontfix forLucid since 1.38 has been removed.

Changed in boost1.38 (Ubuntu Karmic):
status: New → Confirmed
importance: Undecided → High
Changed in boost1.38 (Ubuntu):
status: Confirmed → Won't Fix
Václav Šmilauer (eudoxos) wrote :

For the record, same problem in lucid, but with boost 1.40, is already fixed in packages (bug #539049).

Accepted boost1.38 into karmic-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in boost1.38 (Ubuntu Karmic):
status: Confirmed → Fix Committed
tags: added: verification-needed
Václav Šmilauer (eudoxos) wrote :

I cannot test the proposed package as I am already at lucid.

I was using the package with ajmitch's patch (which is what has become now the propsoed package) and it worked just fine; therefore I think it is safe to let this go to updates.

It would be, of course, good if someone else could confirm that. Please.

SRU testing should be done with the actual package in -proposed, because it's binary-copied to -updates. This might seem pedantic, but in the past we have had regressions caused by race conditions in the source building process -- the lesson learned is to test the actual update that'll be pushed out.

On Apr 24, 2010, at 4:27 PM, Václav Šmilauer wrote:

> I cannot test the proposed package as I am already at lucid.
>
> I was using the package with ajmitch's patch (which is what has become
> now the propsoed package) and it worked just fine; therefore I think it
> is safe to let this go to updates.
>
> It would be, of course, good if someone else could confirm that. Please.
>
> --
> [SRU, 9.10] libboost-python1.38 issues with __doc__ property in Python >= 2.6.3
> https://bugs.launchpad.net/bugs/457688
> You received this bug notification because you are a member of Ubuntu
> Stable Release Updates Team, which is a direct subscriber.

Guy K. Kloss (guy.kloss) wrote :

I have just tested the libboost-python1.38.0 in version 1.38.0-6ubuntu6.1 from karmic-proposed.
(Beware, some mirrors don't have this package, yet. It took some checking first ...)

Unfortunately, it seems like the error is still there:

$ ipython
Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15)
Type "copyright", "credits" or "license" for more information.

IPython 0.10 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.

In [1]: from visual import *
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)

/home/gkloss/<ipython console> in <module>()

/usr/lib/python2.6/dist-packages/visual/__init__.pyc in <module>()
     56
     57 import crayola as color
---> 58 import cvisual
     59 cvisual.init_numpy()
     60 from cvisual import (vector, mag, mag2, norm, cross, rotate, comp, proj,

AttributeError: 'Boost.Python.StaticProperty' object attribute '__doc__' is read-only

Václav Šmilauer (eudoxos) wrote :

Guy, I have to contradict your observation.

I just tried in karmic chroot with the package, adding karmic-proposed to sources.list I upgraded via apt-get

  Get:2 http://cz.archive.ubuntu.com karmic-proposed/main libboost-python1.38.0 1.38.0-6ubuntu6.1 [246kB]

and then

 root@flux:/etc/apt# python
 Python 2.6.4rc2 (r264rc2:75497, Oct 20 2009, 02:54:09)
 [GCC 4.4.1] on linux2
 Type "help", "copyright", "credits" or "license" for more information.
 >>> from visual import *
 >>>

works flawlessly.

Are you sure you really had the package installed? (sorry for such a stupid question, but I see no other possible cause)

Guy K. Kloss (guy.kloss) wrote :

Václav, of course, I might have gotten something wrong, but I've just tried it again. I've used the nz.archive.ubuntu.com mirror, and this time I have downloaded the package manually:

gkloss@it041227:~$ wget http://nz.archive.ubuntu.com/ubuntu/pool/main/b/boost1.38/libboost-python1.38.0_1.38.0-6ubuntu6.1_i386.deb
--2010-05-11 10:23:32-- http://nz.archive.ubuntu.com/ubuntu/pool/main/b/boost1.38/libboost-python1.38.0_1.38.0-6ubuntu6.1_i386.deb
Resolving alb-cache.massey.ac.nz... 130.123.225.69
Connecting to alb-cache.massey.ac.nz|130.123.225.69|:8080... connected.
Proxy request sent, awaiting response... 200 OK
Length: 240038 (234K) [application/x-debian-package]
Saving to: `libboost-python1.38.0_1.38.0-6ubuntu6.1_i386.deb'

100%[=================================================>] 240,038 --.-K/s in 0.02s

2010-05-11 10:23:33 (10.1 MB/s) - `libboost-python1.38.0_1.38.0-6ubuntu6.1_i386.deb' saved [240038/240038]

Now install it manually, after before (forcefully) removing it:

$ sudo dpkg -i libboost-python1.38.0_1.38.0-6ubuntu6.1_i386.deb
Selecting previously deselected package libboost-python1.38.0.
(Reading database ... 337560 files and directories currently installed.)
Unpacking libboost-python1.38.0 (from libboost-python1.38.0_1.38.0-6ubuntu6.1_i386.deb) ...
Setting up libboost-python1.38.0 (1.38.0-6ubuntu6.1) ...

Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

And now for the test:

gkloss@it041227:~$ python
Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from visual import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/dist-packages/visual/__init__.py", line 58, in <module>
    import cvisual
AttributeError: 'Boost.Python.StaticProperty' object attribute '__doc__' is read-only
>>>

Andrew Mitchell (ajmitch) wrote :

I've just tested & confirmed it as being fixed on amd64, I'll setup an i386 VM & see if I can reproduce this.

Guy K. Kloss (guy.kloss) wrote :

Just retested on another box. Result is positive.

Also I've now gone and also reinstalled python-visual, and guess what, it works as well. There must've been some things "wrong" after all the tinkering to get python-visual working under karmic last year.

So: Thumbs up for the fix!

Martin Pitt (pitti) on 2010-05-11
tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package boost1.38 - 1.38.0-6ubuntu6.1

---------------
boost1.38 (1.38.0-6ubuntu6.1) karmic-proposed; urgency=low

  * Apply patch from SVN r53731 to fix the static property initialization
   - patches/python2.6.4.patch (Boost SVN r53731) (LP: #457688)
 -- Andrew Mitchell <email address hidden> Wed, 11 Nov 2009 16:55:00 +1300

Changed in boost1.38 (Ubuntu Karmic):
status: Fix Committed → Fix Released
Changed in python-visual (Ubuntu):
status: Confirmed → Invalid
Changed in python-visual (Ubuntu Karmic):
status: New → Invalid
Changed in python:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.