Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 177866 (python-needs-threads)

Summary: python-{2.3.6-r1,2.4.4-r2,2.5.1} and thread USE-flag issues
Product: Gentoo Linux Reporter: Albert Hopkins (RETIRED) <marduk>
Component: New packagesAssignee: Python Gentoo Team <python>
Status: RESOLVED FIXED    
Severity: critical CC: artnie, bbc.quincy, cbm, crazy-ivanovic, fctk86, ferringb, fuzzyray, gentoo, gentoobugs, jakub, ralix, rustyvega, sgtphou, tb, transacid, wendallc
Priority: Highest    
Version: 2007.0   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=868336
Whiteboard:
Package list:
Runtime testing required: ---

Description Albert Hopkins (RETIRED) gentoo-dev 2007-05-09 21:48:25 UTC
Python 2.4.4-r2 introduces the "threads" use fly which appears to be off by default on my system.  When python is merged with -threads some third party python extensions have problems, in particular pygobject:

----
Python 2.4.4 (#1, May  9 2007, 16:43:56) 
[GCC 4.1.2 (Gentoo 4.1.2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gobject
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/site-packages/gtk-2.0/gobject/__init__.py", line 30, in ?
    from _gobject import *
ImportError: /usr/lib/python2.4/site-packages/gtk-2.0/gobject/_gobject.so: undefined symbol: PyGILState_Ensure
----

Re-emerging pygobject makes no difference.  However downgrading python or re-emerging it with the "threads" USE flag fixes the issue.

I'm not sure what a resolution would be.  You'd think perhaps requiring the threads use flag in python for those extensions that need it, but I have a feeling that's going to be a lot of extensions (maybe not).
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-05-10 05:53:25 UTC
*** Bug 177867 has been marked as a duplicate of this bug. ***
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2007-05-10 05:54:44 UTC
*** Bug 177871 has been marked as a duplicate of this bug. ***
Comment 3 Brian Harring (RETIRED) gentoo-dev 2007-05-10 06:39:33 UTC
as discussed in #-dev with kloeri the other night, python[threads] as default is pretty much required; there isn't any reason to disable it by default.

@kloeri: whats up with nothreads?  Seemed to be the resolution after discussion, but yet to see any commits either masking the python versions involved or fixing it.
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2007-05-10 09:01:11 UTC
*** Bug 177899 has been marked as a duplicate of this bug. ***
Comment 5 Matteo Azzali (RETIRED) gentoo-dev 2007-05-10 10:36:44 UTC
The same gentoolkit needs the module,even after reemerging it after python
update without thread flag the result is bad, this flag is a critical issue,
please remove:

#equery w gimp
Traceback (most recent call last):
  File "/usr/bin/equery", line 25, in ?
    import gentoolkit
  File "/usr/lib/gentoolkit/pym/gentoolkit/__init__.py", line 25, in ?
    from threading import Lock
  File "/usr/lib/python2.4/threading.py", line 6, in ?
    import thread
ImportError: No module named thread
Comment 6 Bryan Østergaard (RETIRED) gentoo-dev 2007-05-10 14:04:19 UTC
Revbumped affected versions and changed USE=threads to USE=nothreads.
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2007-05-10 14:28:18 UTC
*** Bug 177910 has been marked as a duplicate of this bug. ***
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2007-05-10 16:09:37 UTC
On that note, please stick something like "DON'T USE THIS UNLESS YOU KNOW WHAT YOU'RE DOING" to the flag description (shameless copy from nocxx). People should really not be given a false impression that python w/ nothreads will be supported by anyone.
Comment 9 Sven Wegener gentoo-dev 2007-05-10 20:04:23 UTC
*** Bug 123318 has been marked as a duplicate of this bug. ***
Comment 10 Jakub Moc (RETIRED) gentoo-dev 2007-05-11 17:40:33 UTC
*** Bug 178035 has been marked as a duplicate of this bug. ***
Comment 11 Jakub Moc (RETIRED) gentoo-dev 2007-05-16 19:01:33 UTC
*** Bug 178783 has been marked as a duplicate of this bug. ***
Comment 12 d_m 2008-04-20 01:17:25 UTC
This issue still seems to be present in dev-lang/python-2.5.2-r2 (i.e. that a "threads" USE flag exists which is disabled by default). Should this bug be reopened, or a new one created?
Comment 13 Wendall Cada 2008-06-12 04:40:00 UTC
Bug regressed in dev-lang/python-2.4.4-r13 pygobject (possibly others) fail if threads flag is not enabled. Output is identical to the original reporter. Bug should be reopened.
Comment 14 Mike Auty (RETIRED) gentoo-dev 2008-10-25 13:26:11 UTC
*** Bug 244274 has been marked as a duplicate of this bug. ***
Comment 15 Mike Auty (RETIRED) gentoo-dev 2008-10-25 13:26:40 UTC
*** Bug 244272 has been marked as a duplicate of this bug. ***
Comment 16 Mike Auty (RETIRED) gentoo-dev 2008-10-25 13:28:41 UTC
*** Bug 244276 has been marked as a duplicate of this bug. ***
Comment 17 Mike Auty (RETIRED) gentoo-dev 2009-06-22 08:42:21 UTC
*** Bug 274496 has been marked as a duplicate of this bug. ***