[Python-Dev] Can someone look at dummy_thread (#622537)?
Brett Cannon
bac@OCF.Berkeley.EDU
Tue, 3 Dec 2002 20:27:20 -0800 (PST)
[Tim Peters]
> [Guido]
> >>>> I don't propose to automate this. I propose this:
> >>>>
> >>>> try:
> >>>> import threading
> >>>> except ImportError:
> >>>> import dummy_threading as threading
>
> ...
>
> [Brett Cannon]
> > Do you prefer I do a separate ``dummy_threading`` module or follow
> > Martin's suggestions and just turn ``dummy_thread`` into
> > a ``threading`` substitute itself?
>
> Looking at his code, I think it's clear he wants a separate
>
> dummy_threading.py
>
> and nothing fancier than that. The idiomatic use would be as shown, where a
> user who knows what they're doing can import dummy_threading (if desired)
> and *name* it threading locally themself (if desired). No existing code
> could break, except for users who already have a file named
> dummy_threading.py on their PYTHONPATH somewhere after the std library.
>
OK. Then I will just whip together the module (most likely following
Martin's correction of my previous from-the-cuff idea on how to do it) and
add it to the patch.
So if anyone was planning on reviewing the patch, please hold off. I will
email the list again once I have the module and the patches regenerated
(although someone can go ahead and delete all the files in the patch; I
will just put all the files up anew since practically all of them will
change).
-Brett