#8239 closed (fixed)
django.core.management uses "from imp import find_module"
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Core (Other) | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The early lookup of imp.find_module causes problems when run under Google App Engine, which doesn't support this function. It would be better to just import the imp module (which exists in a near-empty state in App Engine) and use imp.find_module later on -- then the failures aren't quite so fatal, and easier to debug.
Attachments (1)
Change History (6)
by , 16 years ago
comment:1 by , 16 years ago
milestone: | → 1.0 |
---|---|
Triage Stage: | Unreviewed → Accepted |
"Not quite so fatal" sounds like "only a little pregnant". It's sort of a binary situation.
Is this an improvement to aid debugging or a fix for the GAE problem? If not the latter, is there something else we can do to help there as well? Patch looks reasonable to do either way -- but I prefer that style of import and use in any case, so I'm probably biased in addition to just simply having good taste in code style -- but I'm not sure what extent of the problem you're trying to fix here.
comment:2 by , 16 years ago
It's not just a debugging fix -- the code that uses find_module() doesn't actually ever get invoked in my app. (Don't ask me why, I don't understand that area very well.)
IOW it's not binary at all.
comment:4 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [8425]) Fixed #8239 -- Google App Engine has a restricted "imp" module, which doesn't
include one of the methods we use when constructing management help commands.
So postpone the resolving of the method name until when we actually need it
(which isn't run as part of GAE). Patch from Guido van Rossum.
patch