Opened 16 years ago
Closed 10 years ago
#8280 closed Bug (fixed)
Commands framework doesn't support alternate import methods
Reported by: | jdetaeye | Owned by: | nobody |
---|---|---|---|
Component: | Core (Management commands) | Version: | dev |
Severity: | Normal | Keywords: | command zip |
Cc: | bhuztez@… | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
From this thread on the developer mailing list
http://groups.google.com/group/django-developers/browse_thread/thread/78975372cdfb7d1a#
I understand that the Django team is keen on supporting alternate ways of packaging django: in a zip-file, in a jar-file(Jython) or other "frozen" formats.
One place that'll need fixing to achieve this is to update the command framework.
The find available commands, the current Django code is browsing the command subdirectories and looking for files that end with a .py extension
To support alternate packaging, the code should use the proper Python APIs to iterate over the available modules in a package.
A patch along these lines was already included with #5825. (The patch would need updating to the SVN version however - Once this ticket is accepted I can take care of it.)
Attachments (3)
Change History (15)
by , 16 years ago
Attachment: | usercommands.patch added |
---|
comment:1 by , 16 years ago
milestone: | → 1.0 |
---|---|
Triage Stage: | Unreviewed → Accepted |
Given that this will be useful in more than just the management app (for example, finding the available db backends, as in #8238), it's probably worth putting a compat module in django.utils
that provides the necessary functionality for all the Python versions we support (2.3 and up).
The idea seems necessary for our "Python on VMs" goal for 1.0.
comment:2 by , 16 years ago
milestone: | 1.0 → post-1.0 |
---|
After discussion with Jacob, we think this isn't really a showstopper for 1.0. It's certainly possible to do without it (as Jython have managed) for now. After 1.0 it will certainly be a nice idea to implement, though.
The patch needs changing as mentioned in the above comment in order to keep things cleaner. Then it needs a bunch of testing on differently-backed Pythons (CPython, IronPython, PyPy and Jython) to make sure it works. Right now that requires time and could destabilise things.
comment:4 by , 14 years ago
Easy pickings: | unset |
---|---|
Patch needs improvement: | set |
Severity: | → Normal |
Type: | → Bug |
We no longer need to support anything less than Python 2.5, so this patch can be simplified. It then just confirmation that is works CPython/Jython/IronPython/PyPy.
by , 13 years ago
Attachment: | zip_egg_fixed.diff added |
---|
zip_egg_fixed from #14087, namespace_package_pth.5.diff should be applied before this patch
comment:7 by , 13 years ago
Cc: | added |
---|
take zip_egg_fixed from #14087, namespace_package_pth.5.diff should be applied before this patch.
comment:9 by , 12 years ago
Component: | Core (Other) → Core (Management commands) |
---|
comment:10 by , 10 years ago
Patch needs improvement: | unset |
---|
comment:11 by , 10 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
comment:12 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
patch included with #5825