STINNER Victor <victor.stin...@haypocalc.com> added the comment:

> 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

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12868>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to