Opened 13 years ago

Closed 13 years ago

#16518 closed Uncategorized (fixed)

collectstatic management command fails with jython

Reported by: Josh Smeaton <josh.smeaton@…> Owned by: nobody
Component: contrib.staticfiles Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Ticket 14665 makes use of os.stat_float_times to work around an issue where some static files are collected all of the time. Unfortunately, Jython doesn't yet support the function stat_float_times, so the collectstatic management command fails.

This is a problem with Jython to be sure, and I've logged a ticket with the project here.

I still feel that since staticfiles is now an integral part of django, that a minor work around for this should be included in order to continue support of jython as a platform. I'm including a patch with this ticket, made against the 1.3 branch since that is the version I'm currently using. I've also tested that it works in current trunk, so porting it there should be relatively painless if accepted.

Attachments (1)

collectstatic-jython-fix.diff (724 bytes ) - added by Josh Smeaton <josh.smeaton@…> 13 years ago.
patch

Download all attachments as: .zip

Change History (3)

by Josh Smeaton <josh.smeaton@…>, 13 years ago

patch

comment:1 by Josh Smeaton <josh.smeaton@…>, 13 years ago

Oh, the stack trace demonstrating the problem:

$ jython manage.py collectstatic

Traceback (most recent call last):

File "manage.py", line 22, in <module>

execute_from_command_line()

File "django/core/management/init.py", line 429, in execute_from_command_line

utility.execute()

File "django/core/management/init.py", line 379, in execute

self.fetch_command(subcommand).run_from_argv(self.argv)

File "django/core/management/init.py", line 261, in fetch_command

klass = load_command_class(app_name, subcommand)

File "django/core/management/init.py", line 68, in load_command_class

return module.Command()

File "django/contrib/staticfiles/management/commands/collectstatic.py", line 49, in init

os.stat_float_times(False)

AttributeError: 'module' object has no attribute 'stat_float_times'

Full paths removed to protect the innocent.

comment:2 by Jannis Leidel, 13 years ago

Resolution: fixed
Status: newclosed

In [16553]:

Fixed #16518 -- Fixed collectstatic management command to run on Jython. Thanks, Josh Smeaton.

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