[issue1674555] sys.path in tests contains system directories

R. David Murray report at bugs.python.org
Mon Jan 3 21:03:23 CET 2011


R. David Murray <rdmurray at bitdance.com> added the comment:

Ah, I hadn't looked closely enough at site.py to realize that the init work was being done by a 'main()' call.  Given that, just moving the main call out should be relatively unlikely to break any custom site.py.  Worse case would presumably be main() getting called twice, which could be annoying but probably not catastrophic.  One would like to think that anyone customizing site.py would redo the customization for a major release and would notice. (And no, I don't know how common customized site.py's are.)

Logging already only does its import if you construct an NTEventLogHandler, so that's probably safe enough.  Changing xml to require a function call might make some people mad, and other people happy...

I wonder if there are any other stdlib modules that do these kinds of external imports.  I suppose we can just fix xml and wait for additional bug reports :)

I'm not sure either of these changes (site.py-call or xml-activate-xmlplus) should be backported, though, assuming we go ahead with them.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1674555>
_______________________________________


More information about the Python-bugs-list mailing list