[issue13809] bz2 does not work when threads are disabled

2012-01-17 Thread Nadeem Vawda

Nadeem Vawda  added the comment:

Fix committed. For the test, it turns out we can get the desired behavior
by telling import_fresh_module to block the threading module directly,
instead of blocking _thread.

--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13809] bz2 does not work when threads are disabled

2012-01-17 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 2fb93282887a by Nadeem Vawda in branch 'default':
Issue #13809: Make bz2 module work with threads disabled.
http://hg.python.org/cpython/rev/2fb93282887a

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13809] bz2 does not work when threads are disabled

2012-01-17 Thread Nadeem Vawda

Nadeem Vawda  added the comment:

As Georg suggested, it would be better to use dummy_threading.RLock,
rather than providing our own implementation.

The test in the patch fails when I try to run it on a no-thread build.
support.import_fresh_module seems to treat the absence of the threading
module as an error, and returns None instead of allowing the bz2 module
to recover from the ImportError.

We needn't worry about 3.2. It still uses the old all-C implementation,
which has its threading dependencies protected by #ifdefs.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13809] bz2 does not work when threads are disabled

2012-01-17 Thread Georg Brandl

Georg Brandl  added the comment:

Isn't there already a dummy lock in dummy_threading?

--
nosy: +georg.brandl

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13809] bz2 does not work when threads are disabled

2012-01-17 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +nadeem.vawda

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13809] bz2 does not work when threads are disabled

2012-01-17 Thread Amaury Forgeot d'Arc

New submission from Amaury Forgeot d'Arc :

In bz2.py, "import threading" prevents the bz2 module from working when threads 
are not enabled.  The attached patch removes the limitation and provides a fake 
lock object.

I don't know if this should be backported to 3.2.

--
components: Library (Lib)
files: bz2_nothread.patch
keywords: patch
messages: 151491
nosy: amaury.forgeotdarc
priority: normal
severity: normal
stage: patch review
status: open
title: bz2 does not work when threads are disabled
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file24267/bz2_nothread.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com