This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Arfrever
Recipients Arfrever, brett.cannon, eric.snow, ncoghlan
Date 2013-02-18.19:24:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1361215450.56.0.0732448890596.issue17222@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2013-02-18 19:24:10Arfreversetrecipients: + Arfrever, brett.cannon, ncoghlan, eric.snow
2013-02-18 19:24:10Arfreversetmessageid: <1361215450.56.0.0732448890596.issue17222@psf.upfronthosting.co.za>
2013-02-18 19:24:10Arfreverlinkissue17222 messages
2013-02-18 19:24:10Arfrevercreate