[issue12618] py_compile cannot create files in current directory

Meador Inge report at bugs.python.org
Sun Nov 27 02:08:18 CET 2011


Meador Inge <meadori at gmail.com> added the comment:

> we don’t know what people do with symlinks and relative paths out 
> there, so I’d prefer adding a safe special case* rather than always 
> calling abspath.  What do you think?

Éric, I agree.  I didn't know about the strange symlink + relative path 
behavior with 'os.path.normpath', but [1] cleared me up.  With that in
mind the special casing is OK.  I have attached an updated patch with
a unit test.

Also, this is not an issue for Python 2.7.  The 2.7 implementation
assumes any directories mentioned in the path already exist.  So, I
removed 2.7 from the affected versions.

[1] http://mail.python.org/pipermail/python-dev/2005-December/058452.html

----------
versions:  -Python 2.7
Added file: http://bugs.python.org/file23789/issue12618-1.patch

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


More information about the Python-bugs-list mailing list