Changes between Initial Version and Version 3 of Ticket #9789


Ignore:
Timestamp:
12/09/08 19:38:49 (6 years ago)
Author:
mtredinnick
Comment:

Edited description to stop eyeball bleeding.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #9789

    • Property Patch needs improvement unset
    • Property Component changed from Uncategorized to Core framework
    • Property Needs tests unset
    • Property Needs documentation unset
    • Property Has patch set
    • Property Triage Stage changed from Unreviewed to Accepted
  • Ticket #9789 – Description

    initial v3  
    11When running manage.py functions that depend on settings.py, Django errors out if the file has been compiled to settings$py.class in Jython.  For example, when I run:
     2{{{
     3jython mysite/manage.py syncdb
     4}}}
     5I get:
     6{{{
     7Error: Could not import settings 'mysite.settings$py' (Is it on sys.path? Does it have syntax errors?): No module named settings$py
     8}}}
     9I tracked this down to `django/core/management/__init__.py` where the .pyc is stripped from compiled CPython files with:
    210
    3 jython mysite/manage.py syncdb
    4 
    5 I get:
    6 
    7 Error: Could not import settings 'mysite.settings$py' (Is it on sys.path? Does it have syntax errors?): No module named settings$py
    8 
    9 I tracked this down to django/core/management/__init__.py where the .pyc is stripped from compiled CPython files with:
    10 
     11{{{
    1112settings_name = os.path.splitext(settings_filename)[0]
     13}}}
    1214
    1315which works great for .pyc files, but doesn't strip the $py from the Jython compiled files.  I'm attaching a simple patch.
Back to Top