Ticket #2467 (closed defect: fixed)
Unable to Disable Unneeded Dependencies (Genshi & ToscaWidgets)
| Reported by: | lambacck | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.1rc1 |
| Component: | TurboGears | Version: | trunk |
| Severity: | normal | Keywords: | toscawidgets genshi |
| Cc: |
Description
It is possible to disable both ToscaWidgets? and Genshi, but it is not possible to get rid of the dependency because they are always imported.
Genshi is imported in tg/render.py but not used unless a Genshi template is used.
ToscaWidgets? is imported in tg/controllers/decoratedcontroller.py but not used unless use_toscawidgets config variable is set to true. ToscaWidgets2 is conditionally imported.
I'll provide a patch before the PyCon? sprint on Monday. I'm not in Atlanta, but I'll show up on IRC to discuss.
Attachments
Change History
comment:2 Changed 2 years ago by lmacken
- Status changed from new to closed
- Resolution set to fixed
Committed, tweaked ( http://bitbucket.org/turbogears/tg-dev/changeset/2ec592fe10dd/) and pushed. Works with the tg test suite, along with mako & genshi quickstart test suites.
Thanks for the patch!

I added a patch. After this patch is applied, ToscaWidgets? and Genshi should only be required if they are being used. I did not change the install_requires in setup.py because I was not sure how this should be handled.
I also made it so that Mako is not required when dotted names support is used.