This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients neologix, rpointel, sdaoden, vstinner
Date 2011-09-01.15:58:47
SpamBayes Score 1.2392489e-05
Marked as misclassified No
Message-id <1314892727.91.0.513474881112.issue12868@psf.upfronthosting.co.za>
In-reply-to
Content
> Great!  I didn't know that!

It's a new feature of Python 3.3. I added it to skip a test on old FreeBDB, see test_threadsignal.py:
------------------------
USING_PTHREAD_COND = (sys.thread_info.name == 'pthread'
                      and sys.thread_info.lock == 'mutex+cond')
...
    @unittest.skipIf(USING_PTHREAD_COND,
                     'POSIX condition variables cannot be interrupted')
    def test_lock_acquire_interruption(self):
------------------------

It is also used in test_os.py:
---------------
if hasattr(sys, 'thread_info') and sys.thread_info.version:
    USING_LINUXTHREADS = sys.thread_info.version.startswith("linuxthreads")
else:
    USING_LINUXTHREADS = False
---------------

This "linux threads" check does already exist in Python 3.2, but is uses:
---------------
    libpthread = os.confstr("CS_GNU_LIBPTHREAD_VERSION")
    USING_LINUXTHREADS= libpthread.startswith("linuxthreads")
---------------

See also the doc:
http://docs.python.org/dev/library/sys.html#sys.thread_info
History
Date User Action Args
2011-09-01 15:58:48vstinnersetrecipients: + vstinner, neologix, sdaoden, rpointel
2011-09-01 15:58:47vstinnersetmessageid: <1314892727.91.0.513474881112.issue12868@psf.upfronthosting.co.za>
2011-09-01 15:58:47vstinnerlinkissue12868 messages
2011-09-01 15:58:47vstinnercreate