Hi, I sent this first as a pull request — talk is cheap, code is better, etc. — but now feel I should I have posted here first.
The underlying issue is that Debian packages unconditionally byte-compile .py files under dist-packages upon installation using `pycompile` and do not silence errors by design. Thus the "invalid" files that form part of the `startapp` template require tedious special attention to avoid errors. I'm sure this would affect other, non-Debian, packaging systems, as well as surface weird behaviour elsewhere. Shipping broken .py files masquerading as valid ones additionally just feels dirty. We templated .py files before, but as the '{{ foo }}' bits were inside strings, docstrings or comments, the pre-rendered templates were perfectly valid Python. Therefore I think need a way of shipping the "invalid" .py files that form part of the `startapp` template without .py extensions but, of course, ensuring they end up as .py after rendering. (Or we use some entirely different mechanism.) My current implementation is <https://github.com/django/django/pull/5735>; see some additional comments I made there. Regards, -- Chris Lamb chris-lamb.co.uk / @lolamby -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/1448709971.2122465.452093193.792C15B7%40webmail.messagingengine.com. For more options, visit https://groups.google.com/d/optout.