[issue6612] 'import site' fails when called from an unlinked directory

2010-10-12 Thread STINNER Victor
STINNER Victor added the comment: Fixed in 3.2 (r85386+r85387+r85389), 2.7 (r85390), 3.1 (r85391). Thanks labrat for your patch. I added you to Misc/ACKS. -- resolution: -> fixed status: open -> closed ___ Python tracker

[issue6612] 'import site' fails when called from an unlinked directory

2010-10-07 Thread STINNER Victor
STINNER Victor added the comment: deleted_cwd.patch, patch based on labrat's patch updated to py3k: http://www.physics.drexel.edu/~wking/code/hg/hgwebdir.cgi/python/rev/77f3ad10ba45 Procedure to test the patch: - go into Python source tree - make a directory "z" - enter z directory - delete

[issue6612] 'import site' fails when called from an unlinked directory

2010-10-07 Thread STINNER Victor
STINNER Victor added the comment: There was a bug in copy_absolute(): if _Py_wgetcwd() failed, the result was undefined (depending of the content of "path" buffer). Especially, absolutize() calls copy_absolute() with a buffer allocated on the stack: the content of this buffer depends on the u

[issue6612] 'import site' fails when called from an unlinked directory

2010-10-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: A unit test is needed. Not to check the code, but to ensure that we don't break it in the future. -- nosy: +amaury.forgeotdarc ___ Python tracker ___

[issue6612] 'import site' fails when called from an unlinked directory

2010-07-29 Thread Georg Brandl
Georg Brandl added the comment: Thanks! Reopening. -- components: +Library (Lib) stage: -> patch review status: languishing -> open type: -> behavior versions: +Python 3.1, Python 3.2 -Python 2.5, Python 2.6 ___ Python tracker

[issue6612] 'import site' fails when called from an unlinked directory

2010-07-29 Thread W. Trevor King
W. Trevor King added the comment: I just fixed it myself ;). As I said before, not really a big deal, but it was an easy fix. I've attached a patch, or you can merge my hg branch f python-trunk at http://www.physics.drexel.edu/~wking/code/hg/hgwebdir.cgi/python/ -- keywords: +pat

[issue6612] 'import site' fails when called from an unlinked directory

2010-07-29 Thread Georg Brandl
Georg Brandl added the comment: I'm quite sure nobody will want to do anything about it... -- nosy: +georg.brandl status: open -> languishing ___ Python tracker ___ _

[issue6612] 'import site' fails when called from an unlinked directory

2009-07-31 Thread W. Trevor King
New submission from W. Trevor King : I don't imagine this comes up very often, but: $ mkdir /tmp/a; cd /tmp/a; rmdir /tmp/a; python -c 'import site'; rmdir: removing directory, /tmp/a 'import site' failed; use -v for traceback Traceback (most recent call last): File "", line 1, in File "/ho