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.
Created on 2012年01月17日 22:20 by amaury.forgeotdarc, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| bz2_nothread.patch | amaury.forgeotdarc, 2012年01月17日 22:20 | review | ||
| Messages (5) | |||
|---|---|---|---|
| msg151491 - (view) | Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) | Date: 2012年01月17日 22:20 | |
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. |
|||
| msg151492 - (view) | Author: Georg Brandl (georg.brandl) * (Python committer) | Date: 2012年01月17日 22:49 | |
Isn't there already a dummy lock in dummy_threading? |
|||
| msg151493 - (view) | Author: Nadeem Vawda (nadeem.vawda) * (Python committer) | Date: 2012年01月17日 22:55 | |
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. |
|||
| msg151497 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年01月17日 23:57 | |
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 |
|||
| msg151498 - (view) | Author: Nadeem Vawda (nadeem.vawda) * (Python committer) | Date: 2012年01月17日 23:59 | |
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. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:25 | admin | set | github: 58017 |
| 2012年01月17日 23:59:04 | nadeem.vawda | set | status: open -> closed resolution: fixed messages: + msg151498 stage: patch review -> resolved |
| 2012年01月17日 23:57:43 | python-dev | set | nosy:
+ python-dev messages: + msg151497 |
| 2012年01月17日 22:55:38 | nadeem.vawda | set | messages: + msg151493 |
| 2012年01月17日 22:49:02 | georg.brandl | set | nosy:
+ georg.brandl messages: + msg151492 |
| 2012年01月17日 22:21:23 | pitrou | set | nosy:
+ nadeem.vawda |
| 2012年01月17日 22:20:56 | amaury.forgeotdarc | create | |