Arfrever Frehtes Taifersar Arahesis added the comment: In case of /dev/null, the main problem is that it became a regular file. It was previously a character device. Writing to character devices should not replace them.
What about problem with symlinks?: $ cd /tmp $ touch test.py $ ln -s target.pyc test.pyc $ python3.3 -c 'import py_compile; py_compile.compile("test.py", cfile="test.pyc")' $ ls -l test.py test.pyc target.pyc -rw-r--r-- 1 Arfrever Arfrever 102 02-18 20:20 target.pyc -rw-r--r-- 1 Arfrever Arfrever 0 02-18 20:20 test.py lrwxrwxrwx 1 Arfrever Arfrever 10 02-18 20:20 test.pyc -> target.pyc $ python3.4 -c 'import py_compile; py_compile.compile("test.py", cfile="test.pyc")' $ ls -l test.py test.pyc target.pyc -rw-r--r-- 1 Arfrever Arfrever 102 02-18 20:20 target.pyc -rw-r--r-- 1 Arfrever Arfrever 0 02-18 20:20 test.py -rw-r--r-- 1 Arfrever Arfrever 102 02-18 20:21 test.pyc ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17222> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com