[Python-Dev] [Python-checkins] r85902 - in python/branches/py3k/Lib: os.py test/test_os.py

Victor Stinner victor.stinner at haypocalc.com
Wed Nov 3 11:55:41 CET 2010


Le mardi 02 novembre 2010 23:38:12, vous avez écrit :
> On Tue, Nov 2, 2010 at 10:55 PM, Victor Stinner
> 
> <victor.stinner at haypocalc.com> wrote:
> > I don't know how to ignore the BytesWarning without importing warning.
> > How can I do that?
> 
> I was suggesting trying to fix the bootstrap issue so you could use a
> top-level import, instead of working around it with a function level
> import (which we've learned from experience is a recipe for later
> reports from users of programs deadlocking on the import lock - we've
> made lots of improvement to avoid such deadlocks, but still prefer to
> avoid function level imports anyway).

I don't know if there is a bootstrap issue. I'm using a local import because 
os is always loaded at startup, and get_exec_path() is only used to run a 
subprocess: os.exec*() and subprocess.Popen() (only the POSIX implementation). 
I suppose that a top level "import warnings" would augment the memory 
footprint.

Victor


More information about the Python-Dev mailing list