Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#18206 closed New feature (wontfix)

Disable bytecode in manage.py by default to avoid project clutter.

Reported by: anonymous Owned by: nobody
Component: Uncategorized Version: 1.4
Severity: Normal Keywords: bytecode
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Python's default setting is to have bytecode enabled (for very good reason) however this results in Django projects being littered with .pyc files if this is not turned off. The performance improvements from allowing bytecode in development are minimal and IMO the disadvantages (clutter, confusion for new users, having to set these as ignored in git/svn/etc), whilst minor, outweigh the advantages - especially as it's such an easy issue to fix.

It is a simple, one-line fix to django/conf/project_template/manage.py and will not affect production deployments of Django applications.

Attachments (1)

bytecode.patch (421 bytes ) - added by anonymous 13 years ago.

Download all attachments as: .zip

Change History (4)

by anonymous, 13 years ago

Attachment: bytecode.patch added

comment:1 by Claude Paroz, 13 years ago

Resolution: wontfix
Status: newclosed

This can be turned on or off with -B parameter or PYTHONDONTWRITEBYTECODE environment variable. I don't feel like hard-coding this like you are proposing, sorry.

comment:2 by anonymous, 13 years ago

Hi Claudep,

Fair enough. I will say one more thing on the matter though - whilst this can be done, it's another thing to do, and people new to the framework/language won't necessarily do it as they may be unaware. IMO it can hinder productivity.

Still, your choice. I'll continue to add it myself :-)

Cheers.

comment:3 by Aymeric Augustin, 13 years ago

FWIW I agree with Claude -- if Django's defaults diverged from Python's, most people would consider that a bug.

Note: See TracTickets for help on using tickets.
Back to Top