Opened 18 years ago
Closed 18 years ago
#3734 closed (fixed)
__loader__ support for debugging module
Reported by: | Armin Ronacher | Owned by: | Adrian Holovaty |
---|---|---|---|
Component: | Core (Other) | Version: | dev |
Severity: | Keywords: | debug, __loader__ | |
Cc: | 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
The Import Hook PEP provides ways to get the sourcecode of modules imported using an import hook like the zipimporter or others. Django does not use this currently. But it would be a good thing if it would do because python eggs, and many template engines use it.
Attachments (2)
Change History (12)
comment:1 by , 18 years ago
follow-up: 3 comment:2 by , 18 years ago
Armin, ticket #3527 proposed the same and has been closed as wontfix, see the comments there fot rationale.
follow-up: 4 comment:3 by , 18 years ago
Replying to Ramiro Morales <rm0 _at_ gmx.net>:
Armin, ticket #3527 proposed the same [...]
Ramiro, #3527 is about "better debug traceback with code executing". Did you confuse it with another ticket?
comment:4 by , 18 years ago
Replying to mir@noris.de:
Replying to Ramiro Morales <rm0 _at_ gmx.net>:
Armin, ticket #3527 proposed the same [...]
Ramiro, #3527 is about "better debug traceback with code executing". Did you confuse it with another ticket?
Sorry, I totally missed the point. I thought this ticket was also asking for the integration of fancy stack traces
with more debugging info about the modules. Please disregard my comment.
comment:5 by , 18 years ago
Keywords: | debug __loader__ added |
---|---|
Summary: | __loader__ support for debuggin module → __loader__ support for debugging module |
Triage Stage: | Unreviewed → Design decision needed |
comment:6 by , 18 years ago
Ramiro: Not, not code execution. Just the ability of seeing the sourcecode of eggs, zipfiles imported etc. Unfortunately django doesn't use linecache but file() directly, so that this doesn't work out of the box.
comment:7 by , 18 years ago
I created a patch now. Note on the additional escapes: it's likely that there is a value called "<module>" or "<unknown>" so it's better to escape that.
comment:8 by , 18 years ago
Has patch: | set |
---|
by , 18 years ago
Attachment: | debug_with_traceback_hide.patch added |
---|
like the other patch but with additional support for traceback_hide
comment:9 by , 18 years ago
Triage Stage: | Design decision needed → Ready for checkin |
---|
This looks good to me.
comment:10 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I don't have a patch yet but some sourcecode from the colubrid package that provides this: http://trac.pocoo.org/browser/colubrid/trunk/colubrid/debug.py