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 piotr
Recipients piotr
Date 2014-11-29.10:16:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1417256202.79.0.40494755597.issue22966@psf.upfronthosting.co.za>
In-reply-to
Content
when py_compile module is asked to create .pyc file for file with invalid name, it doesn't fail or ignore such request - it creates/overwrites .pyc file for sane file name (i.e. ignores everything after dot)

$ touch foo.bar.py
$ python3.4 -m py_compile foo.bar.py
$ ls __pycache__
foo.cpython-34.pyc

Even though foo.bar.py is not a valid file name, some programmers are using such names for plugins which leads to bugs similar to https://lists.debian.org/debian-python/2014/11/msg00061.html.

I will update my scripts to not feed py_compile module with file names containing dot (and remove already generated .pyc files if such files are detected), but please do not generate them or generate .pyc files with invalid file names as well.
History
Date User Action Args
2014-11-29 10:16:42piotrsetrecipients: + piotr
2014-11-29 10:16:42piotrsetmessageid: <1417256202.79.0.40494755597.issue22966@psf.upfronthosting.co.za>
2014-11-29 10:16:42piotrlinkissue22966 messages
2014-11-29 10:16:42piotrcreate